Header And Logo

PostgreSQL
| The world's most advanced open source database.

Defines | Typedefs | Functions | Variables

pg_type.h File Reference

#include "catalog/genbki.h"
Include dependency graph for pg_type.h:

Go to the source code of this file.

Defines

#define TypeRelationId   1247
#define TypeRelation_Rowtype_Id   71
#define Natts_pg_type   30
#define Anum_pg_type_typname   1
#define Anum_pg_type_typnamespace   2
#define Anum_pg_type_typowner   3
#define Anum_pg_type_typlen   4
#define Anum_pg_type_typbyval   5
#define Anum_pg_type_typtype   6
#define Anum_pg_type_typcategory   7
#define Anum_pg_type_typispreferred   8
#define Anum_pg_type_typisdefined   9
#define Anum_pg_type_typdelim   10
#define Anum_pg_type_typrelid   11
#define Anum_pg_type_typelem   12
#define Anum_pg_type_typarray   13
#define Anum_pg_type_typinput   14
#define Anum_pg_type_typoutput   15
#define Anum_pg_type_typreceive   16
#define Anum_pg_type_typsend   17
#define Anum_pg_type_typmodin   18
#define Anum_pg_type_typmodout   19
#define Anum_pg_type_typanalyze   20
#define Anum_pg_type_typalign   21
#define Anum_pg_type_typstorage   22
#define Anum_pg_type_typnotnull   23
#define Anum_pg_type_typbasetype   24
#define Anum_pg_type_typtypmod   25
#define Anum_pg_type_typndims   26
#define Anum_pg_type_typcollation   27
#define Anum_pg_type_typdefaultbin   28
#define Anum_pg_type_typdefault   29
#define Anum_pg_type_typacl   30
#define BOOLOID   16
#define BYTEAOID   17
#define CHAROID   18
#define NAMEOID   19
#define INT8OID   20
#define INT2OID   21
#define INT2VECTOROID   22
#define INT4OID   23
#define REGPROCOID   24
#define TEXTOID   25
#define OIDOID   26
#define TIDOID   27
#define XIDOID   28
#define CIDOID   29
#define OIDVECTOROID   30
#define JSONOID   114
#define XMLOID   142
#define PGNODETREEOID   194
#define POINTOID   600
#define LSEGOID   601
#define PATHOID   602
#define BOXOID   603
#define POLYGONOID   604
#define LINEOID   628
#define FLOAT4OID   700
#define FLOAT8OID   701
#define ABSTIMEOID   702
#define RELTIMEOID   703
#define TINTERVALOID   704
#define UNKNOWNOID   705
#define CIRCLEOID   718
#define CASHOID   790
#define MACADDROID   829
#define INETOID   869
#define CIDROID   650
#define INT4ARRAYOID   1007
#define TEXTARRAYOID   1009
#define FLOAT4ARRAYOID   1021
#define ACLITEMOID   1033
#define CSTRINGARRAYOID   1263
#define BPCHAROID   1042
#define VARCHAROID   1043
#define DATEOID   1082
#define TIMEOID   1083
#define TIMESTAMPOID   1114
#define TIMESTAMPTZOID   1184
#define INTERVALOID   1186
#define TIMETZOID   1266
#define BITOID   1560
#define VARBITOID   1562
#define NUMERICOID   1700
#define REFCURSOROID   1790
#define REGPROCEDUREOID   2202
#define REGOPEROID   2203
#define REGOPERATOROID   2204
#define REGCLASSOID   2205
#define REGTYPEOID   2206
#define REGTYPEARRAYOID   2211
#define UUIDOID   2950
#define TSVECTOROID   3614
#define GTSVECTOROID   3642
#define TSQUERYOID   3615
#define REGCONFIGOID   3734
#define REGDICTIONARYOID   3769
#define INT4RANGEOID   3904
#define RECORDOID   2249
#define RECORDARRAYOID   2287
#define CSTRINGOID   2275
#define ANYOID   2276
#define ANYARRAYOID   2277
#define VOIDOID   2278
#define TRIGGEROID   2279
#define EVTTRIGGEROID   3838
#define LANGUAGE_HANDLEROID   2280
#define INTERNALOID   2281
#define OPAQUEOID   2282
#define ANYELEMENTOID   2283
#define ANYNONARRAYOID   2776
#define ANYENUMOID   3500
#define FDW_HANDLEROID   3115
#define ANYRANGEOID   3831
#define TYPTYPE_BASE   'b'
#define TYPTYPE_COMPOSITE   'c'
#define TYPTYPE_DOMAIN   'd'
#define TYPTYPE_ENUM   'e'
#define TYPTYPE_PSEUDO   'p'
#define TYPTYPE_RANGE   'r'
#define TYPCATEGORY_INVALID   '\0'
#define TYPCATEGORY_ARRAY   'A'
#define TYPCATEGORY_BOOLEAN   'B'
#define TYPCATEGORY_COMPOSITE   'C'
#define TYPCATEGORY_DATETIME   'D'
#define TYPCATEGORY_ENUM   'E'
#define TYPCATEGORY_GEOMETRIC   'G'
#define TYPCATEGORY_NETWORK   'I'
#define TYPCATEGORY_NUMERIC   'N'
#define TYPCATEGORY_PSEUDOTYPE   'P'
#define TYPCATEGORY_RANGE   'R'
#define TYPCATEGORY_STRING   'S'
#define TYPCATEGORY_TIMESPAN   'T'
#define TYPCATEGORY_USER   'U'
#define TYPCATEGORY_BITSTRING   'V'
#define TYPCATEGORY_UNKNOWN   'X'
#define IsPolymorphicType(typid)

