Update PostgreSQL files to most recent version

This commit is contained in:
Joseph Koshakow
2022-11-21 14:50:52 -05:00
parent b29164d53a
commit 664345f9ec
3 changed files with 127 additions and 60 deletions

View File

@@ -2,7 +2,7 @@
# errcodes.txt
# PostgreSQL error codes
#
# Copyright (c) 2003-2020, PostgreSQL Global Development Group
# Copyright (c) 2003-2022, PostgreSQL Global Development Group
#
# This list serves as the basis for generating source files containing error
# codes. It is kept in a common format to make sure all these source files have
@@ -222,6 +222,7 @@ Section: Class 22 - Data Exception
2203D E ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS too_many_json_array_elements
2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required
2203G E ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE sql_json_item_cannot_be_cast_to_target_type
Section: Class 23 - Integrity Constraint Violation
@@ -428,6 +429,7 @@ Section: Class 57 - Operator Intervention
57P02 E ERRCODE_CRASH_SHUTDOWN crash_shutdown
57P03 E ERRCODE_CANNOT_CONNECT_NOW cannot_connect_now
57P04 E ERRCODE_DATABASE_DROPPED database_dropped
57P05 E ERRCODE_IDLE_SESSION_TIMEOUT idle_session_timeout
Section: Class 58 - System Error (errors external to PostgreSQL itself)

View File

