23 #include "catalog/pg_type_d.h"
230 #ifdef CATALOG_VARLEN
271 #ifdef EXPOSE_TO_CLIENT_CODE
276 #define TYPTYPE_BASE 'b'
277 #define TYPTYPE_COMPOSITE 'c'
278 #define TYPTYPE_DOMAIN 'd'
279 #define TYPTYPE_ENUM 'e'
280 #define TYPTYPE_MULTIRANGE 'm'
281 #define TYPTYPE_PSEUDO 'p'
282 #define TYPTYPE_RANGE 'r'
284 #define TYPCATEGORY_INVALID '\0'
285 #define TYPCATEGORY_ARRAY 'A'
286 #define TYPCATEGORY_BOOLEAN 'B'
287 #define TYPCATEGORY_COMPOSITE 'C'
288 #define TYPCATEGORY_DATETIME 'D'
289 #define TYPCATEGORY_ENUM 'E'
290 #define TYPCATEGORY_GEOMETRIC 'G'
291 #define TYPCATEGORY_NETWORK 'I'
292 #define TYPCATEGORY_NUMERIC 'N'
293 #define TYPCATEGORY_PSEUDOTYPE 'P'
294 #define TYPCATEGORY_RANGE 'R'
295 #define TYPCATEGORY_STRING 'S'
296 #define TYPCATEGORY_TIMESPAN 'T'
297 #define TYPCATEGORY_USER 'U'
298 #define TYPCATEGORY_BITSTRING 'V'
299 #define TYPCATEGORY_UNKNOWN 'X'
300 #define TYPCATEGORY_INTERNAL 'Z'
302 #define TYPALIGN_CHAR 'c'
303 #define TYPALIGN_SHORT 's'
304 #define TYPALIGN_INT 'i'
305 #define TYPALIGN_DOUBLE 'd'
307 #define TYPSTORAGE_PLAIN 'p'
308 #define TYPSTORAGE_EXTERNAL 'e'
309 #define TYPSTORAGE_EXTENDED 'x'
310 #define TYPSTORAGE_MAIN 'm'
313 #define IsPolymorphicType(typid) \
314 (IsPolymorphicTypeFamily1(typid) || \
315 IsPolymorphicTypeFamily2(typid))
318 #define IsPolymorphicTypeFamily1(typid) \
319 ((typid) == ANYELEMENTOID || \
320 (typid) == ANYARRAYOID || \
321 (typid) == ANYNONARRAYOID || \
322 (typid) == ANYENUMOID || \
323 (typid) == ANYRANGEOID || \
324 (typid) == ANYMULTIRANGEOID)
326 #define IsPolymorphicTypeFamily2(typid) \
327 ((typid) == ANYCOMPATIBLEOID || \
328 (typid) == ANYCOMPATIBLEARRAYOID || \
329 (typid) == ANYCOMPATIBLENONARRAYOID || \
330 (typid) == ANYCOMPATIBLERANGEOID || \
331 (typid) == ANYCOMPATIBLEMULTIRANGEOID)
334 #define IsTrueArrayType(typeForm) \
335 (OidIsValid((typeForm)->typelem) && \
336 (typeForm)->typsubscript == F_ARRAY_SUBSCRIPT_HANDLER)
342 #define CASHOID MONEYOID
343 #define LSNOID PG_LSNOID
353 const char *typeName,
365 Oid receiveProcedure,
367 Oid typmodinProcedure,
368 Oid typmodoutProcedure,
369 Oid analyzeProcedure,
370 Oid subscriptProcedure,
372 bool isImplicitArray,
375 const char *defaultTypeValue,
376 char *defaultTypeBin,
391 bool isImplicitArray,
392 bool isDependentType,
393 bool makeExtensionDep,
Datum array_typanalyze(PG_FUNCTION_ARGS)
Datum array_recv(PG_FUNCTION_ARGS)
Datum array_send(PG_FUNCTION_ARGS)
Datum array_in(PG_FUNCTION_ARGS)
Datum array_out(PG_FUNCTION_ARGS)
Datum array_subscript_handler(PG_FUNCTION_ARGS)
#define BKI_LOOKUP(catalog)
#define BKI_LOOKUP_OPT(catalog)
#define BKI_ROWTYPE_OID(oid, oidmacro)
char * makeMultirangeTypeName(const char *rangeTypeName, Oid typeNamespace)
DECLARE_UNIQUE_INDEX_PKEY(pg_type_oid_index, 2703, TypeOidIndexId, pg_type, btree(oid oid_ops))
TypeRelation_Rowtype_Id BKI_SCHEMA_MACRO
void GenerateTypeDependencies(HeapTuple typeTuple, Relation typeCatalog, Node *defaultExpr, void *typacl, char relationKind, bool isImplicitArray, bool isDependentType, bool makeExtensionDep, bool rebuild)
void RenameTypeInternal(Oid typeOid, const char *newTypeName, Oid typeNamespace)
ObjectAddress TypeCreate(Oid newTypeOid, const char *typeName, Oid typeNamespace, Oid relationOid, char relationKind, Oid ownerId, int16 internalSize, char typeType, char typeCategory, bool typePreferred, char typDelim, Oid inputProcedure, Oid outputProcedure, Oid receiveProcedure, Oid sendProcedure, Oid typmodinProcedure, Oid typmodoutProcedure, Oid analyzeProcedure, Oid subscriptProcedure, Oid elementType, bool isImplicitArray, Oid arrayType, Oid baseType, const char *defaultTypeValue, char *defaultTypeBin, bool passedByValue, char alignment, char storage, int32 typeMod, int32 typNDims, bool typeNotNull, Oid typeCollation)
char * makeArrayTypeName(const char *typeName, Oid typeNamespace)
int16 typlen BKI_ARRAY_DEFAULT(-1)
bool moveArrayTypeName(Oid typeOid, const char *typeName, Oid typeNamespace)
CATALOG(pg_type, 1247, TypeRelationId) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71
FormData_pg_type * Form_pg_type
ObjectAddress TypeShellMake(const char *typeName, Oid typeNamespace, Oid ownerId)
DECLARE_UNIQUE_INDEX(pg_type_typname_nsp_index, 2704, TypeNameNspIndexId, pg_type, btree(typname name_ops, typnamespace oid_ops))
Oid typnamespace BKI_DEFAULT(pg_catalog) BKI_LOOKUP(pg_namespace)
MAKE_SYSCACHE(TYPEOID, pg_type_oid_index, 64)
DECLARE_TOAST(pg_type, 4171, 4172)