Typedefs

typedef FormData_pg_typeForm_pg_type

Functions

 CATALOG (pg_type, 1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO
 DATA (insert OID=16(boolPGNSP PGUID 1 t b B t t\054 00 1000 boolin boolout boolrecv boolsend---c p f 0-1 0 0 _null_ _null_ _null_))
 DESCR ("boolean, 'true'/'false'")
 DESCR ("variable-length string, binary values escaped")
 DESCR ("single character")
 DESCR ("63-byte type for storing system identifiers")
 DESCR ("~18 digit integer, 8-byte storage")
 DESCR ("-32 thousand to 32 thousand, 2-byte storage")
 DESCR ("array of int2, used in system tables")
 DESCR ("-2 billion to 2 billion integer, 4-byte storage")
 DESCR ("registered procedure")
 DESCR ("variable-length string, no limit specified")
 DESCR ("object identifier(oid), maximum 4 billion")
 DESCR ("(block, offset), physical location of tuple")
 DESCR ("transaction id")
 DESCR ("command identifier type, sequence in transaction id")
 DESCR ("XML content")
 DESCR ("string representing an internal node tree")
 DESCR ("storage manager")
 DESCR ("geometric point '(x, y)'")
 DESCR ("geometric line segment '(pt1,pt2)'")
 DESCR ("geometric path '(pt1,...)'")
 DESCR ("geometric box '(lower left,upper right)'")
 DESCR ("geometric polygon '(pt1,...)'")
 DESCR ("geometric line (not implemented)")
 DESCR ("")
 DESCR ("single-precision floating point number, 4-byte storage")
 DESCR ("double-precision floating point number, 8-byte storage")
 DESCR ("absolute, limited-range date and time (Unix system time)")
 DESCR ("relative, limited-range time interval (Unix delta time)")
 DESCR ("(abstime,abstime), time interval")
 DESCR ("geometric circle '(center,radius)'")
 DESCR ("monetary amounts, $d,ddd.cc")
 DESCR ("XX:XX:XX:XX:XX:XX, MAC address")
 DESCR ("IP address/netmask, host address, netmask optional")
 DESCR ("network IP address/netmask, network address")
 DESCR ("access control list")
 DESCR ("char(length), blank-padded string, fixed storage length")
 DESCR ("varchar(length), non-blank-padded string, variable storage length")
 DESCR ("date")
 DESCR ("time of day")
 DESCR ("date and time")
 DESCR ("date and time with time zone")
 DESCR ("@ <number> <units>, time interval")
 DESCR ("time of day with time zone")
 DESCR ("fixed-length bit string")
 DESCR ("variable-length bit string")
 DESCR ("numeric(precision, decimal), arbitrary precision number")
 DESCR ("reference to cursor (portal name)")
 DESCR ("registered procedure (with args)")
 DESCR ("registered operator")
 DESCR ("registered operator (with args)")
 DESCR ("registered class")
 DESCR ("registered type")
 DESCR ("UUID datatype")
 DESCR ("text representation for text search")
 DESCR ("GiST index internal text representation for text search")
 DESCR ("query representation for text search")
 DESCR ("registered text search configuration")
 DESCR ("registered text search dictionary")
 DESCR ("txid snapshot")
 DESCR ("range of integers")
 DESCR ("range of numerics")
 DESCR ("range of timestamps without time zone")
 DESCR ("range of timestamps with time zone")
 DESCR ("range of dates")
 DESCR ("range of bigints")

Variables

 FormData_pg_type

Define Documentation

#define ABSTIMEOID   702
#define ACLITEMOID   1033

Definition at line 477 of file pg_type.h.

Referenced by check_acl().

#define Anum_pg_type_typacl   30

Definition at line 269 of file pg_type.h.

Referenced by ExecGrant_Type(), pg_type_aclmask(), TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typalign   21

Definition at line 260 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typanalyze   20

Definition at line 259 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typarray   13

Definition at line 252 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typbasetype   24

Definition at line 263 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typbyval   5

Definition at line 244 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typcategory   7

Definition at line 246 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typcollation   27

Definition at line 266 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typdefault   29
#define Anum_pg_type_typdefaultbin   28
#define Anum_pg_type_typdelim   10

Definition at line 249 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typelem   12

Definition at line 251 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typinput   14

Definition at line 253 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typisdefined   9

Definition at line 248 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typispreferred   8

Definition at line 247 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typlen   4

Definition at line 243 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typmodin   18

Definition at line 257 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typmodout   19

Definition at line 258 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typname   1

Definition at line 240 of file pg_type.h.

Referenced by regtypein(), TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typnamespace   2

Definition at line 241 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typndims   26

Definition at line 265 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typnotnull   23

Definition at line 262 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typoutput   15

Definition at line 254 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typowner   3

Definition at line 242 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typreceive   16

Definition at line 255 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typrelid   11

Definition at line 250 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typsend   17

Definition at line 256 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typstorage   22

Definition at line 261 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typtype   6

Definition at line 245 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define Anum_pg_type_typtypmod   25

Definition at line 264 of file pg_type.h.

Referenced by TypeCreate(), and TypeShellMake().

#define ANYARRAYOID   2277
#define ANYELEMENTOID   2283
#define ANYENUMOID   3500
#define ANYNONARRAYOID   2776
#define ANYOID   2276
#define ANYRANGEOID   3831
#define BITOID   1560
#define BOOLOID   16
#define BOXOID   603

Definition at line 390 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define BPCHAROID   1042
#define BYTEAOID   17
#define CASHOID   790

Definition at line 428 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), and printQuery().