@@ -3,7 +3,7 @@
# pg_range.dat
# Initial contents of the pg_range system catalog.
#
# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# src/include/catalog/pg_range.dat
@@ -12,20 +12,23 @@
[
{ rngtypid => 'int4range', rngsubtype => 'int4', rngsubopc => 'btree/int4_ops',
{ rngtypid => 'int4range', rngsubtype => 'int4',
rngmultitypid => 'int4multirange', rngsubopc => 'btree/int4_ops',
rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' },
{ rngtypid => 'numrange', rngsubtype => 'numeric',
rngsubopc => 'btree/numeric_ops', rngcanonical => '-',
rngsubdiff => 'numrange_subdiff' },
rngmultitypid => 'nummultirange', rngsubopc => 'btree/numeric_ops',
rngcanonical => '-', rngsubdiff => 'numrange_subdiff' },
{ rngtypid => 'tsrange', rngsubtype => 'timestamp',
rngsubopc => 'btree/timestamp_ops', rngcanonical => '-',
rngsubdiff => 'tsrange_subdiff' },
rngmultitypid => 'tsmultirange', rngsubopc => 'btree/timestamp_ops',
rngcanonical => '-', rngsubdiff => 'tsrange_subdiff' },
{ rngtypid => 'tstzrange', rngsubtype => 'timestamptz',
rngsubopc => 'btree/timestamptz_ops', rngcanonical => '-',
rngsubdiff => 'tstzrange_subdiff' },
{ rngtypid => 'daterange', rngsubtype => 'date', rngsubopc => 'btree/date_ops',
rngmultitypid => 'tstzmultirange', rngsubopc => 'btree/timestamptz_ops',
rngcanonical => '-', rngsubdiff => 'tstzrange_subdiff' },
{ rngtypid => 'daterange', rngsubtype => 'date',
rngmultitypid => 'datemultirange', rngsubopc => 'btree/date_ops',
rngcanonical => 'daterange_canonical', rngsubdiff => 'daterange_subdiff' },
{ rngtypid => 'int8range', rngsubtype => 'int8', rngsubopc => 'btree/int8_ops',
{ rngtypid => 'int8range', rngsubtype => 'int8',
rngmultitypid => 'int8multirange', rngsubopc => 'btree/int8_ops',
rngcanonical => 'int8range_canonical', rngsubdiff => 'int8range_subdiff' },
]

View File

@@ -3,7 +3,7 @@
# pg_type.dat
# Initial contents of the pg_type system catalog.
#
# Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
# Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group
# Portions Copyright (c) 1994, Regents of the University of California
#
# src/include/catalog/pg_type.dat
@@ -15,14 +15,10 @@
# 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:
# OID symbol macro names for pg_type OIDs are not specified here because
# they are generated by genbki.pl according to the following rule:
# 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.
# To autogenerate an array type, add 'array_type_oid => 'nnnn' to the element
# type, which will instruct genbki.pl to generate a BKI entry for it.
@@ -46,15 +42,16 @@
typinput => 'byteain', typoutput => 'byteaout', typreceive => 'bytearecv',
typsend => 'byteasend', typalign => 'i', typstorage => 'x' },
{ oid => '18', array_type_oid => '1002', descr => 'single character',
typname => 'char', typlen => '1', typbyval => 't', typcategory => 'S',
typname => 'char', typlen => '1', typbyval => 't', typcategory => 'Z',
typinput => 'charin', typoutput => 'charout', typreceive => 'charrecv',
typsend => 'charsend', typalign => 'c' },
{ oid => '19', array_type_oid => '1003',
descr => '63-byte type for storing system identifiers',
typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f',
typcategory => 'S', typelem => 'char', typinput => 'namein',
typoutput => 'nameout', typreceive => 'namerecv', typsend => 'namesend',
typalign => 'c', typcollation => 'C' },
typcategory => 'S', typsubscript => 'raw_array_subscript_handler',
typelem => 'char', typinput => 'namein', typoutput => 'nameout',
typreceive => 'namerecv', typsend => 'namesend', typalign => 'c',
typcollation => 'C' },
{ oid => '20', array_type_oid => '1016',
descr => '~18 digit integer, 8-byte storage',
typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
@@ -68,7 +65,8 @@
{ oid => '22', array_type_oid => '1006',
descr => 'array of int2, used in system tables',
typname => 'int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'int2', typinput => 'int2vectorin', typoutput => 'int2vectorout',
typsubscript => 'array_subscript_handler', typelem => 'int2',
typinput => 'int2vectorin', typoutput => 'int2vectorout',
typreceive => 'int2vectorrecv', typsend => 'int2vectorsend',
typalign => 'i' },
{ oid => '23', array_type_oid => '1007',
@@ -108,27 +106,28 @@
{ oid => '30', array_type_oid => '1013',
descr => 'array of oids, used in system tables',
typname => 'oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A',
typelem => 'oid', typinput => 'oidvectorin', typoutput => 'oidvectorout',
typsubscript => 'array_subscript_handler', typelem => 'oid',
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',
{ oid => '71', array_type_oid => '210',
typname => 'pg_type', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_type', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '75',
{ oid => '75', array_type_oid => '270',
typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_attribute', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '81',
{ oid => '81', array_type_oid => '272',
typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_proc', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '83',
{ oid => '83', array_type_oid => '273',
typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_class', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv',
@@ -144,35 +143,30 @@
typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'xml_in', typoutput => 'xml_out', typreceive => 'xml_recv',
typsend => 'xml_send', typalign => 'i', typstorage => 'x' },
{ oid => '194', oid_symbol => 'PGNODETREEOID',
descr => 'string representing an internal node tree',
{ oid => '194', descr => 'string representing an internal node tree',
typname => 'pg_node_tree', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_node_tree_in',
typcategory => 'Z', 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 => 'default' },
{ oid => '3361', oid_symbol => 'PGNDISTINCTOID',
descr => 'multivariate ndistinct coefficients',
{ oid => '3361', descr => 'multivariate ndistinct coefficients',
typname => 'pg_ndistinct', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_ndistinct_in',
typcategory => 'Z', typinput => 'pg_ndistinct_in',
typoutput => 'pg_ndistinct_out', typreceive => 'pg_ndistinct_recv',
typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x',
typcollation => 'default' },
{ oid => '3402', oid_symbol => 'PGDEPENDENCIESOID',
descr => 'multivariate dependencies',
{ oid => '3402', descr => 'multivariate dependencies',
typname => 'pg_dependencies', typlen => '-1', typbyval => 'f',
typcategory => 'S', typinput => 'pg_dependencies_in',
typcategory => 'Z', typinput => 'pg_dependencies_in',
typoutput => 'pg_dependencies_out', typreceive => 'pg_dependencies_recv',
typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x',
typcollation => 'default' },
{ oid => '5017', oid_symbol => 'PGMCVLISTOID',
descr => 'multivariate MCV list',
typname => 'pg_mcv_list', typlen => '-1', typbyval => 'f', typcategory => 'S',
{ oid => '5017', descr => 'multivariate MCV list',
typname => 'pg_mcv_list', typlen => '-1', typbyval => 'f', typcategory => 'Z',
typinput => 'pg_mcv_list_in', typoutput => 'pg_mcv_list_out',
typreceive => 'pg_mcv_list_recv', typsend => 'pg_mcv_list_send',
typalign => 'i', typstorage => 'x', typcollation => 'default' },
{ oid => '32', oid_symbol => 'PGDDLCOMMANDOID',
descr => 'internal type for passing CollectedCommand',
{ oid => '32', 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',
@@ -187,13 +181,15 @@
{ oid => '600', array_type_oid => '1017',
descr => 'geometric point \'(x, y)\'',
typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typinput => 'point_in', typoutput => 'point_out',
typreceive => 'point_recv', typsend => 'point_send', typalign => 'd' },
typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
typinput => 'point_in', typoutput => 'point_out', typreceive => 'point_recv',
typsend => 'point_send', typalign => 'd' },
{ oid => '601', array_type_oid => '1018',
descr => 'geometric line segment \'(pt1,pt2)\'',
typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G',
typelem => 'point', typinput => 'lseg_in', typoutput => 'lseg_out',
typreceive => 'lseg_recv', typsend => 'lseg_send', typalign => 'd' },
typsubscript => 'raw_array_subscript_handler', typelem => 'point',
typinput => 'lseg_in', typoutput => 'lseg_out', typreceive => 'lseg_recv',
typsend => 'lseg_send', typalign => 'd' },
{ oid => '602', array_type_oid => '1019',
descr => 'geometric path \'(pt1,...)\'',
typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G',
@@ -202,9 +198,9 @@
{ oid => '603', array_type_oid => '1020',
descr => 'geometric box \'(lower left,upper right)\'',
typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G',
typdelim => ';', typelem => 'point', typinput => 'box_in',
typoutput => 'box_out', typreceive => 'box_recv', typsend => 'box_send',
typalign => 'd' },
typdelim => ';', typsubscript => 'raw_array_subscript_handler',
typelem => 'point', typinput => 'box_in', typoutput => 'box_out',
typreceive => 'box_recv', typsend => 'box_send', typalign => 'd' },
{ oid => '604', array_type_oid => '1027',
descr => 'geometric polygon \'(pt1,...)\'',
typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G',
@@ -212,8 +208,9 @@
typsend => 'poly_send', typalign => 'd', typstorage => 'x' },
{ oid => '628', array_type_oid => '629', descr => 'geometric line',
typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typinput => 'line_in', typoutput => 'line_out',
typreceive => 'line_recv', typsend => 'line_send', typalign => 'd' },
typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
typinput => 'line_in', typoutput => 'line_out', typreceive => 'line_recv',
typsend => 'line_send', typalign => 'd' },
# OIDS 700 - 799
@@ -237,7 +234,7 @@
typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G',
typinput => 'circle_in', typoutput => 'circle_out',
typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' },
{ oid => '790', oid_symbol => 'CASHOID', array_type_oid => '791',
{ oid => '790', array_type_oid => '791',
descr => 'monetary amounts, $d,ddd.cc',
typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typinput => 'cash_in', typoutput => 'cash_out',
@@ -409,8 +406,7 @@
typsend => 'uuid_send', typalign => 'c' },
# pg_lsn
{ oid => '3220', oid_symbol => 'LSNOID', array_type_oid => '3221',
descr => 'PostgreSQL LSN datatype',
{ oid => '3220', array_type_oid => '3221', descr => 'PostgreSQL LSN datatype',
typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'U', typinput => 'pg_lsn_in', typoutput => 'pg_lsn_out',
typreceive => 'pg_lsn_recv', typsend => 'pg_lsn_send', typalign => 'd' },
@@ -447,8 +443,9 @@
# jsonb
{ oid => '3802', array_type_oid => '3807', descr => 'Binary JSON',
typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'jsonb_in', typoutput => 'jsonb_out', typreceive => 'jsonb_recv',
typsend => 'jsonb_send', typalign => 'i', typstorage => 'x' },
typsubscript => 'jsonb_subscript_handler', typinput => 'jsonb_in',
typoutput => 'jsonb_out', typreceive => 'jsonb_recv', typsend => 'jsonb_send',
typalign => 'i', typstorage => 'x' },
{ oid => '4072', array_type_oid => '4073', descr => 'JSON path',
typname => 'jsonpath', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'jsonpath_in', typoutput => 'jsonpath_out',
@@ -500,6 +497,46 @@
typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' },
# multirange types
{ oid => '4451', array_type_oid => '6150', descr => 'multirange of integers',
typname => 'int4multirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_typanalyze',
typalign => 'i', typstorage => 'x' },
{ oid => '4532', array_type_oid => '6151', descr => 'multirange of numerics',
typname => 'nummultirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_typanalyze',
typalign => 'i', typstorage => 'x' },
{ oid => '4533', array_type_oid => '6152',
descr => 'multirange of timestamps without time zone',
typname => 'tsmultirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_typanalyze',
typalign => 'd', typstorage => 'x' },
{ oid => '4534', array_type_oid => '6153',
descr => 'multirange of timestamps with time zone',
typname => 'tstzmultirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_typanalyze',
typalign => 'd', typstorage => 'x' },
{ oid => '4535', array_type_oid => '6155', descr => 'multirange of dates',
typname => 'datemultirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_typanalyze',
typalign => 'i', typstorage => 'x' },
{ oid => '4536', array_type_oid => '6157', descr => 'multirange of bigints',
typname => 'int8multirange', typlen => '-1', typbyval => 'f', typtype => 'm',
typcategory => 'R', typinput => 'multirange_in',
typoutput => 'multirange_out', typreceive => 'multirange_recv',
typsend => 'multirange_send', typanalyze => 'multirange_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
@@ -517,8 +554,9 @@
# Arrays of records have typcategory P, so they can't be autogenerated.
{ 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',
typcategory => 'P', typsubscript => 'array_subscript_handler',
typelem => 'record', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '2275', array_type_oid => '1263', descr => 'C-style string',
typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p',
@@ -542,7 +580,7 @@
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',
{ oid => '3838',
descr => 'pseudo-type for the result of an event trigger function',
typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'event_trigger_in',
@@ -629,5 +667,29 @@
typtype => 'p', typcategory => 'P', typinput => 'anycompatiblerange_in',
typoutput => 'anycompatiblerange_out', typreceive => '-', typsend => '-',
typalign => 'd', typstorage => 'x' },
{ oid => '4537',
descr => 'pseudo-type representing a polymorphic base type that is a multirange',
typname => 'anymultirange', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typinput => 'anymultirange_in',
typoutput => 'anymultirange_out', typreceive => '-', typsend => '-',
typalign => 'd', typstorage => 'x' },
{ oid => '4538',
descr => 'pseudo-type representing a multirange over a polymorphic common type',
typname => 'anycompatiblemultirange', typlen => '-1', typbyval => 'f',
typtype => 'p', typcategory => 'P', typinput => 'anycompatiblemultirange_in',
typoutput => 'anycompatiblemultirange_out', typreceive => '-', typsend => '-',
typalign => 'd', typstorage => 'x' },
{ oid => '4600', descr => 'BRIN bloom summary',
typname => 'pg_brin_bloom_summary', typlen => '-1', typbyval => 'f',
typcategory => 'Z', typinput => 'brin_bloom_summary_in',
typoutput => 'brin_bloom_summary_out',
typreceive => 'brin_bloom_summary_recv', typsend => 'brin_bloom_summary_send',
typalign => 'i', typstorage => 'x', typcollation => 'default' },
{ oid => '4601', descr => 'BRIN minmax-multi summary',
typname => 'pg_brin_minmax_multi_summary', typlen => '-1', typbyval => 'f',
typcategory => 'Z', typinput => 'brin_minmax_multi_summary_in',
typoutput => 'brin_minmax_multi_summary_out',
typreceive => 'brin_minmax_multi_summary_recv',
typsend => 'brin_minmax_multi_summary_send', typalign => 'i',
typstorage => 'x', typcollation => 'default' },
]