postgresql/src/include/catalog/pg_type.dat

943 lines
52 KiB
Plaintext
Raw Normal View History

Replace our traditional initial-catalog-data format with a better design. Historically, the initial catalog data to be installed during bootstrap has been written in DATA() lines in the catalog header files. This had lots of disadvantages: the format was badly underdocumented, it was very difficult to edit the data in any mechanized way, and due to the lack of any abstraction the data was verbose, hard to read/understand, and easy to get wrong. Hence, move this data into separate ".dat" files and represent it in a way that can easily be read and rewritten by Perl scripts. The new format is essentially "key => value" for each column; while it's a bit repetitive, explicit labeling of each value makes the data far more readable and less error-prone. Provide a way to abbreviate entries by omitting field values that match a specified default value for their column. This allows removal of a large amount of repetitive boilerplate and also lowers the barrier to adding new columns. Also teach genbki.pl how to translate symbolic OID references into numeric OIDs for more cases than just "regproc"-like pg_proc references. It can now do that for regprocedure-like references (thus solving the problem that regproc is ambiguous for overloaded functions), operators, types, opfamilies, opclasses, and access methods. Use this to turn nearly all OID cross-references in the initial data into symbolic form. This represents a very large step forward in readability and error resistance of the initial catalog data. It should also reduce the difficulty of renumbering OID assignments in uncommitted patches. Also, solve the longstanding problem that frontend code that would like to use OID macros and other information from the catalog headers often had difficulty with backend-only code in the headers. To do this, arrange for all generated macros, plus such other declarations as we deem fit, to be placed in "derived" header files that are safe for frontend inclusion. (Once clients migrate to using these pg_*_d.h headers, it will be possible to get rid of the pg_*_fn.h headers, which only exist to quarantine code away from clients. That is left for follow-on patches, however.) The now-automatically-generated macros include the Anum_xxx and Natts_xxx constants that we used to have to update by hand when adding or removing catalog columns. Replace the former manual method of generating OID macros for pg_type entries with an automatic method, ensuring that all built-in types have OID macros. (But note that this patch does not change the way that OID macros for pg_proc entries are built and used. It's not clear that making that match the other catalogs would be worth extra code churn.) Add SGML documentation explaining what the new data format is and how to work with it. Despite being a very large change in the catalog headers, there is no catversion bump here, because postgres.bki and related output files haven't changed at all. John Naylor, based on ideas from various people; review and minor additional coding by me; previous review by Alvaro Herrera Discussion: https://postgr.es/m/CAJVSVGWO48JbbwXkJz_yBFyGYW-M9YWxnPdxJBUosDC9ou_F0Q@mail.gmail.com
2018-04-08 19:16:50 +02:00
#----------------------------------------------------------------------
#
# pg_type.dat
# Initial contents of the pg_type system relation.
#
# Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# src/include/catalog/pg_type.dat
#
#----------------------------------------------------------------------
[
# For types used in the system catalogs, make sure the values here match
# TypInfo[] in bootstrap.c.
# OID symbol macro names for pg_type OIDs are generated by genbki.pl
# according to the following rule, so you don't need to specify them
# here:
# foo_bar -> FOO_BAROID
# _foo_bar -> FOO_BARARRAYOID
#
# The only oid_symbol entries in this file are for names that don't match
# this rule, and are grandfathered in.
# Once upon a time these entries were ordered by OID. Lately it's often
# been the custom to insert new entries adjacent to related older entries.
# Try to do one or the other though, don't just insert entries at random.
# OIDS 1 - 99
{ oid => '16', descr => 'boolean, \'true\'/\'false\'',
typname => 'bool', typlen => '1', typbyval => 't', typcategory => 'B',
typispreferred => 't', typarray => '_bool', typinput => 'boolin',
typoutput => 'boolout', typreceive => 'boolrecv', typsend => 'boolsend',
typalign => 'c' },
{ oid => '17', descr => 'variable-length string, binary values escaped',
typname => 'bytea', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_bytea', typinput => 'byteain', typoutput => 'byteaout',
typreceive => 'bytearecv', typsend => 'byteasend', typalign => 'i',
typstorage => 'x' },
{ oid => '18', descr => 'single character',
typname => 'char', typlen => '1', typbyval => 't', typcategory => 'S',
typarray => '_char', typinput => 'charin', typoutput => 'charout',
typreceive => 'charrecv', typsend => 'charsend', typalign => 'c' },
{ oid => '19', descr => '63-byte type for storing system identifiers',
typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f',
typcategory => 'S', typelem => 'char', typarray => '_name',
typinput => 'namein', typoutput => 'nameout', typreceive => 'namerecv',
typsend => 'namesend', typalign => 'c' },
{ oid => '20', descr => '~18 digit integer, 8-byte storage',
typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typarray => '_int8', typinput => 'int8in',
typoutput => 'int8out', typreceive => 'int8recv', typsend => 'int8send',
typalign => 'd' },
{ oid => '21', descr => '-32 thousand to 32 thousand, 2-byte storage',
typname => 'int2', typlen => '2', typbyval => 't', typcategory => 'N',
typarray => '_int2', typinput => 'int2in', typoutput => 'int2out',
typreceive => 'int2recv', typsend => 'int2send', typalign => 's' },
{ oid => '22', descr => 'array of int2, used in system tables',
typname => 'int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2', typarray => '_int2vector', typinput => 'int2vectorin',
typoutput => 'int2vectorout', typreceive => 'int2vectorrecv',
typsend => 'int2vectorsend', typalign => 'i' },
{ oid => '23', descr => '-2 billion to 2 billion integer, 4-byte storage',
typname => 'int4', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_int4', typinput => 'int4in', typoutput => 'int4out',
typreceive => 'int4recv', typsend => 'int4send', typalign => 'i' },
{ oid => '24', descr => 'registered procedure',
typname => 'regproc', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regproc', typinput => 'regprocin', typoutput => 'regprocout',
typreceive => 'regprocrecv', typsend => 'regprocsend', typalign => 'i' },
{ oid => '25', descr => 'variable-length string, no limit specified',
typname => 'text', typlen => '-1', typbyval => 'f', typcategory => 'S',
typispreferred => 't', typarray => '_text', typinput => 'textin',
typoutput => 'textout', typreceive => 'textrecv', typsend => 'textsend',
typalign => 'i', typstorage => 'x', typcollation => '100' },
{ oid => '26', descr => 'object identifier(oid), maximum 4 billion',
typname => 'oid', typlen => '4', typbyval => 't', typcategory => 'N',
typispreferred => 't', typarray => '_oid', typinput => 'oidin',
typoutput => 'oidout', typreceive => 'oidrecv', typsend => 'oidsend',
typalign => 'i' },
{ oid => '27', descr => '(block, offset), physical location of tuple',
typname => 'tid', typlen => '6', typbyval => 'f', typcategory => 'U',
typarray => '_tid', typinput => 'tidin', typoutput => 'tidout',
typreceive => 'tidrecv', typsend => 'tidsend', typalign => 's' },
{ oid => '28', descr => 'transaction id',
typname => 'xid', typlen => '4', typbyval => 't', typcategory => 'U',
typarray => '_xid', typinput => 'xidin', typoutput => 'xidout',
typreceive => 'xidrecv', typsend => 'xidsend', typalign => 'i' },
{ oid => '29', descr => 'command identifier type, sequence in transaction id',
typname => 'cid', typlen => '4', typbyval => 't', typcategory => 'U',
typarray => '_cid', typinput => 'cidin', typoutput => 'cidout',
typreceive => 'cidrecv', typsend => 'cidsend', typalign => 'i' },
{ oid => '30', descr => 'array of oids, used in system tables',
typname => 'oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oid', typarray => '_oidvector', typinput => 'oidvectorin',
typoutput => 'oidvectorout', typreceive => 'oidvectorrecv',
typsend => 'oidvectorsend', typalign => 'i' },
# hand-built rowtype entries for bootstrapped catalogs
# NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations
{ oid => '71',
typname => 'pg_type', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1247', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '75',
typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1249', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '81',
typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1255', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '83',
typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => '1259', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
# OIDS 100 - 199
{ oid => '114',
typname => 'json', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_json', typinput => 'json_in', typoutput => 'json_out',
typreceive => 'json_recv', typsend => 'json_send', typalign => 'i',
typstorage => 'x' },
{ oid => '142', descr => 'XML content',
typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_xml', typinput => 'xml_in', typoutput => 'xml_out',
typreceive => 'xml_recv', typsend => 'xml_send', typalign => 'i',
typstorage => 'x' },
{ oid => '143',
typname => '_xml', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'xml', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '199',
typname => '_json', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'json', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '194', oid_symbol => 'PGNODETREEOID',
descr => 'string representing an internal node tree',
typname => 'pg_node_tree', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_node_tree_in',
typoutput => 'pg_node_tree_out', typreceive => 'pg_node_tree_recv',
typsend => 'pg_node_tree_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '3361', oid_symbol => 'PGNDISTINCTOID',
descr => 'multivariate ndistinct coefficients',
typname => 'pg_ndistinct', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_ndistinct_in',
typoutput => 'pg_ndistinct_out', typreceive => 'pg_ndistinct_recv',
typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '3402', oid_symbol => 'PGDEPENDENCIESOID',
descr => 'multivariate dependencies',
typname => 'pg_dependencies', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_dependencies_in',
typoutput => 'pg_dependencies_out', typreceive => 'pg_dependencies_recv',
typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '32', oid_symbol => 'PGDDLCOMMANDOID',
descr => 'internal type for passing CollectedCommand',
typname => 'pg_ddl_command', typlen => 'SIZEOF_POINTER', typbyval => 't',
typtype => 'p', typcategory => 'P', typinput => 'pg_ddl_command_in',
typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv',
typsend => 'pg_ddl_command_send', typalign => 'ALIGNOF_POINTER' },
# OIDS 200 - 299
{ oid => '210', descr => 'storage manager',
typname => 'smgr', typlen => '2', typbyval => 't', typcategory => 'U',
typinput => 'smgrin', typoutput => 'smgrout', typreceive => '-',
typsend => '-', typalign => 's' },
# OIDS 600 - 699
{ oid => '600', descr => 'geometric point \'(x, y)\'',
typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typarray => '_point', typinput => 'point_in',
typoutput => 'point_out', typreceive => 'point_recv', typsend => 'point_send',
typalign => 'd' },
{ oid => '601', descr => 'geometric line segment \'(pt1,pt2)\'',
typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G',
typelem => 'point', typarray => '_lseg', typinput => 'lseg_in',
typoutput => 'lseg_out', typreceive => 'lseg_recv', typsend => 'lseg_send',
typalign => 'd' },
{ oid => '602', descr => 'geometric path \'(pt1,...)\'',
typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G',
typarray => '_path', typinput => 'path_in', typoutput => 'path_out',
typreceive => 'path_recv', typsend => 'path_send', typalign => 'd',
typstorage => 'x' },
{ oid => '603', descr => 'geometric box \'(lower left,upper right)\'',
typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G',
typdelim => ';', typelem => 'point', typarray => '_box', typinput => 'box_in',
typoutput => 'box_out', typreceive => 'box_recv', typsend => 'box_send',
typalign => 'd' },
Replace our traditional initial-catalog-data format with a better design. Historically, the initial catalog data to be installed during bootstrap has been written in DATA() lines in the catalog header files. This had lots of disadvantages: the format was badly underdocumented, it was very difficult to edit the data in any mechanized way, and due to the lack of any abstraction the data was verbose, hard to read/understand, and easy to get wrong. Hence, move this data into separate ".dat" files and represent it in a way that can easily be read and rewritten by Perl scripts. The new format is essentially "key => value" for each column; while it's a bit repetitive, explicit labeling of each value makes the data far more readable and less error-prone. Provide a way to abbreviate entries by omitting field values that match a specified default value for their column. This allows removal of a large amount of repetitive boilerplate and also lowers the barrier to adding new columns. Also teach genbki.pl how to translate symbolic OID references into numeric OIDs for more cases than just "regproc"-like pg_proc references. It can now do that for regprocedure-like references (thus solving the problem that regproc is ambiguous for overloaded functions), operators, types, opfamilies, opclasses, and access methods. Use this to turn nearly all OID cross-references in the initial data into symbolic form. This represents a very large step forward in readability and error resistance of the initial catalog data. It should also reduce the difficulty of renumbering OID assignments in uncommitted patches. Also, solve the longstanding problem that frontend code that would like to use OID macros and other information from the catalog headers often had difficulty with backend-only code in the headers. To do this, arrange for all generated macros, plus such other declarations as we deem fit, to be placed in "derived" header files that are safe for frontend inclusion. (Once clients migrate to using these pg_*_d.h headers, it will be possible to get rid of the pg_*_fn.h headers, which only exist to quarantine code away from clients. That is left for follow-on patches, however.) The now-automatically-generated macros include the Anum_xxx and Natts_xxx constants that we used to have to update by hand when adding or removing catalog columns. Replace the former manual method of generating OID macros for pg_type entries with an automatic method, ensuring that all built-in types have OID macros. (But note that this patch does not change the way that OID macros for pg_proc entries are built and used. It's not clear that making that match the other catalogs would be worth extra code churn.) Add SGML documentation explaining what the new data format is and how to work with it. Despite being a very large change in the catalog headers, there is no catversion bump here, because postgres.bki and related output files haven't changed at all. John Naylor, based on ideas from various people; review and minor additional coding by me; previous review by Alvaro Herrera Discussion: https://postgr.es/m/CAJVSVGWO48JbbwXkJz_yBFyGYW-M9YWxnPdxJBUosDC9ou_F0Q@mail.gmail.com
2018-04-08 19:16:50 +02:00
{ oid => '604', descr => 'geometric polygon \'(pt1,...)\'',
typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G',
typarray => '_polygon', typinput => 'poly_in', typoutput => 'poly_out',
typreceive => 'poly_recv', typsend => 'poly_send', typalign => 'd',
typstorage => 'x' },
{ oid => '628', descr => 'geometric line',
typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typarray => '_line', typinput => 'line_in',
typoutput => 'line_out', typreceive => 'line_recv', typsend => 'line_send',
typalign => 'd' },
{ oid => '629',
typname => '_line', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'line', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 700 - 799
{ oid => '700',
descr => 'single-precision floating point number, 4-byte storage',
typname => 'float4', typlen => '4', typbyval => 'FLOAT4PASSBYVAL',
typcategory => 'N', typarray => '_float4', typinput => 'float4in',
typoutput => 'float4out', typreceive => 'float4recv', typsend => 'float4send',
typalign => 'i' },
{ oid => '701',
descr => 'double-precision floating point number, 8-byte storage',
typname => 'float8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typispreferred => 't', typarray => '_float8',
typinput => 'float8in', typoutput => 'float8out', typreceive => 'float8recv',
typsend => 'float8send', typalign => 'd' },
{ oid => '702',
descr => 'absolute, limited-range date and time (Unix system time)',
typname => 'abstime', typlen => '4', typbyval => 't', typcategory => 'D',
typarray => '_abstime', typinput => 'abstimein', typoutput => 'abstimeout',
typreceive => 'abstimerecv', typsend => 'abstimesend', typalign => 'i' },
{ oid => '703',
descr => 'relative, limited-range time interval (Unix delta time)',
typname => 'reltime', typlen => '4', typbyval => 't', typcategory => 'T',
typarray => '_reltime', typinput => 'reltimein', typoutput => 'reltimeout',
typreceive => 'reltimerecv', typsend => 'reltimesend', typalign => 'i' },
{ oid => '704', descr => '(abstime,abstime), time interval',
typname => 'tinterval', typlen => '12', typbyval => 'f', typcategory => 'T',
typarray => '_tinterval', typinput => 'tintervalin',
typoutput => 'tintervalout', typreceive => 'tintervalrecv',
typsend => 'tintervalsend', typalign => 'i' },
{ oid => '705',
typname => 'unknown', typlen => '-2', typbyval => 'f', typtype => 'p',
typcategory => 'X', typinput => 'unknownin', typoutput => 'unknownout',
typreceive => 'unknownrecv', typsend => 'unknownsend', typalign => 'c' },
{ oid => '718', descr => 'geometric circle \'(center,radius)\'',
typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G',
typarray => '_circle', typinput => 'circle_in', typoutput => 'circle_out',
typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' },
{ oid => '719',
typname => '_circle', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'circle', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '790', oid_symbol => 'CASHOID',
descr => 'monetary amounts, $d,ddd.cc',
typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typarray => '_money', typinput => 'cash_in',
typoutput => 'cash_out', typreceive => 'cash_recv', typsend => 'cash_send',
typalign => 'd' },
{ oid => '791',
typname => '_money', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'money', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 800 - 899
{ oid => '829', descr => 'XX:XX:XX:XX:XX:XX, MAC address',
typname => 'macaddr', typlen => '6', typbyval => 'f', typcategory => 'U',
typarray => '_macaddr', typinput => 'macaddr_in', typoutput => 'macaddr_out',
typreceive => 'macaddr_recv', typsend => 'macaddr_send', typalign => 'i' },
{ oid => '869', descr => 'IP address/netmask, host address, netmask optional',
typname => 'inet', typlen => '-1', typbyval => 'f', typcategory => 'I',
typispreferred => 't', typarray => '_inet', typinput => 'inet_in',
typoutput => 'inet_out', typreceive => 'inet_recv', typsend => 'inet_send',
typalign => 'i', typstorage => 'm' },
{ oid => '650', descr => 'network IP address/netmask, network address',
typname => 'cidr', typlen => '-1', typbyval => 'f', typcategory => 'I',
typarray => '_cidr', typinput => 'cidr_in', typoutput => 'cidr_out',
typreceive => 'cidr_recv', typsend => 'cidr_send', typalign => 'i',
typstorage => 'm' },
{ oid => '774', descr => 'XX:XX:XX:XX:XX:XX:XX:XX, MAC address',
typname => 'macaddr8', typlen => '8', typbyval => 'f', typcategory => 'U',
typarray => '_macaddr8', typinput => 'macaddr8_in',
typoutput => 'macaddr8_out', typreceive => 'macaddr8_recv',
typsend => 'macaddr8_send', typalign => 'i' },
# OIDS 1000 - 1099
{ oid => '1000',
typname => '_bool', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bool', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1001',
typname => '_bytea', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bytea', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1002',
typname => '_char', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'char', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1003',
typname => '_name', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'name', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1005',
typname => '_int2', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1006',
typname => '_int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2vector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1007',
typname => '_int4', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int4', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1008',
typname => '_regproc', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regproc', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1009',
typname => '_text', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'text', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1028',
typname => '_oid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1010',
typname => '_tid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1011',
typname => '_xid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'xid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1012',
typname => '_cid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1013',
typname => '_oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oidvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1014',
typname => '_bpchar', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bpchar', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'bpchartypmodin', typmodout => 'bpchartypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1015',
typname => '_varchar', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'varchar', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'varchartypmodin', typmodout => 'varchartypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x',
typcollation => '100' },
{ oid => '1016',
typname => '_int8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1017',
typname => '_point', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'point', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1018',
typname => '_lseg', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'lseg', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1019',
typname => '_path', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'path', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1020',
typname => '_box', typlen => '-1', typbyval => 'f', typcategory => 'A',
typdelim => ';', typelem => 'box', typinput => 'array_in',
Replace our traditional initial-catalog-data format with a better design. Historically, the initial catalog data to be installed during bootstrap has been written in DATA() lines in the catalog header files. This had lots of disadvantages: the format was badly underdocumented, it was very difficult to edit the data in any mechanized way, and due to the lack of any abstraction the data was verbose, hard to read/understand, and easy to get wrong. Hence, move this data into separate ".dat" files and represent it in a way that can easily be read and rewritten by Perl scripts. The new format is essentially "key => value" for each column; while it's a bit repetitive, explicit labeling of each value makes the data far more readable and less error-prone. Provide a way to abbreviate entries by omitting field values that match a specified default value for their column. This allows removal of a large amount of repetitive boilerplate and also lowers the barrier to adding new columns. Also teach genbki.pl how to translate symbolic OID references into numeric OIDs for more cases than just "regproc"-like pg_proc references. It can now do that for regprocedure-like references (thus solving the problem that regproc is ambiguous for overloaded functions), operators, types, opfamilies, opclasses, and access methods. Use this to turn nearly all OID cross-references in the initial data into symbolic form. This represents a very large step forward in readability and error resistance of the initial catalog data. It should also reduce the difficulty of renumbering OID assignments in uncommitted patches. Also, solve the longstanding problem that frontend code that would like to use OID macros and other information from the catalog headers often had difficulty with backend-only code in the headers. To do this, arrange for all generated macros, plus such other declarations as we deem fit, to be placed in "derived" header files that are safe for frontend inclusion. (Once clients migrate to using these pg_*_d.h headers, it will be possible to get rid of the pg_*_fn.h headers, which only exist to quarantine code away from clients. That is left for follow-on patches, however.) The now-automatically-generated macros include the Anum_xxx and Natts_xxx constants that we used to have to update by hand when adding or removing catalog columns. Replace the former manual method of generating OID macros for pg_type entries with an automatic method, ensuring that all built-in types have OID macros. (But note that this patch does not change the way that OID macros for pg_proc entries are built and used. It's not clear that making that match the other catalogs would be worth extra code churn.) Add SGML documentation explaining what the new data format is and how to work with it. Despite being a very large change in the catalog headers, there is no catversion bump here, because postgres.bki and related output files haven't changed at all. John Naylor, based on ideas from various people; review and minor additional coding by me; previous review by Alvaro Herrera Discussion: https://postgr.es/m/CAJVSVGWO48JbbwXkJz_yBFyGYW-M9YWxnPdxJBUosDC9ou_F0Q@mail.gmail.com
2018-04-08 19:16:50 +02:00
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1021',
typname => '_float4', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'float4', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1022',
typname => '_float8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'float8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1023',
typname => '_abstime', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'abstime', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1024',
typname => '_reltime', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'reltime', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1025',
typname => '_tinterval', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tinterval', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1027',
typname => '_polygon', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'polygon', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1033', descr => 'access control list',
typname => 'aclitem', typlen => '12', typbyval => 'f', typcategory => 'U',
typarray => '_aclitem', typinput => 'aclitemin', typoutput => 'aclitemout',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '1034',
typname => '_aclitem', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'aclitem', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1040',
typname => '_macaddr', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'macaddr', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '775',
typname => '_macaddr8', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'macaddr8', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1041',
typname => '_inet', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'inet', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '651',
typname => '_cidr', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cidr', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1263',
typname => '_cstring', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'cstring', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1042',
descr => 'char(length), blank-padded string, fixed storage length',
typname => 'bpchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
typarray => '_bpchar', typinput => 'bpcharin', typoutput => 'bpcharout',
typreceive => 'bpcharrecv', typsend => 'bpcharsend',
typmodin => 'bpchartypmodin', typmodout => 'bpchartypmodout', typalign => 'i',
typstorage => 'x', typcollation => '100' },
{ oid => '1043',
descr => 'varchar(length), non-blank-padded string, variable storage length',
typname => 'varchar', typlen => '-1', typbyval => 'f', typcategory => 'S',
typarray => '_varchar', typinput => 'varcharin', typoutput => 'varcharout',
typreceive => 'varcharrecv', typsend => 'varcharsend',
typmodin => 'varchartypmodin', typmodout => 'varchartypmodout',
typalign => 'i', typstorage => 'x', typcollation => '100' },
{ oid => '1082', descr => 'date',
typname => 'date', typlen => '4', typbyval => 't', typcategory => 'D',
typarray => '_date', typinput => 'date_in', typoutput => 'date_out',
typreceive => 'date_recv', typsend => 'date_send', typalign => 'i' },
{ oid => '1083', descr => 'time of day',
typname => 'time', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typarray => '_time', typinput => 'time_in',
typoutput => 'time_out', typreceive => 'time_recv', typsend => 'time_send',
typmodin => 'timetypmodin', typmodout => 'timetypmodout', typalign => 'd' },
# OIDS 1100 - 1199
{ oid => '1114', descr => 'date and time',
typname => 'timestamp', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typarray => '_timestamp', typinput => 'timestamp_in',
typoutput => 'timestamp_out', typreceive => 'timestamp_recv',
typsend => 'timestamp_send', typmodin => 'timestamptypmodin',
typmodout => 'timestamptypmodout', typalign => 'd' },
{ oid => '1115',
typname => '_timestamp', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'timestamp', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timestamptypmodin', typmodout => 'timestamptypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1182',
typname => '_date', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'date', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1183',
typname => '_time', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'time', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timetypmodin', typmodout => 'timetypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1184', descr => 'date and time with time zone',
typname => 'timestamptz', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'D', typispreferred => 't', typarray => '_timestamptz',
typinput => 'timestamptz_in', typoutput => 'timestamptz_out',
typreceive => 'timestamptz_recv', typsend => 'timestamptz_send',
typmodin => 'timestamptztypmodin', typmodout => 'timestamptztypmodout',
typalign => 'd' },
{ oid => '1185',
typname => '_timestamptz', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'timestamptz', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timestamptztypmodin', typmodout => 'timestamptztypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '1186', descr => '@ <number> <units>, time interval',
typname => 'interval', typlen => '16', typbyval => 'f', typcategory => 'T',
typispreferred => 't', typarray => '_interval', typinput => 'interval_in',
typoutput => 'interval_out', typreceive => 'interval_recv',
typsend => 'interval_send', typmodin => 'intervaltypmodin',
typmodout => 'intervaltypmodout', typalign => 'd' },
{ oid => '1187',
typname => '_interval', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'interval', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'intervaltypmodin', typmodout => 'intervaltypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 1200 - 1299
{ oid => '1231',
typname => '_numeric', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'numeric', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'numerictypmodin', typmodout => 'numerictypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1266', descr => 'time of day with time zone',
typname => 'timetz', typlen => '12', typbyval => 'f', typcategory => 'D',
typarray => '_timetz', typinput => 'timetz_in', typoutput => 'timetz_out',
typreceive => 'timetz_recv', typsend => 'timetz_send',
typmodin => 'timetztypmodin', typmodout => 'timetztypmodout',
typalign => 'd' },
{ oid => '1270',
typname => '_timetz', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'timetz', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'timetztypmodin', typmodout => 'timetztypmodout',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# OIDS 1500 - 1599
{ oid => '1560', descr => 'fixed-length bit string',
typname => 'bit', typlen => '-1', typbyval => 'f', typcategory => 'V',
typarray => '_bit', typinput => 'bit_in', typoutput => 'bit_out',
typreceive => 'bit_recv', typsend => 'bit_send', typmodin => 'bittypmodin',
typmodout => 'bittypmodout', typalign => 'i', typstorage => 'x' },
{ oid => '1561',
typname => '_bit', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'bit', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'bittypmodin', typmodout => 'bittypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '1562', descr => 'variable-length bit string',
typname => 'varbit', typlen => '-1', typbyval => 'f', typcategory => 'V',
typispreferred => 't', typarray => '_varbit', typinput => 'varbit_in',
typoutput => 'varbit_out', typreceive => 'varbit_recv',
typsend => 'varbit_send', typmodin => 'varbittypmodin',
typmodout => 'varbittypmodout', typalign => 'i', typstorage => 'x' },
{ oid => '1563',
typname => '_varbit', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'varbit', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typmodin => 'varbittypmodin', typmodout => 'varbittypmodout',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# OIDS 1700 - 1799
{ oid => '1700',
descr => 'numeric(precision, decimal), arbitrary precision number',
typname => 'numeric', typlen => '-1', typbyval => 'f', typcategory => 'N',
typarray => '_numeric', typinput => 'numeric_in', typoutput => 'numeric_out',
typreceive => 'numeric_recv', typsend => 'numeric_send',
typmodin => 'numerictypmodin', typmodout => 'numerictypmodout',
typalign => 'i', typstorage => 'm' },
{ oid => '1790', descr => 'reference to cursor (portal name)',
typname => 'refcursor', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_refcursor', typinput => 'textin', typoutput => 'textout',
typreceive => 'textrecv', typsend => 'textsend', typalign => 'i',
typstorage => 'x' },
# OIDS 2200 - 2299
{ oid => '2201',
typname => '_refcursor', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'refcursor', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2202', descr => 'registered procedure (with args)',
typname => 'regprocedure', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regprocedure', typinput => 'regprocedurein',
typoutput => 'regprocedureout', typreceive => 'regprocedurerecv',
typsend => 'regproceduresend', typalign => 'i' },
{ oid => '2203', descr => 'registered operator',
typname => 'regoper', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regoper', typinput => 'regoperin', typoutput => 'regoperout',
typreceive => 'regoperrecv', typsend => 'regopersend', typalign => 'i' },
{ oid => '2204', descr => 'registered operator (with args)',
typname => 'regoperator', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regoperator', typinput => 'regoperatorin',
typoutput => 'regoperatorout', typreceive => 'regoperatorrecv',
typsend => 'regoperatorsend', typalign => 'i' },
{ oid => '2205', descr => 'registered class',
typname => 'regclass', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regclass', typinput => 'regclassin', typoutput => 'regclassout',
typreceive => 'regclassrecv', typsend => 'regclasssend', typalign => 'i' },
{ oid => '2206', descr => 'registered type',
typname => 'regtype', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regtype', typinput => 'regtypein', typoutput => 'regtypeout',
typreceive => 'regtyperecv', typsend => 'regtypesend', typalign => 'i' },
{ oid => '4096', descr => 'registered role',
typname => 'regrole', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regrole', typinput => 'regrolein', typoutput => 'regroleout',
typreceive => 'regrolerecv', typsend => 'regrolesend', typalign => 'i' },
{ oid => '4089', descr => 'registered namespace',
typname => 'regnamespace', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regnamespace', typinput => 'regnamespacein',
typoutput => 'regnamespaceout', typreceive => 'regnamespacerecv',
typsend => 'regnamespacesend', typalign => 'i' },
{ oid => '2207',
typname => '_regprocedure', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regprocedure', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2208',
typname => '_regoper', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regoper', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2209',
typname => '_regoperator', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regoperator', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2210',
typname => '_regclass', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regclass', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2211',
typname => '_regtype', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regtype', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '4097',
typname => '_regrole', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regrole', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '4090',
typname => '_regnamespace', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regnamespace', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# uuid
{ oid => '2950', descr => 'UUID datatype',
typname => 'uuid', typlen => '16', typbyval => 'f', typcategory => 'U',
typarray => '_uuid', typinput => 'uuid_in', typoutput => 'uuid_out',
typreceive => 'uuid_recv', typsend => 'uuid_send', typalign => 'c' },
{ oid => '2951',
typname => '_uuid', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'uuid', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# pg_lsn
{ oid => '3220', oid_symbol => 'LSNOID', descr => 'PostgreSQL LSN datatype',
typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'U', typarray => '_pg_lsn', typinput => 'pg_lsn_in',
typoutput => 'pg_lsn_out', typreceive => 'pg_lsn_recv',
typsend => 'pg_lsn_send', typalign => 'd' },
{ oid => '3221',
typname => '_pg_lsn', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'pg_lsn', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# text search
{ oid => '3614', descr => 'text representation for text search',
typname => 'tsvector', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_tsvector', typinput => 'tsvectorin', typoutput => 'tsvectorout',
typreceive => 'tsvectorrecv', typsend => 'tsvectorsend',
typanalyze => 'ts_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3642',
descr => 'GiST index internal text representation for text search',
typname => 'gtsvector', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_gtsvector', typinput => 'gtsvectorin',
typoutput => 'gtsvectorout', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3615', descr => 'query representation for text search',
typname => 'tsquery', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_tsquery', typinput => 'tsqueryin', typoutput => 'tsqueryout',
typreceive => 'tsqueryrecv', typsend => 'tsquerysend', typalign => 'i' },
{ oid => '3734', descr => 'registered text search configuration',
typname => 'regconfig', typlen => '4', typbyval => 't', typcategory => 'N',
typarray => '_regconfig', typinput => 'regconfigin',
typoutput => 'regconfigout', typreceive => 'regconfigrecv',
typsend => 'regconfigsend', typalign => 'i' },
{ oid => '3769', descr => 'registered text search dictionary',
typname => 'regdictionary', typlen => '4', typbyval => 't',
typcategory => 'N', typarray => '_regdictionary',
typinput => 'regdictionaryin', typoutput => 'regdictionaryout',
typreceive => 'regdictionaryrecv', typsend => 'regdictionarysend',
typalign => 'i' },
{ oid => '3643',
typname => '_tsvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3644',
typname => '_gtsvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'gtsvector', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3645',
typname => '_tsquery', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsquery', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3735',
typname => '_regconfig', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'regconfig', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3770',
typname => '_regdictionary', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'regdictionary', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
# jsonb
{ oid => '3802', descr => 'Binary JSON',
typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U',
typarray => '_jsonb', typinput => 'jsonb_in', typoutput => 'jsonb_out',
typreceive => 'jsonb_recv', typsend => 'jsonb_send', typalign => 'i',
typstorage => 'x' },
{ oid => '3807',
typname => '_jsonb', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'jsonb', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '2970', descr => 'txid snapshot',
typname => 'txid_snapshot', typlen => '-1', typbyval => 'f',
typcategory => 'U', typarray => '_txid_snapshot',
typinput => 'txid_snapshot_in', typoutput => 'txid_snapshot_out',
typreceive => 'txid_snapshot_recv', typsend => 'txid_snapshot_send',
typalign => 'd', typstorage => 'x' },
{ oid => '2949',
typname => '_txid_snapshot', typlen => '-1', typbyval => 'f',
typcategory => 'A', typelem => 'txid_snapshot', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# range types
{ oid => '3904', descr => 'range of integers',
typname => 'int4range', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_int4range', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3905',
typname => '_int4range', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int4range', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3906', descr => 'range of numerics',
typname => 'numrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_numrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3907',
typname => '_numrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'numrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3908', descr => 'range of timestamps without time zone',
typname => 'tsrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_tsrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3909',
typname => '_tsrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tsrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3910', descr => 'range of timestamps with time zone',
typname => 'tstzrange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_tstzrange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3911',
typname => '_tstzrange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'tstzrange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3912', descr => 'range of dates',
typname => 'daterange', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_daterange', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3913',
typname => '_daterange', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'daterange', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'i', typstorage => 'x' },
{ oid => '3926', descr => 'range of bigints',
typname => 'int8range', typlen => '-1', typbyval => 'f', typtype => 'r',
typcategory => 'R', typarray => '_int8range', typinput => 'range_in',
typoutput => 'range_out', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '3927',
typname => '_int8range', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int8range', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
# pseudo-types
# types with typtype='p' represent various special cases in the type system.
# These cannot be used to define table columns, but are valid as function
# argument and result types (if supported by the function's implementation
# language).
# Note: cstring is a borderline case; it is still considered a pseudo-type,
# but there is now support for it in records and arrays. Perhaps we should
# just treat it as a regular base type?
{ oid => '2249',
typname => 'record', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typarray => '_record', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '2287',
typname => '_record', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typelem => 'record', typinput => 'array_in',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '2275',
typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p',
typcategory => 'P', typarray => '_cstring', typinput => 'cstring_in',
typoutput => 'cstring_out', typreceive => 'cstring_recv',
typsend => 'cstring_send', typalign => 'c' },
{ oid => '2276',
typname => 'any', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'any_in', typoutput => 'any_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '2277',
typname => 'anyarray', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typinput => 'anyarray_in', typoutput => 'anyarray_out',
typreceive => 'anyarray_recv', typsend => 'anyarray_send', typalign => 'd',
typstorage => 'x' },
{ oid => '2278',
typname => 'void', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'void_in', typoutput => 'void_out',
typreceive => 'void_recv', typsend => 'void_send', typalign => 'i' },
{ oid => '2279',
typname => 'trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'trigger_in', typoutput => 'trigger_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '3838', oid_symbol => 'EVTTRIGGEROID',
typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'event_trigger_in',
typoutput => 'event_trigger_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2280',
typname => 'language_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'language_handler_in',
typoutput => 'language_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2281',
typname => 'internal', typlen => 'SIZEOF_POINTER', typbyval => 't',
typtype => 'p', typcategory => 'P', typinput => 'internal_in',
typoutput => 'internal_out', typreceive => '-', typsend => '-',
typalign => 'ALIGNOF_POINTER' },
{ oid => '2282',
typname => 'opaque', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'opaque_in', typoutput => 'opaque_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '2283',
typname => 'anyelement', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anyelement_in',
typoutput => 'anyelement_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '2776',
typname => 'anynonarray', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anynonarray_in',
typoutput => 'anynonarray_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3500',
typname => 'anyenum', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'anyenum_in', typoutput => 'anyenum_out',
typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '3115',
typname => 'fdw_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'fdw_handler_in',
typoutput => 'fdw_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '325',
typname => 'index_am_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'index_am_handler_in',
typoutput => 'index_am_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3310',
typname => 'tsm_handler', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'tsm_handler_in',
typoutput => 'tsm_handler_out', typreceive => '-', typsend => '-',
typalign => 'i' },
{ oid => '3831',
typname => 'anyrange', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typinput => 'anyrange_in', typoutput => 'anyrange_out',
typreceive => '-', typsend => '-', typalign => 'd', typstorage => 'x' },
]