#define CHAROID   18
#define CIDOID   29

Definition at line 340 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), and printQuery().

#define CIDROID   650

Definition at line 440 of file pg_type.h.

Referenced by convert_network_to_scalar(), convert_to_scalar(), and ecpg_is_type_an_array().

#define CIRCLEOID   718

Definition at line 424 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define CSTRINGARRAYOID   1263

Definition at line 483 of file pg_type.h.

#define CSTRINGOID   2275
#define DATEOID   1082
#define EVTTRIGGEROID   3838

Definition at line 655 of file pg_type.h.

Referenced by CreateEventTrigger(), do_compile(), and plpgsql_validator().

#define FDW_HANDLEROID   3115

Definition at line 669 of file pg_type.h.

Referenced by lookup_fdw_handler_func().

#define FLOAT4ARRAYOID   1021

Definition at line 469 of file pg_type.h.

#define FLOAT4OID   700
#define FLOAT8OID   701
#define GTSVECTOROID   3642

Definition at line 585 of file pg_type.h.

#define INETOID   869
#define INT2OID   21
#define INT2VECTOROID   22

Definition at line 312 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), find_coercion_pathway(), and GetCCHashEqFuncs().

#define INT4ARRAYOID   1007

Definition at line 452 of file pg_type.h.

#define INT4OID   23
#define INT4RANGEOID   3904

Definition at line 609 of file pg_type.h.

#define INT8OID   20
#define INTERNALOID   2281
#define INTERVALOID   1186
#define IsPolymorphicType (   typid  ) 
#define JSONOID   114

Definition at line 356 of file pg_type.h.

Referenced by array_to_json_internal(), composite_to_json(), json_agg_transfn(), and to_json().

#define LANGUAGE_HANDLEROID   2280

Definition at line 657 of file pg_type.h.

Referenced by CreateProceduralLanguage().

#define LINEOID   628

Definition at line 397 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define LSEGOID   601

Definition at line 384 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define MACADDROID   829

Definition at line 434 of file pg_type.h.

Referenced by convert_network_to_scalar(), and convert_to_scalar().

#define NAMEOID   19
#define Natts_pg_type   30

Definition at line 239 of file pg_type.h.

Referenced by RelationCacheInitializePhase3().

#define NUMERICOID   1700
#define OIDOID   26
#define OIDVECTOROID   30

Definition at line 344 of file pg_type.h.

Referenced by ecpg_is_type_an_array(), find_coercion_pathway(), and GetCCHashEqFuncs().

#define OPAQUEOID   2282
#define PATHOID   602

Definition at line 387 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define PGNODETREEOID   194

Definition at line 365 of file pg_type.h.

#define POINTOID   600

Definition at line 381 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define POLYGONOID   604

Definition at line 393 of file pg_type.h.

Referenced by ecpg_is_type_an_array().

#define RECORDARRAYOID   2287
#define RECORDOID   2249
#define REFCURSOROID   1790

Definition at line 541 of file pg_type.h.

Referenced by fetch_cursor_param_value(), and transformCurrentOfExpr().

#define REGCLASSOID   2205
#define REGCONFIGOID   3734
#define REGDICTIONARYOID   3769
#define REGOPERATOROID   2204
#define REGOPEROID   2203
#define REGPROCEDUREOID   2202
#define REGPROCOID   24
#define REGTYPEARRAYOID   2211

Definition at line 571 of file pg_type.h.

Referenced by pg_prepared_statement().

#define REGTYPEOID   2206
#define RELTIMEOID   703
#define TEXTARRAYOID   1009

Definition at line 455 of file pg_type.h.

Referenced by do_compile(), and show_all_settings().

#define TEXTOID   25

Definition at line 324 of file pg_type.h.

Referenced by aclexplode(), build_function_result_tupdesc_d(), build_regexp_matches_result(), convert_string_datum(), convert_to_scalar(), create_empty_extension(), dblink_get_connections(), dblink_get_notify(), dblink_get_pkey(), DecodeTextArrayToCString(), do_compile(), ecpg_dynamic_type(), ecpg_is_type_an_array(), examine_parameter_list(), exec_assign_c_string(), extension_config_remove(), filter_list_to_array(), get_func_arg_info(), get_func_input_arg_names(), get_func_result_name(), get_path_all(), get_text_array_contents(), GetCCHashEqFuncs(), GetPGVariableResultDesc(), ghstore_consistent(), gin_extract_hstore_query(), GUCArrayAdd(), GUCArrayDelete(), GUCArrayReset(), hstore_akeys(), hstore_avals(), hstore_from_array(), hstore_from_arrays(), hstore_slice_to_array(), hstore_to_array_internal(), hstoreArrayToPairs(), IdentifySystem(), insert_username(), is_text_type(), like_fixed_prefix(), map_sql_type_to_xmlschema_type(), materializeQueryResult(), materializeResult(), optionListToArray(), parseRelOptions(), patternsel(), pg_cursor(), pg_extension_config_dump(), pg_get_functiondef(), pg_get_keywords(), pg_get_multixact_members(), pg_identify_object(), pg_lock_status(), pg_logdir_ls(), pg_prepared_statement(), pg_prepared_xact(), pg_stat_get_activity(), pg_timezone_abbrevs(), pg_timezone_names(), pg_xlogfile_name_offset(), plpgsql_exec_trigger(), prefix_quals(), ProcessGUCArray(), prs_setup_firstcall(), regexp_split_to_array(), SendBackupHeader(), SendTimeLineHistory(), SendXlogRecPtrResult(), show_all_settings(), show_trgm(), ShowAllGUCConfig(), ShowGUCConfigOption(), sqlda_dynamic_type(), string_to_const(), text_to_array_internal(), timetravel(), transformCaseExpr(), transformGenericOptions(), transformRelOptions(), transformXmlExpr(), transformXmlSerialize(), ts_lexize(), ts_setup_firstcall(), tsquerysel(), tt_setup_firstcall(), untransformRelOptions(), and validateConnectbyTupleDesc().

#define TIDOID   27
#define TIMEOID   1083
#define TIMESTAMPOID   1114
#define TIMESTAMPTZOID   1184
#define TIMETZOID   1266
#define TINTERVALOID   704
#define TRIGGEROID   2279
#define TSQUERYOID   3615

Definition at line 588 of file pg_type.h.

Referenced by tsa_rewrite_accum(), tsmatchsel(), and tsquery_rewrite_query().

#define TSVECTOROID   3614

Definition at line 582 of file pg_type.h.

Referenced by ts_stat_sql(), tsmatchsel(), and tsvector_update_trigger().

#define TYPCATEGORY_ARRAY   'A'
#define TYPCATEGORY_BITSTRING   'V'

Definition at line 698 of file pg_type.h.

#define TYPCATEGORY_BOOLEAN   'B'

Definition at line 686 of file pg_type.h.

Referenced by datum_to_json().

#define TYPCATEGORY_COMPOSITE   'C'

Definition at line 687 of file pg_type.h.

Referenced by AddNewRelationType(), datum_to_json(), and json_agg_transfn().

#define TYPCATEGORY_DATETIME   'D'

Definition at line 688 of file pg_type.h.

#define TYPCATEGORY_ENUM   'E'

Definition at line 689 of file pg_type.h.

Referenced by DefineEnum().

#define TYPCATEGORY_GEOMETRIC   'G'

Definition at line 690 of file pg_type.h.

#define TYPCATEGORY_INVALID   '\0'

Definition at line 684 of file pg_type.h.

Referenced by func_select_candidate(), IsPreferredType(), and TypeCategory().

#define TYPCATEGORY_NETWORK   'I'

Definition at line 691 of file pg_type.h.

#define TYPCATEGORY_NUMERIC   'N'

Definition at line 692 of file pg_type.h.

Referenced by datum_to_json().

#define TYPCATEGORY_PSEUDOTYPE   'P'

Definition at line 693 of file pg_type.h.

Referenced by TypeShellMake().

#define TYPCATEGORY_RANGE   'R'

Definition at line 694 of file pg_type.h.

Referenced by DefineRange().

#define TYPCATEGORY_STRING   'S'

Definition at line 695 of file pg_type.h.

Referenced by find_coercion_pathway(), func_get_detail(), and func_select_candidate().

#define TYPCATEGORY_TIMESPAN   'T'

Definition at line 696 of file pg_type.h.

#define TYPCATEGORY_UNKNOWN   'X'

Definition at line 699 of file pg_type.h.

#define TYPCATEGORY_USER   'U'

Definition at line 697 of file pg_type.h.

#define TypeRelation_Rowtype_Id   71

Definition at line 35 of file pg_type.h.

Referenced by RelationCacheInitializePhase3().

#define TypeRelationId   1247
#define TYPTYPE_BASE   'b'
#define TYPTYPE_COMPOSITE   'c'
#define TYPTYPE_DOMAIN   'd'
#define TYPTYPE_ENUM   'e'
#define TYPTYPE_PSEUDO   'p'
#define TYPTYPE_RANGE   'r'
#define UNKNOWNOID   705
#define UUIDOID   2950

Definition at line 576 of file pg_type.h.

#define VARBITOID   1562
#define VARCHAROID   1043
#define VOIDOID   2278
#define XIDOID   28
#define XMLOID   142

Typedef Documentation

Definition at line 233 of file pg_type.h.


Function Documentation

CATALOG ( pg_type  ,
1247   
)

Definition at line 37 of file pg_type.h.

{
    NameData    typname;        /* type name */
    Oid         typnamespace;   /* OID of namespace containing this type */
    Oid         typowner;       /* type owner */

    /*
     * For a fixed-size type, typlen is the number of bytes we use to
     * represent a value of this type, e.g. 4 for an int4.  But for a
     * variable-length type, typlen is negative.  We use -1 to indicate a
     * "varlena" type (one that has a length word), -2 to indicate a
     * null-terminated C string.
     */
    int16       typlen;

    /*
     * typbyval determines whether internal Postgres routines pass a value of
     * this type by value or by reference.  typbyval had better be FALSE if
     * the length is not 1, 2, or 4 (or 8 on 8-byte-Datum machines).
     * Variable-length types are always passed by reference. Note that
     * typbyval can be false even if the length would allow pass-by-value;
     * this is currently true for type float4, for example.
     */
    bool        typbyval;

    /*
     * typtype is 'b' for a base type, 'c' for a composite type (e.g., a
     * table's rowtype), 'd' for a domain, 'e' for an enum type, 'p' for a
     * pseudo-type, or 'r' for a range type. (Use the TYPTYPE macros below.)
     *
     * If typtype is 'c', typrelid is the OID of the class' entry in pg_class.
     */
    char        typtype;

    /*
     * typcategory and typispreferred help the parser distinguish preferred
     * and non-preferred coercions.  The category can be any single ASCII
     * character (but not \0).  The categories used for built-in types are
     * identified by the TYPCATEGORY macros below.
     */
    char        typcategory;    /* arbitrary type classification */

    bool        typispreferred; /* is type "preferred" within its category? */

    /*
     * If typisdefined is false, the entry is only a placeholder (forward
     * reference).  We know the type name, but not yet anything else about it.
     */
    bool        typisdefined;

    char        typdelim;       /* delimiter for arrays of this type */

    Oid         typrelid;       /* 0 if not a composite type */

    /*
     * If typelem is not 0 then it identifies another row in pg_type. The
     * current type can then be subscripted like an array yielding values of
     * type typelem. A non-zero typelem does not guarantee this type to be a
     * "real" array type; some ordinary fixed-length types can also be
     * subscripted (e.g., name, point). Variable-length types can *not* be
     * turned into pseudo-arrays like that. Hence, the way to determine
     * whether a type is a "true" array type is if:
     *
     * typelem != 0 and typlen == -1.
     */
    Oid         typelem;

    /*
     * If there is a "true" array type having this type as element type,
     * typarray links to it.  Zero if no associated "true" array type.
     */
    Oid         typarray;

    /*
     * I/O conversion procedures for the datatype.
     */
    regproc     typinput;       /* text format (required) */
    regproc     typoutput;
    regproc     typreceive;     /* binary format (optional) */
    regproc     typsend;

    /*
     * I/O functions for optional type modifiers.
     */
    regproc     typmodin;
    regproc     typmodout;

    /*
     * Custom ANALYZE procedure for the datatype (0 selects the default).
     */
    regproc     typanalyze;

    /* ----------------
     * typalign is the alignment required when storing a value of this
     * type.  It applies to storage on disk as well as most
     * representations of the value inside Postgres.  When multiple values
     * are stored consecutively, such as in the representation of a
     * complete row on disk, padding is inserted before a datum of this
     * type so that it begins on the specified boundary.  The alignment
     * reference is the beginning of the first datum in the sequence.
     *
     * 'c' = CHAR alignment, ie no alignment needed.
     * 's' = SHORT alignment (2 bytes on most machines).
     * 'i' = INT alignment (4 bytes on most machines).
     * 'd' = DOUBLE alignment (8 bytes on many machines, but by no means all).
     *
     * See include/access/tupmacs.h for the macros that compute these
     * alignment requirements.  Note also that we allow the nominal alignment
     * to be violated when storing "packed" varlenas; the TOAST mechanism
     * takes care of hiding that from most code.
     *
     * NOTE: for types used in system tables, it is critical that the
     * size and alignment defined in pg_type agree with the way that the
     * compiler will lay out the field in a struct representing a table row.
     * ----------------
     */
    char        typalign;

    /* ----------------
     * typstorage tells if the type is prepared for toasting and what
     * the default strategy for attributes of this type should be.
     *
     * 'p' PLAIN      type not prepared for toasting
     * 'e' EXTERNAL   external storage possible, don't try to compress
     * 'x' EXTENDED   try to compress and store external if required
     * 'm' MAIN       like 'x' but try to keep in main tuple
     * ----------------
     */
    char        typstorage;

    /*
     * This flag represents a "NOT NULL" constraint against this datatype.
     *
     * If true, the attnotnull column for a corresponding table column using
     * this datatype will always enforce the NOT NULL constraint.
     *
     * Used primarily for domain types.
     */
    bool        typnotnull;

    /*
     * Domains use typbasetype to show the base (or domain) type that the
     * domain is based on.  Zero if the type is not a domain.
     */
    Oid         typbasetype;

    /*
     * Domains use typtypmod to record the typmod to be applied to their base
     * type (-1 if base type does not use a typmod).  -1 if this type is not a
     * domain.
     */
    int32       typtypmod;

    /*
     * typndims is the declared number of dimensions for an array domain type
     * (i.e., typbasetype is an array type).  Otherwise zero.
     */
    int32       typndims;

    /*
     * Collation: 0 if type cannot use collations, DEFAULT_COLLATION_OID for
     * collatable base types, possibly other OID for domains
     */
    Oid         typcollation;

#ifdef CATALOG_VARLEN           /* variable-length fields start here */

    /*
     * If typdefaultbin is not NULL, it is the nodeToString representation of
     * a default expression for the type.  Currently this is only used for
     * domains.
     */
    pg_node_tree typdefaultbin;

    /*
     * typdefault is NULL if the type has no associated default value. If
     * typdefaultbin is not NULL, typdefault must contain a human-readable
     * version of the default expression represented by typdefaultbin. If
     * typdefaultbin is NULL and typdefault is not, then typdefault is the
     * external representation of the type's default value, which may be fed
     * to the type's input converter to produce a constant.
     */
    text        typdefault;

    /*
     * Access permissions
     */
    aclitem     typacl[1];
#endif
} FormData_pg_type;

DATA ( insert  OID = 16(boolPGNSP PGUID 1 t b B t t\054 00 1000 boolin boolout boolrecv boolsend---c p f 0-1 0 0 _null_ _null_ _null_)  ) 
DESCR ( "range of dates  ) 
DESCR ( "range of timestamps with time zone  ) 
DESCR ( "range of timestamps without time zone  ) 
DESCR ( "range of numerics"   ) 
DESCR ( "range of integers"   ) 
DESCR ( "txid snapshot"   ) 
DESCR ( "registered text search dictionary"   ) 
DESCR ( "registered text search configuration"   ) 
DESCR ( "query representation for text search"   ) 
DESCR ( "GiST index internal text representation for text search"   ) 
DESCR ( "text representation for text search"   ) 
DESCR ( "UUID datatype"   ) 
DESCR ( "registered type"   ) 
DESCR ( "registered class"   ) 
DESCR ( "registered operator (with args)"   ) 
DESCR ( "registered operator"   ) 
DESCR ( "registered procedure (with args)"   ) 
DESCR ( "reference to cursor (portal name)"   ) 
DESCR ( numericprecision, decimal,
arbitrary precision number"   
)
DESCR ( "variable-length bit string  ) 
DESCR ( "fixed-length bit string  ) 
DESCR ( "time of day with time zone  ) 
DESCR ( "@ <number> <units>  ,
time interval  
)
DESCR ( "date and time with time zone  ) 
DESCR ( "date and time"   ) 
DESCR ( "time of day"   ) 
DESCR ( "date"   ) 
DESCR ( varcharlength,
non-blank-padded  string,
variable storage length"   
)
DESCR ( charlength,
blank-padded  string,
fixed storage length"   
)
DESCR ( "access control list"   ) 
DESCR ( "network IP address/  netmask,
network address"   
)
DESCR ( "IP address/  netmask,
host  address,
netmask optional"   
)
DESCR ( "XX:XX:XX:XX:XX:XX  ,
MAC address"   
)
DESCR ( "monetary   amounts,
d,
ddd.cc"   
)
DESCR ( "geometric circle '(center,radius)'"   ) 
DESCR ( abstime,abstime,
time interval  
)
DESCR ( relative,
limited-range time interval(Unix delta time)"   
)
DESCR ( absolute,
limited-range date and time(Unix system time)"   
)
DESCR ( "double-precision floating point   number,
8-byte storage"   
)
DESCR ( "single-precision floating point   number,
4-byte storage"   
)
DESCR ( ""   ) 
DESCR ( "geometric line (not implemented)"   ) 
DESCR ( "geometric polygon '(pt1,...)'"   ) 
DESCR ( "geometric box '(lower left,upper right)'"   ) 
DESCR ( "geometric path '(pt1,...)'"   ) 
DESCR ( "geometric line segment '(pt1,pt2)'"   ) 
DESCR ( "geometric point '(x, y)'"   ) 
DESCR ( "storage manager"   ) 
DESCR ( "string representing an internal node tree  ) 
DESCR ( "XML content"   ) 
DESCR ( "command identifier   type,
sequence in transaction id"   
)
DESCR ( "transaction id"   ) 
DESCR ( block, offset,
physical location of tuple"   
)
DESCR ( "object   identifieroid,
maximum 4 billion"   
)
DESCR ( "variable-length   string,
no limit specified"   
)
DESCR ( "registered procedure"   ) 
DESCR ( "-2 billion to 2 billion   integer,
4-byte storage"   
)
DESCR ( "array of   int2,
used in system tables"   
)
DESCR ( "-32 thousand to 32   thousand,
2-byte storage"   
)
DESCR ( "~18 digit   integer,
8-byte storage"   
)
DESCR ( "63-byte type for storing system identifiers"   ) 
DESCR ( "single character"   ) 
DESCR ( "variable-length   string,
binary values escaped"   
)
DESCR ( boolean,
'true'/'false'"   
)
DESCR ( "range of bigints"   ) 

Variable Documentation

Definition at line 226 of file pg_type.h.