Merge pull request #963 from jkosh44/idle-session-timeout

Add idle session timeout error
This commit is contained in:
Steven Fackler 2022-11-21 19:32:47 -05:00 committed by GitHub
commit 5ebe602b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 598 additions and 358 deletions

View File

@ -2,7 +2,7 @@
# errcodes.txt # errcodes.txt
# PostgreSQL error codes # 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 # 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 # 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 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 2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required 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 Section: Class 23 - Integrity Constraint Violation
@ -428,6 +429,7 @@ Section: Class 57 - Operator Intervention
57P02 E ERRCODE_CRASH_SHUTDOWN crash_shutdown 57P02 E ERRCODE_CRASH_SHUTDOWN crash_shutdown
57P03 E ERRCODE_CANNOT_CONNECT_NOW cannot_connect_now 57P03 E ERRCODE_CANNOT_CONNECT_NOW cannot_connect_now
57P04 E ERRCODE_DATABASE_DROPPED database_dropped 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) Section: Class 58 - System Error (errors external to PostgreSQL itself)

View File

@ -3,7 +3,7 @@
# pg_range.dat # pg_range.dat
# Initial contents of the pg_range system catalog. # 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 # Portions Copyright (c) 1994, Regents of the University of California
# #
# src/include/catalog/pg_range.dat # 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' }, rngcanonical => 'int4range_canonical', rngsubdiff => 'int4range_subdiff' },
{ rngtypid => 'numrange', rngsubtype => 'numeric', { rngtypid => 'numrange', rngsubtype => 'numeric',
rngsubopc => 'btree/numeric_ops', rngcanonical => '-', rngmultitypid => 'nummultirange', rngsubopc => 'btree/numeric_ops',
rngsubdiff => 'numrange_subdiff' }, rngcanonical => '-', rngsubdiff => 'numrange_subdiff' },
{ rngtypid => 'tsrange', rngsubtype => 'timestamp', { rngtypid => 'tsrange', rngsubtype => 'timestamp',
rngsubopc => 'btree/timestamp_ops', rngcanonical => '-', rngmultitypid => 'tsmultirange', rngsubopc => 'btree/timestamp_ops',
rngsubdiff => 'tsrange_subdiff' }, rngcanonical => '-', rngsubdiff => 'tsrange_subdiff' },
{ rngtypid => 'tstzrange', rngsubtype => 'timestamptz', { rngtypid => 'tstzrange', rngsubtype => 'timestamptz',
rngsubopc => 'btree/timestamptz_ops', rngcanonical => '-', rngmultitypid => 'tstzmultirange', rngsubopc => 'btree/timestamptz_ops',
rngsubdiff => 'tstzrange_subdiff' }, rngcanonical => '-', rngsubdiff => 'tstzrange_subdiff' },
{ rngtypid => 'daterange', rngsubtype => 'date', rngsubopc => 'btree/date_ops', { rngtypid => 'daterange', rngsubtype => 'date',
rngmultitypid => 'datemultirange', rngsubopc => 'btree/date_ops',
rngcanonical => 'daterange_canonical', rngsubdiff => 'daterange_subdiff' }, 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' }, rngcanonical => 'int8range_canonical', rngsubdiff => 'int8range_subdiff' },
] ]

View File

@ -3,7 +3,7 @@
# pg_type.dat # pg_type.dat
# Initial contents of the pg_type system catalog. # 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 # Portions Copyright (c) 1994, Regents of the University of California
# #
# src/include/catalog/pg_type.dat # src/include/catalog/pg_type.dat
@ -15,14 +15,10 @@
# For types used in the system catalogs, make sure the values here match # For types used in the system catalogs, make sure the values here match
# TypInfo[] in bootstrap.c. # TypInfo[] in bootstrap.c.
# OID symbol macro names for pg_type OIDs are generated by genbki.pl # OID symbol macro names for pg_type OIDs are not specified here because
# according to the following rule, so you don't need to specify them # they are generated by genbki.pl according to the following rule:
# here:
# foo_bar -> FOO_BAROID # foo_bar -> FOO_BAROID
# _foo_bar -> FOO_BARARRAYOID # _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 # 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. # type, which will instruct genbki.pl to generate a BKI entry for it.
@ -46,15 +42,16 @@
typinput => 'byteain', typoutput => 'byteaout', typreceive => 'bytearecv', typinput => 'byteain', typoutput => 'byteaout', typreceive => 'bytearecv',
typsend => 'byteasend', typalign => 'i', typstorage => 'x' }, typsend => 'byteasend', typalign => 'i', typstorage => 'x' },
{ oid => '18', array_type_oid => '1002', descr => 'single character', { 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', typinput => 'charin', typoutput => 'charout', typreceive => 'charrecv',
typsend => 'charsend', typalign => 'c' }, typsend => 'charsend', typalign => 'c' },
{ oid => '19', array_type_oid => '1003', { oid => '19', array_type_oid => '1003',
descr => '63-byte type for storing system identifiers', descr => '63-byte type for storing system identifiers',
typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f', typname => 'name', typlen => 'NAMEDATALEN', typbyval => 'f',
typcategory => 'S', typelem => 'char', typinput => 'namein', typcategory => 'S', typsubscript => 'raw_array_subscript_handler',
typoutput => 'nameout', typreceive => 'namerecv', typsend => 'namesend', typelem => 'char', typinput => 'namein', typoutput => 'nameout',
typalign => 'c', typcollation => 'C' }, typreceive => 'namerecv', typsend => 'namesend', typalign => 'c',
typcollation => 'C' },
{ oid => '20', array_type_oid => '1016', { oid => '20', array_type_oid => '1016',
descr => '~18 digit integer, 8-byte storage', descr => '~18 digit integer, 8-byte storage',
typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', typname => 'int8', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
@ -68,7 +65,8 @@
{ oid => '22', array_type_oid => '1006', { oid => '22', array_type_oid => '1006',
descr => 'array of int2, used in system tables', descr => 'array of int2, used in system tables',
typname => 'int2vector', typlen => '-1', typbyval => 'f', typcategory => 'A', 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', typreceive => 'int2vectorrecv', typsend => 'int2vectorsend',
typalign => 'i' }, typalign => 'i' },
{ oid => '23', array_type_oid => '1007', { oid => '23', array_type_oid => '1007',
@ -108,27 +106,28 @@
{ oid => '30', array_type_oid => '1013', { oid => '30', array_type_oid => '1013',
descr => 'array of oids, used in system tables', descr => 'array of oids, used in system tables',
typname => 'oidvector', typlen => '-1', typbyval => 'f', typcategory => 'A', 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' }, typreceive => 'oidvectorrecv', typsend => 'oidvectorsend', typalign => 'i' },
# hand-built rowtype entries for bootstrapped catalogs # hand-built rowtype entries for bootstrapped catalogs
# NB: OIDs assigned here must match the BKI_ROWTYPE_OID declarations # 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', typname => 'pg_type', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_type', typinput => 'record_in', typcategory => 'C', typrelid => 'pg_type', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv', typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' }, typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '75', { oid => '75', array_type_oid => '270',
typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c', typname => 'pg_attribute', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_attribute', typinput => 'record_in', typcategory => 'C', typrelid => 'pg_attribute', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv', typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' }, typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '81', { oid => '81', array_type_oid => '272',
typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c', typname => 'pg_proc', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_proc', typinput => 'record_in', typcategory => 'C', typrelid => 'pg_proc', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv', typoutput => 'record_out', typreceive => 'record_recv',
typsend => 'record_send', typalign => 'd', typstorage => 'x' }, typsend => 'record_send', typalign => 'd', typstorage => 'x' },
{ oid => '83', { oid => '83', array_type_oid => '273',
typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c', typname => 'pg_class', typlen => '-1', typbyval => 'f', typtype => 'c',
typcategory => 'C', typrelid => 'pg_class', typinput => 'record_in', typcategory => 'C', typrelid => 'pg_class', typinput => 'record_in',
typoutput => 'record_out', typreceive => 'record_recv', typoutput => 'record_out', typreceive => 'record_recv',
@ -144,35 +143,30 @@
typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U', typname => 'xml', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'xml_in', typoutput => 'xml_out', typreceive => 'xml_recv', typinput => 'xml_in', typoutput => 'xml_out', typreceive => 'xml_recv',
typsend => 'xml_send', typalign => 'i', typstorage => 'x' }, typsend => 'xml_send', typalign => 'i', typstorage => 'x' },
{ oid => '194', oid_symbol => 'PGNODETREEOID', { oid => '194', descr => 'string representing an internal node tree',
descr => 'string representing an internal node tree',
typname => 'pg_node_tree', typlen => '-1', typbyval => 'f', 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', typoutput => 'pg_node_tree_out', typreceive => 'pg_node_tree_recv',
typsend => 'pg_node_tree_send', typalign => 'i', typstorage => 'x', typsend => 'pg_node_tree_send', typalign => 'i', typstorage => 'x',
typcollation => 'default' }, typcollation => 'default' },
{ oid => '3361', oid_symbol => 'PGNDISTINCTOID', { oid => '3361', descr => 'multivariate ndistinct coefficients',
descr => 'multivariate ndistinct coefficients',
typname => 'pg_ndistinct', typlen => '-1', typbyval => 'f', 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', typoutput => 'pg_ndistinct_out', typreceive => 'pg_ndistinct_recv',
typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x', typsend => 'pg_ndistinct_send', typalign => 'i', typstorage => 'x',
typcollation => 'default' }, typcollation => 'default' },
{ oid => '3402', oid_symbol => 'PGDEPENDENCIESOID', { oid => '3402', descr => 'multivariate dependencies',
descr => 'multivariate dependencies',
typname => 'pg_dependencies', typlen => '-1', typbyval => 'f', 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', typoutput => 'pg_dependencies_out', typreceive => 'pg_dependencies_recv',
typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x', typsend => 'pg_dependencies_send', typalign => 'i', typstorage => 'x',
typcollation => 'default' }, typcollation => 'default' },
{ oid => '5017', oid_symbol => 'PGMCVLISTOID', { oid => '5017', descr => 'multivariate MCV list',
descr => 'multivariate MCV list', typname => 'pg_mcv_list', typlen => '-1', typbyval => 'f', typcategory => 'Z',
typname => 'pg_mcv_list', typlen => '-1', typbyval => 'f', typcategory => 'S',
typinput => 'pg_mcv_list_in', typoutput => 'pg_mcv_list_out', typinput => 'pg_mcv_list_in', typoutput => 'pg_mcv_list_out',
typreceive => 'pg_mcv_list_recv', typsend => 'pg_mcv_list_send', typreceive => 'pg_mcv_list_recv', typsend => 'pg_mcv_list_send',
typalign => 'i', typstorage => 'x', typcollation => 'default' }, typalign => 'i', typstorage => 'x', typcollation => 'default' },
{ oid => '32', oid_symbol => 'PGDDLCOMMANDOID', { oid => '32', descr => 'internal type for passing CollectedCommand',
descr => 'internal type for passing CollectedCommand',
typname => 'pg_ddl_command', typlen => 'SIZEOF_POINTER', typbyval => 't', typname => 'pg_ddl_command', typlen => 'SIZEOF_POINTER', typbyval => 't',
typtype => 'p', typcategory => 'P', typinput => 'pg_ddl_command_in', typtype => 'p', typcategory => 'P', typinput => 'pg_ddl_command_in',
typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv', typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv',
@ -187,13 +181,15 @@
{ oid => '600', array_type_oid => '1017', { oid => '600', array_type_oid => '1017',
descr => 'geometric point \'(x, y)\'', descr => 'geometric point \'(x, y)\'',
typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G', typname => 'point', typlen => '16', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typinput => 'point_in', typoutput => 'point_out', typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
typreceive => 'point_recv', typsend => 'point_send', typalign => 'd' }, typinput => 'point_in', typoutput => 'point_out', typreceive => 'point_recv',
typsend => 'point_send', typalign => 'd' },
{ oid => '601', array_type_oid => '1018', { oid => '601', array_type_oid => '1018',
descr => 'geometric line segment \'(pt1,pt2)\'', descr => 'geometric line segment \'(pt1,pt2)\'',
typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G', typname => 'lseg', typlen => '32', typbyval => 'f', typcategory => 'G',
typelem => 'point', typinput => 'lseg_in', typoutput => 'lseg_out', typsubscript => 'raw_array_subscript_handler', typelem => 'point',
typreceive => 'lseg_recv', typsend => 'lseg_send', typalign => 'd' }, typinput => 'lseg_in', typoutput => 'lseg_out', typreceive => 'lseg_recv',
typsend => 'lseg_send', typalign => 'd' },
{ oid => '602', array_type_oid => '1019', { oid => '602', array_type_oid => '1019',
descr => 'geometric path \'(pt1,...)\'', descr => 'geometric path \'(pt1,...)\'',
typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G', typname => 'path', typlen => '-1', typbyval => 'f', typcategory => 'G',
@ -202,9 +198,9 @@
{ oid => '603', array_type_oid => '1020', { oid => '603', array_type_oid => '1020',
descr => 'geometric box \'(lower left,upper right)\'', descr => 'geometric box \'(lower left,upper right)\'',
typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G', typname => 'box', typlen => '32', typbyval => 'f', typcategory => 'G',
typdelim => ';', typelem => 'point', typinput => 'box_in', typdelim => ';', typsubscript => 'raw_array_subscript_handler',
typoutput => 'box_out', typreceive => 'box_recv', typsend => 'box_send', typelem => 'point', typinput => 'box_in', typoutput => 'box_out',
typalign => 'd' }, typreceive => 'box_recv', typsend => 'box_send', typalign => 'd' },
{ oid => '604', array_type_oid => '1027', { oid => '604', array_type_oid => '1027',
descr => 'geometric polygon \'(pt1,...)\'', descr => 'geometric polygon \'(pt1,...)\'',
typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G', typname => 'polygon', typlen => '-1', typbyval => 'f', typcategory => 'G',
@ -212,8 +208,9 @@
typsend => 'poly_send', typalign => 'd', typstorage => 'x' }, typsend => 'poly_send', typalign => 'd', typstorage => 'x' },
{ oid => '628', array_type_oid => '629', descr => 'geometric line', { oid => '628', array_type_oid => '629', descr => 'geometric line',
typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G', typname => 'line', typlen => '24', typbyval => 'f', typcategory => 'G',
typelem => 'float8', typinput => 'line_in', typoutput => 'line_out', typsubscript => 'raw_array_subscript_handler', typelem => 'float8',
typreceive => 'line_recv', typsend => 'line_send', typalign => 'd' }, typinput => 'line_in', typoutput => 'line_out', typreceive => 'line_recv',
typsend => 'line_send', typalign => 'd' },
# OIDS 700 - 799 # OIDS 700 - 799
@ -237,7 +234,7 @@
typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G', typname => 'circle', typlen => '24', typbyval => 'f', typcategory => 'G',
typinput => 'circle_in', typoutput => 'circle_out', typinput => 'circle_in', typoutput => 'circle_out',
typreceive => 'circle_recv', typsend => 'circle_send', typalign => 'd' }, 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', descr => 'monetary amounts, $d,ddd.cc',
typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', typname => 'money', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'N', typinput => 'cash_in', typoutput => 'cash_out', typcategory => 'N', typinput => 'cash_in', typoutput => 'cash_out',
@ -409,8 +406,7 @@
typsend => 'uuid_send', typalign => 'c' }, typsend => 'uuid_send', typalign => 'c' },
# pg_lsn # pg_lsn
{ oid => '3220', oid_symbol => 'LSNOID', array_type_oid => '3221', { oid => '3220', array_type_oid => '3221', descr => 'PostgreSQL LSN datatype',
descr => 'PostgreSQL LSN datatype',
typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL', typname => 'pg_lsn', typlen => '8', typbyval => 'FLOAT8PASSBYVAL',
typcategory => 'U', typinput => 'pg_lsn_in', typoutput => 'pg_lsn_out', typcategory => 'U', typinput => 'pg_lsn_in', typoutput => 'pg_lsn_out',
typreceive => 'pg_lsn_recv', typsend => 'pg_lsn_send', typalign => 'd' }, typreceive => 'pg_lsn_recv', typsend => 'pg_lsn_send', typalign => 'd' },
@ -447,8 +443,9 @@
# jsonb # jsonb
{ oid => '3802', array_type_oid => '3807', descr => 'Binary JSON', { oid => '3802', array_type_oid => '3807', descr => 'Binary JSON',
typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U', typname => 'jsonb', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'jsonb_in', typoutput => 'jsonb_out', typreceive => 'jsonb_recv', typsubscript => 'jsonb_subscript_handler', typinput => 'jsonb_in',
typsend => 'jsonb_send', typalign => 'i', typstorage => 'x' }, typoutput => 'jsonb_out', typreceive => 'jsonb_recv', typsend => 'jsonb_send',
typalign => 'i', typstorage => 'x' },
{ oid => '4072', array_type_oid => '4073', descr => 'JSON path', { oid => '4072', array_type_oid => '4073', descr => 'JSON path',
typname => 'jsonpath', typlen => '-1', typbyval => 'f', typcategory => 'U', typname => 'jsonpath', typlen => '-1', typbyval => 'f', typcategory => 'U',
typinput => 'jsonpath_in', typoutput => 'jsonpath_out', typinput => 'jsonpath_in', typoutput => 'jsonpath_out',
@ -500,6 +497,46 @@
typreceive => 'range_recv', typsend => 'range_send', typreceive => 'range_recv', typsend => 'range_send',
typanalyze => 'range_typanalyze', typalign => 'd', typstorage => 'x' }, 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 # pseudo-types
# types with typtype='p' represent various special cases in the type system. # 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 # 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. # Arrays of records have typcategory P, so they can't be autogenerated.
{ oid => '2287', { oid => '2287',
typname => '_record', typlen => '-1', typbyval => 'f', typtype => 'p', typname => '_record', typlen => '-1', typbyval => 'f', typtype => 'p',
typcategory => 'P', typelem => 'record', typinput => 'array_in', typcategory => 'P', typsubscript => 'array_subscript_handler',
typoutput => 'array_out', typreceive => 'array_recv', typsend => 'array_send', typelem => 'record', typinput => 'array_in', typoutput => 'array_out',
typreceive => 'array_recv', typsend => 'array_send',
typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' }, typanalyze => 'array_typanalyze', typalign => 'd', typstorage => 'x' },
{ oid => '2275', array_type_oid => '1263', descr => 'C-style string', { oid => '2275', array_type_oid => '1263', descr => 'C-style string',
typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p', typname => 'cstring', typlen => '-2', typbyval => 'f', typtype => 'p',
@ -542,7 +580,7 @@
typname => 'trigger', typlen => '4', typbyval => 't', typtype => 'p', typname => 'trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'trigger_in', typoutput => 'trigger_out', typcategory => 'P', typinput => 'trigger_in', typoutput => 'trigger_out',
typreceive => '-', typsend => '-', typalign => 'i' }, typreceive => '-', typsend => '-', typalign => 'i' },
{ oid => '3838', oid_symbol => 'EVTTRIGGEROID', { oid => '3838',
descr => 'pseudo-type for the result of an event trigger function', descr => 'pseudo-type for the result of an event trigger function',
typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p', typname => 'event_trigger', typlen => '4', typbyval => 't', typtype => 'p',
typcategory => 'P', typinput => 'event_trigger_in', typcategory => 'P', typinput => 'event_trigger_in',
@ -629,5 +667,29 @@
typtype => 'p', typcategory => 'P', typinput => 'anycompatiblerange_in', typtype => 'p', typcategory => 'P', typinput => 'anycompatiblerange_in',
typoutput => 'anycompatiblerange_out', typreceive => '-', typsend => '-', typoutput => 'anycompatiblerange_out', typreceive => '-', typsend => '-',
typalign => 'd', typstorage => 'x' }, 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' },
] ]

View File

@ -17,6 +17,7 @@ struct Type {
variant: String, variant: String,
ident: String, ident: String,
kind: String, kind: String,
typtype: Option<String>,
element: u32, element: u32,
doc: String, doc: String,
} }
@ -185,6 +186,15 @@ fn parse_types() -> BTreeMap<u32, Type> {
) )
}) })
.collect::<HashMap<_, _>>(); .collect::<HashMap<_, _>>();
let multi_range_elements = raw_ranges
.iter()
.map(|m| {
(
oids_by_name[&*m["rngmultitypid"]],
oids_by_name[&*m["rngsubtype"]],
)
})
.collect::<HashMap<_, _>>();
let range_vector_re = Regex::new("(range|vector)$").unwrap(); let range_vector_re = Regex::new("(range|vector)$").unwrap();
let array_re = Regex::new("^_(.*)").unwrap(); let array_re = Regex::new("^_(.*)").unwrap();
@ -208,8 +218,18 @@ fn parse_types() -> BTreeMap<u32, Type> {
continue; continue;
} }
let typtype = raw_type.get("typtype").cloned();
let element = match &*kind { let element = match &*kind {
"R" => range_elements[&oid], "R" => match typtype
.as_ref()
.expect("range type must have typtype")
.as_str()
{
"r" => range_elements[&oid],
"m" => multi_range_elements[&oid],
typtype => panic!("invalid range typtype {}", typtype),
},
"A" => oids_by_name[&raw_type["typelem"]], "A" => oids_by_name[&raw_type["typelem"]],
_ => 0, _ => 0,
}; };
@ -235,6 +255,7 @@ fn parse_types() -> BTreeMap<u32, Type> {
variant, variant,
ident, ident,
kind: "A".to_string(), kind: "A".to_string(),
typtype: None,
element: oid, element: oid,
doc, doc,
}; };
@ -246,6 +267,7 @@ fn parse_types() -> BTreeMap<u32, Type> {
variant, variant,
ident, ident,
kind, kind,
typtype,
element, element,
doc, doc,
}; };
@ -349,7 +371,16 @@ fn make_impl(w: &mut BufWriter<File>, types: &BTreeMap<u32, Type>) {
let kind = match &*type_.kind { let kind = match &*type_.kind {
"P" => "Pseudo".to_owned(), "P" => "Pseudo".to_owned(),
"A" => format!("Array(Type(Inner::{}))", types[&type_.element].variant), "A" => format!("Array(Type(Inner::{}))", types[&type_.element].variant),
"R" => format!("Range(Type(Inner::{}))", types[&type_.element].variant), "R" => match type_
.typtype
.as_ref()
.expect("range type must have typtype")
.as_str()
{
"r" => format!("Range(Type(Inner::{}))", types[&type_.element].variant),
"m" => format!("Multirange(Type(Inner::{}))", types[&type_.element].variant),
typtype => panic!("invalid range typtype {}", typtype),
},
_ => "Simple".to_owned(), _ => "Simple".to_owned(),
}; };

View File

@ -320,6 +320,8 @@ pub enum Kind {
Array(Type), Array(Type),
/// A range type along with the type of its elements. /// A range type along with the type of its elements.
Range(Type), Range(Type),
/// A multirange type along with the type of its elements.
Multirange(Type),
/// A domain type along with its underlying type. /// A domain type along with its underlying type.
Domain(Type), Domain(Type),
/// A composite type along with information about its fields. /// A composite type along with information about its fields.

View File

@ -174,6 +174,16 @@ pub enum Inner {
RegroleArray, RegroleArray,
Regcollation, Regcollation,
RegcollationArray, RegcollationArray,
Int4multiRange,
NummultiRange,
TsmultiRange,
TstzmultiRange,
DatemultiRange,
Int8multiRange,
AnymultiRange,
AnycompatiblemultiRange,
PgBrinBloomSummary,
PgBrinMinmaxMultiSummary,
PgMcvList, PgMcvList,
PgSnapshot, PgSnapshot,
PgSnapshotArray, PgSnapshotArray,
@ -182,6 +192,12 @@ pub enum Inner {
Anycompatiblearray, Anycompatiblearray,
Anycompatiblenonarray, Anycompatiblenonarray,
AnycompatibleRange, AnycompatibleRange,
Int4multiRangeArray,
NummultiRangeArray,
TsmultiRangeArray,
TstzmultiRangeArray,
DatemultiRangeArray,
Int8multiRangeArray,
Other(Arc<Other>), Other(Arc<Other>),
} }
@ -349,6 +365,16 @@ impl Inner {
4097 => Some(Inner::RegroleArray), 4097 => Some(Inner::RegroleArray),
4191 => Some(Inner::Regcollation), 4191 => Some(Inner::Regcollation),
4192 => Some(Inner::RegcollationArray), 4192 => Some(Inner::RegcollationArray),
4451 => Some(Inner::Int4multiRange),
4532 => Some(Inner::NummultiRange),
4533 => Some(Inner::TsmultiRange),
4534 => Some(Inner::TstzmultiRange),
4535 => Some(Inner::DatemultiRange),
4536 => Some(Inner::Int8multiRange),
4537 => Some(Inner::AnymultiRange),
4538 => Some(Inner::AnycompatiblemultiRange),
4600 => Some(Inner::PgBrinBloomSummary),
4601 => Some(Inner::PgBrinMinmaxMultiSummary),
5017 => Some(Inner::PgMcvList), 5017 => Some(Inner::PgMcvList),
5038 => Some(Inner::PgSnapshot), 5038 => Some(Inner::PgSnapshot),
5039 => Some(Inner::PgSnapshotArray), 5039 => Some(Inner::PgSnapshotArray),
@ -357,6 +383,12 @@ impl Inner {
5078 => Some(Inner::Anycompatiblearray), 5078 => Some(Inner::Anycompatiblearray),
5079 => Some(Inner::Anycompatiblenonarray), 5079 => Some(Inner::Anycompatiblenonarray),
5080 => Some(Inner::AnycompatibleRange), 5080 => Some(Inner::AnycompatibleRange),
6150 => Some(Inner::Int4multiRangeArray),
6151 => Some(Inner::NummultiRangeArray),
6152 => Some(Inner::TsmultiRangeArray),
6153 => Some(Inner::TstzmultiRangeArray),
6155 => Some(Inner::DatemultiRangeArray),
6157 => Some(Inner::Int8multiRangeArray),
_ => None, _ => None,
} }
} }
@ -524,6 +556,16 @@ impl Inner {
Inner::RegroleArray => 4097, Inner::RegroleArray => 4097,
Inner::Regcollation => 4191, Inner::Regcollation => 4191,
Inner::RegcollationArray => 4192, Inner::RegcollationArray => 4192,
Inner::Int4multiRange => 4451,
Inner::NummultiRange => 4532,
Inner::TsmultiRange => 4533,
Inner::TstzmultiRange => 4534,
Inner::DatemultiRange => 4535,
Inner::Int8multiRange => 4536,
Inner::AnymultiRange => 4537,
Inner::AnycompatiblemultiRange => 4538,
Inner::PgBrinBloomSummary => 4600,
Inner::PgBrinMinmaxMultiSummary => 4601,
Inner::PgMcvList => 5017, Inner::PgMcvList => 5017,
Inner::PgSnapshot => 5038, Inner::PgSnapshot => 5038,
Inner::PgSnapshotArray => 5039, Inner::PgSnapshotArray => 5039,
@ -532,6 +574,12 @@ impl Inner {
Inner::Anycompatiblearray => 5078, Inner::Anycompatiblearray => 5078,
Inner::Anycompatiblenonarray => 5079, Inner::Anycompatiblenonarray => 5079,
Inner::AnycompatibleRange => 5080, Inner::AnycompatibleRange => 5080,
Inner::Int4multiRangeArray => 6150,
Inner::NummultiRangeArray => 6151,
Inner::TsmultiRangeArray => 6152,
Inner::TstzmultiRangeArray => 6153,
Inner::DatemultiRangeArray => 6155,
Inner::Int8multiRangeArray => 6157,
Inner::Other(ref u) => u.oid, Inner::Other(ref u) => u.oid,
} }
} }
@ -699,6 +747,16 @@ impl Inner {
Inner::RegroleArray => &Kind::Array(Type(Inner::Regrole)), Inner::RegroleArray => &Kind::Array(Type(Inner::Regrole)),
Inner::Regcollation => &Kind::Simple, Inner::Regcollation => &Kind::Simple,
Inner::RegcollationArray => &Kind::Array(Type(Inner::Regcollation)), Inner::RegcollationArray => &Kind::Array(Type(Inner::Regcollation)),
Inner::Int4multiRange => &Kind::Multirange(Type(Inner::Int4)),
Inner::NummultiRange => &Kind::Multirange(Type(Inner::Numeric)),
Inner::TsmultiRange => &Kind::Multirange(Type(Inner::Timestamp)),
Inner::TstzmultiRange => &Kind::Multirange(Type(Inner::Timestamptz)),
Inner::DatemultiRange => &Kind::Multirange(Type(Inner::Date)),
Inner::Int8multiRange => &Kind::Multirange(Type(Inner::Int8)),
Inner::AnymultiRange => &Kind::Pseudo,
Inner::AnycompatiblemultiRange => &Kind::Pseudo,
Inner::PgBrinBloomSummary => &Kind::Simple,
Inner::PgBrinMinmaxMultiSummary => &Kind::Simple,
Inner::PgMcvList => &Kind::Simple, Inner::PgMcvList => &Kind::Simple,
Inner::PgSnapshot => &Kind::Simple, Inner::PgSnapshot => &Kind::Simple,
Inner::PgSnapshotArray => &Kind::Array(Type(Inner::PgSnapshot)), Inner::PgSnapshotArray => &Kind::Array(Type(Inner::PgSnapshot)),
@ -707,6 +765,12 @@ impl Inner {
Inner::Anycompatiblearray => &Kind::Pseudo, Inner::Anycompatiblearray => &Kind::Pseudo,
Inner::Anycompatiblenonarray => &Kind::Pseudo, Inner::Anycompatiblenonarray => &Kind::Pseudo,
Inner::AnycompatibleRange => &Kind::Pseudo, Inner::AnycompatibleRange => &Kind::Pseudo,
Inner::Int4multiRangeArray => &Kind::Array(Type(Inner::Int4multiRange)),
Inner::NummultiRangeArray => &Kind::Array(Type(Inner::NummultiRange)),
Inner::TsmultiRangeArray => &Kind::Array(Type(Inner::TsmultiRange)),
Inner::TstzmultiRangeArray => &Kind::Array(Type(Inner::TstzmultiRange)),
Inner::DatemultiRangeArray => &Kind::Array(Type(Inner::DatemultiRange)),
Inner::Int8multiRangeArray => &Kind::Array(Type(Inner::Int8multiRange)),
Inner::Other(ref u) => &u.kind, Inner::Other(ref u) => &u.kind,
} }
} }
@ -874,6 +938,16 @@ impl Inner {
Inner::RegroleArray => "_regrole", Inner::RegroleArray => "_regrole",
Inner::Regcollation => "regcollation", Inner::Regcollation => "regcollation",
Inner::RegcollationArray => "_regcollation", Inner::RegcollationArray => "_regcollation",
Inner::Int4multiRange => "int4multirange",
Inner::NummultiRange => "nummultirange",
Inner::TsmultiRange => "tsmultirange",
Inner::TstzmultiRange => "tstzmultirange",
Inner::DatemultiRange => "datemultirange",
Inner::Int8multiRange => "int8multirange",
Inner::AnymultiRange => "anymultirange",
Inner::AnycompatiblemultiRange => "anycompatiblemultirange",
Inner::PgBrinBloomSummary => "pg_brin_bloom_summary",
Inner::PgBrinMinmaxMultiSummary => "pg_brin_minmax_multi_summary",
Inner::PgMcvList => "pg_mcv_list", Inner::PgMcvList => "pg_mcv_list",
Inner::PgSnapshot => "pg_snapshot", Inner::PgSnapshot => "pg_snapshot",
Inner::PgSnapshotArray => "_pg_snapshot", Inner::PgSnapshotArray => "_pg_snapshot",
@ -882,6 +956,12 @@ impl Inner {
Inner::Anycompatiblearray => "anycompatiblearray", Inner::Anycompatiblearray => "anycompatiblearray",
Inner::Anycompatiblenonarray => "anycompatiblenonarray", Inner::Anycompatiblenonarray => "anycompatiblenonarray",
Inner::AnycompatibleRange => "anycompatiblerange", Inner::AnycompatibleRange => "anycompatiblerange",
Inner::Int4multiRangeArray => "_int4multirange",
Inner::NummultiRangeArray => "_nummultirange",
Inner::TsmultiRangeArray => "_tsmultirange",
Inner::TstzmultiRangeArray => "_tstzmultirange",
Inner::DatemultiRangeArray => "_datemultirange",
Inner::Int8multiRangeArray => "_int8multirange",
Inner::Other(ref u) => &u.name, Inner::Other(ref u) => &u.name,
} }
} }
@ -1370,6 +1450,36 @@ impl Type {
/// REGCOLLATION&#91;&#93; /// REGCOLLATION&#91;&#93;
pub const REGCOLLATION_ARRAY: Type = Type(Inner::RegcollationArray); pub const REGCOLLATION_ARRAY: Type = Type(Inner::RegcollationArray);
/// INT4MULTIRANGE - multirange of integers
pub const INT4MULTI_RANGE: Type = Type(Inner::Int4multiRange);
/// NUMMULTIRANGE - multirange of numerics
pub const NUMMULTI_RANGE: Type = Type(Inner::NummultiRange);
/// TSMULTIRANGE - multirange of timestamps without time zone
pub const TSMULTI_RANGE: Type = Type(Inner::TsmultiRange);
/// TSTZMULTIRANGE - multirange of timestamps with time zone
pub const TSTZMULTI_RANGE: Type = Type(Inner::TstzmultiRange);
/// DATEMULTIRANGE - multirange of dates
pub const DATEMULTI_RANGE: Type = Type(Inner::DatemultiRange);
/// INT8MULTIRANGE - multirange of bigints
pub const INT8MULTI_RANGE: Type = Type(Inner::Int8multiRange);
/// ANYMULTIRANGE - pseudo-type representing a polymorphic base type that is a multirange
pub const ANYMULTI_RANGE: Type = Type(Inner::AnymultiRange);
/// ANYCOMPATIBLEMULTIRANGE - pseudo-type representing a multirange over a polymorphic common type
pub const ANYCOMPATIBLEMULTI_RANGE: Type = Type(Inner::AnycompatiblemultiRange);
/// PG_BRIN_BLOOM_SUMMARY - BRIN bloom summary
pub const PG_BRIN_BLOOM_SUMMARY: Type = Type(Inner::PgBrinBloomSummary);
/// PG_BRIN_MINMAX_MULTI_SUMMARY - BRIN minmax-multi summary
pub const PG_BRIN_MINMAX_MULTI_SUMMARY: Type = Type(Inner::PgBrinMinmaxMultiSummary);
/// PG_MCV_LIST - multivariate MCV list /// PG_MCV_LIST - multivariate MCV list
pub const PG_MCV_LIST: Type = Type(Inner::PgMcvList); pub const PG_MCV_LIST: Type = Type(Inner::PgMcvList);
@ -1393,4 +1503,22 @@ impl Type {
/// ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type /// ANYCOMPATIBLERANGE - pseudo-type representing a range over a polymorphic common type
pub const ANYCOMPATIBLE_RANGE: Type = Type(Inner::AnycompatibleRange); pub const ANYCOMPATIBLE_RANGE: Type = Type(Inner::AnycompatibleRange);
/// INT4MULTIRANGE&#91;&#93;
pub const INT4MULTI_RANGE_ARRAY: Type = Type(Inner::Int4multiRangeArray);
/// NUMMULTIRANGE&#91;&#93;
pub const NUMMULTI_RANGE_ARRAY: Type = Type(Inner::NummultiRangeArray);
/// TSMULTIRANGE&#91;&#93;
pub const TSMULTI_RANGE_ARRAY: Type = Type(Inner::TsmultiRangeArray);
/// TSTZMULTIRANGE&#91;&#93;
pub const TSTZMULTI_RANGE_ARRAY: Type = Type(Inner::TstzmultiRangeArray);
/// DATEMULTIRANGE&#91;&#93;
pub const DATEMULTI_RANGE_ARRAY: Type = Type(Inner::DatemultiRangeArray);
/// INT8MULTIRANGE&#91;&#93;
pub const INT8MULTI_RANGE_ARRAY: Type = Type(Inner::Int8multiRangeArray);
} }

View File

@ -114,6 +114,7 @@ impl SqlState {
Inner::E2203D => "2203D", Inner::E2203D => "2203D",
Inner::E2203E => "2203E", Inner::E2203E => "2203E",
Inner::E2203F => "2203F", Inner::E2203F => "2203F",
Inner::E2203G => "2203G",
Inner::E23000 => "23000", Inner::E23000 => "23000",
Inner::E23001 => "23001", Inner::E23001 => "23001",
Inner::E23502 => "23502", Inner::E23502 => "23502",
@ -232,6 +233,7 @@ impl SqlState {
Inner::E57P02 => "57P02", Inner::E57P02 => "57P02",
Inner::E57P03 => "57P03", Inner::E57P03 => "57P03",
Inner::E57P04 => "57P04", Inner::E57P04 => "57P04",
Inner::E57P05 => "57P05",
Inner::E58000 => "58000", Inner::E58000 => "58000",
Inner::E58030 => "58030", Inner::E58030 => "58030",
Inner::E58P01 => "58P01", Inner::E58P01 => "58P01",
@ -579,6 +581,9 @@ impl SqlState {
/// 2203F /// 2203F
pub const SQL_JSON_SCALAR_REQUIRED: SqlState = SqlState(Inner::E2203F); pub const SQL_JSON_SCALAR_REQUIRED: SqlState = SqlState(Inner::E2203F);
/// 2203G
pub const SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE: SqlState = SqlState(Inner::E2203G);
/// 23000 /// 23000
pub const INTEGRITY_CONSTRAINT_VIOLATION: SqlState = SqlState(Inner::E23000); pub const INTEGRITY_CONSTRAINT_VIOLATION: SqlState = SqlState(Inner::E23000);
@ -946,6 +951,9 @@ impl SqlState {
/// 57P04 /// 57P04
pub const DATABASE_DROPPED: SqlState = SqlState(Inner::E57P04); pub const DATABASE_DROPPED: SqlState = SqlState(Inner::E57P04);
/// 57P05
pub const IDLE_SESSION_TIMEOUT: SqlState = SqlState(Inner::E57P05);
/// 58000 /// 58000
pub const SYSTEM_ERROR: SqlState = SqlState(Inner::E58000); pub const SYSTEM_ERROR: SqlState = SqlState(Inner::E58000);
@ -1174,6 +1182,7 @@ enum Inner {
E2203D, E2203D,
E2203E, E2203E,
E2203F, E2203F,
E2203G,
E23000, E23000,
E23001, E23001,
E23502, E23502,
@ -1292,6 +1301,7 @@ enum Inner {
E57P02, E57P02,
E57P03, E57P03,
E57P04, E57P04,
E57P05,
E58000, E58000,
E58030, E58030,
E58P01, E58P01,
@ -1342,317 +1352,319 @@ static SQLSTATE_MAP: phf::Map<&'static str, SqlState> =
::phf::Map { ::phf::Map {
key: 12913932095322966823, key: 12913932095322966823,
disps: &[ disps: &[
(0, 24),
(0, 12), (0, 12),
(0, 18),
(0, 25),
(0, 109),
(0, 147),
(0, 74), (0, 74),
(0, 0),
(7, 117),
(5, 221),
(0, 26),
(1, 45),
(0, 93),
(0, 25),
(0, 61),
(1, 221),
(10, 17),
(0, 77),
(2, 3),
(0, 216),
(0, 0),
(0, 1),
(1, 168),
(0, 64),
(0, 2),
(0, 7),
(1, 37),
(0, 83),
(3, 24),
(0, 0),
(0, 109), (0, 109),
(18, 9), (0, 11),
(1, 230), (0, 9),
(0, 0), (0, 0),
(0, 4), (4, 38),
(3, 155),
(0, 6),
(1, 242),
(0, 66),
(0, 53),
(5, 180),
(3, 221),
(7, 230),
(0, 125),
(1, 46),
(0, 11),
(1, 2),
(0, 5),
(0, 13),
(0, 171), (0, 171),
(0, 0), (0, 15),
(34, 97),
(2, 126),
(44, 49),
(5, 182),
(0, 1),
(0, 1),
(0, 71),
(0, 4), (0, 4),
(5, 164), (0, 22),
(1, 85),
(0, 75),
(2, 0),
(1, 25),
(7, 47),
(0, 45),
(0, 35),
(0, 7),
(7, 124),
(0, 0), (0, 0),
(0, 96), (14, 104),
(13, 58), (1, 183),
(0, 58), (61, 50),
(0, 242), (3, 76),
(0, 72), (0, 12),
(16, 53), (0, 7),
(4, 189),
(0, 1),
(64, 102),
(0, 0),
(16, 192),
(24, 19),
(0, 5),
(0, 87),
(0, 89),
(0, 14),
], ],
entries: &[ entries: &[
("22034", SqlState::MORE_THAN_ONE_SQL_JSON_ITEM),
("40P01", SqlState::T_R_DEADLOCK_DETECTED),
("42703", SqlState::UNDEFINED_COLUMN),
("42P07", SqlState::DUPLICATE_TABLE),
("55P04", SqlState::UNSAFE_NEW_ENUM_VALUE_USAGE),
("25006", SqlState::READ_ONLY_SQL_TRANSACTION),
("2201X", SqlState::INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE),
("HV021", SqlState::FDW_INCONSISTENT_DESCRIPTOR_INFORMATION),
("42P02", SqlState::UNDEFINED_PARAMETER),
("HV00C", SqlState::FDW_INVALID_OPTION_INDEX),
("08003", SqlState::CONNECTION_DOES_NOT_EXIST),
("02000", SqlState::NO_DATA),
("24000", SqlState::INVALID_CURSOR_STATE),
("2203C", SqlState::SQL_JSON_OBJECT_NOT_FOUND),
("42601", SqlState::SYNTAX_ERROR),
("22012", SqlState::DIVISION_BY_ZERO),
("2203B", SqlState::SQL_JSON_NUMBER_NOT_FOUND),
("P0003", SqlState::TOO_MANY_ROWS),
("57P04", SqlState::DATABASE_DROPPED),
("27000", SqlState::TRIGGERED_DATA_CHANGE_VIOLATION),
("42P08", SqlState::AMBIGUOUS_PARAMETER),
("3F000", SqlState::INVALID_SCHEMA_NAME),
("42883", SqlState::UNDEFINED_FUNCTION),
("20000", SqlState::CASE_NOT_FOUND),
("2200G", SqlState::MOST_SPECIFIC_TYPE_MISMATCH),
("42939", SqlState::RESERVED_NAME),
("42602", SqlState::INVALID_NAME),
("HV004", SqlState::FDW_INVALID_DATA_TYPE),
("HV007", SqlState::FDW_INVALID_COLUMN_NAME),
("2F005", SqlState::S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT),
("22030", SqlState::DUPLICATE_JSON_OBJECT_KEY_VALUE),
("53100", SqlState::DISK_FULL),
("HV005", SqlState::FDW_COLUMN_NAME_NOT_FOUND),
("2200H", SqlState::SEQUENCE_GENERATOR_LIMIT_EXCEEDED),
("2201W", SqlState::INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
("42712", SqlState::DUPLICATE_ALIAS),
("42622", SqlState::NAME_TOO_LONG),
("22035", SqlState::NO_SQL_JSON_ITEM),
("42P18", SqlState::INDETERMINATE_DATATYPE),
("39P01", SqlState::E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
("01000", SqlState::WARNING),
("2F004", SqlState::S_R_E_READING_SQL_DATA_NOT_PERMITTED),
("22023", SqlState::INVALID_PARAMETER_VALUE),
("2200T", SqlState::INVALID_XML_PROCESSING_INSTRUCTION),
("22013", SqlState::INVALID_PRECEDING_OR_FOLLOWING_SIZE),
("57P01", SqlState::ADMIN_SHUTDOWN),
("2202E", SqlState::ARRAY_ELEMENT_ERROR),
("22018", SqlState::INVALID_CHARACTER_VALUE_FOR_CAST),
("0F000", SqlState::LOCATOR_EXCEPTION),
("2D000", SqlState::INVALID_TRANSACTION_TERMINATION),
("HV009", SqlState::FDW_INVALID_USE_OF_NULL_POINTER),
("57000", SqlState::OPERATOR_INTERVENTION),
("25002", SqlState::BRANCH_TRANSACTION_ALREADY_ACTIVE),
("25004", SqlState::INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION),
("22009", SqlState::INVALID_TIME_ZONE_DISPLACEMENT_VALUE),
("HV090", SqlState::FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH),
("42725", SqlState::AMBIGUOUS_FUNCTION),
("2F003", SqlState::S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
("44000", SqlState::WITH_CHECK_OPTION_VIOLATION),
("22032", SqlState::INVALID_JSON_TEXT),
("22036", SqlState::NON_NUMERIC_SQL_JSON_ITEM),
("2201E", SqlState::INVALID_ARGUMENT_FOR_LOG),
("25P02", SqlState::IN_FAILED_SQL_TRANSACTION),
("22001", SqlState::STRING_DATA_RIGHT_TRUNCATION),
("2201F", SqlState::INVALID_ARGUMENT_FOR_POWER_FUNCTION),
("01006", SqlState::WARNING_PRIVILEGE_NOT_REVOKED),
("428C9", SqlState::GENERATED_ALWAYS),
("22003", SqlState::NUMERIC_VALUE_OUT_OF_RANGE),
("22P01", SqlState::FLOATING_POINT_EXCEPTION),
("HV00M", SqlState::FDW_UNABLE_TO_CREATE_REPLY),
("2201G", SqlState::INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
("34000", SqlState::INVALID_CURSOR_NAME),
("42846", SqlState::CANNOT_COERCE),
("2201B", SqlState::INVALID_REGULAR_EXPRESSION),
("2202G", SqlState::INVALID_TABLESAMPLE_REPEAT),
("42704", SqlState::UNDEFINED_OBJECT),
("72000", SqlState::SNAPSHOT_TOO_OLD),
("53400", SqlState::CONFIGURATION_LIMIT_EXCEEDED),
("HV00L", SqlState::FDW_UNABLE_TO_CREATE_EXECUTION),
("2B000", SqlState::DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST),
("22010", SqlState::INVALID_INDICATOR_PARAMETER_VALUE),
("54001", SqlState::STATEMENT_TOO_COMPLEX),
("53200", SqlState::OUT_OF_MEMORY),
("38001", SqlState::E_R_E_CONTAINING_SQL_NOT_PERMITTED),
("22022", SqlState::INDICATOR_OVERFLOW),
("2203E", SqlState::TOO_MANY_JSON_OBJECT_MEMBERS),
("XX000", SqlState::INTERNAL_ERROR),
("22025", SqlState::INVALID_ESCAPE_SEQUENCE),
("09000", SqlState::TRIGGERED_ACTION_EXCEPTION),
("HV008", SqlState::FDW_INVALID_COLUMN_NUMBER),
("25P01", SqlState::NO_ACTIVE_SQL_TRANSACTION),
("23505", SqlState::UNIQUE_VIOLATION),
("3B000", SqlState::SAVEPOINT_EXCEPTION),
("F0000", SqlState::CONFIG_FILE_ERROR),
("54011", SqlState::TOO_MANY_COLUMNS),
("XX002", SqlState::INDEX_CORRUPTED),
("2203F", SqlState::SQL_JSON_SCALAR_REQUIRED),
("42P12", SqlState::INVALID_DATABASE_DEFINITION),
("HV00B", SqlState::FDW_INVALID_HANDLE),
("55006", SqlState::OBJECT_IN_USE),
("42P01", SqlState::UNDEFINED_TABLE),
("25P03", SqlState::IDLE_IN_TRANSACTION_SESSION_TIMEOUT),
("22037", SqlState::NON_UNIQUE_KEYS_IN_A_JSON_OBJECT),
("2203A", SqlState::SQL_JSON_MEMBER_NOT_FOUND),
("P0004", SqlState::ASSERT_FAILURE),
("58000", SqlState::SYSTEM_ERROR),
("42P21", SqlState::COLLATION_MISMATCH),
("57P02", SqlState::CRASH_SHUTDOWN),
("42830", SqlState::INVALID_FOREIGN_KEY),
("0LP01", SqlState::INVALID_GRANT_OPERATION),
("22P02", SqlState::INVALID_TEXT_REPRESENTATION),
("22039", SqlState::SQL_JSON_ARRAY_NOT_FOUND),
("28P01", SqlState::INVALID_PASSWORD),
("22011", SqlState::SUBSTRING_ERROR),
("HV00J", SqlState::FDW_OPTION_NAME_NOT_FOUND),
("2200C", SqlState::INVALID_USE_OF_ESCAPE_CHARACTER),
("08006", SqlState::CONNECTION_FAILURE),
("22021", SqlState::CHARACTER_NOT_IN_REPERTOIRE),
("21000", SqlState::CARDINALITY_VIOLATION),
("42803", SqlState::GROUPING_ERROR),
("00000", SqlState::SUCCESSFUL_COMPLETION),
("42P16", SqlState::INVALID_TABLE_DEFINITION),
("38002", SqlState::E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED),
("57P03", SqlState::CANNOT_CONNECT_NOW),
("01004", SqlState::WARNING_STRING_DATA_RIGHT_TRUNCATION),
("HV00K", SqlState::FDW_REPLY_HANDLE),
("42P06", SqlState::DUPLICATE_SCHEMA),
("54000", SqlState::PROGRAM_LIMIT_EXCEEDED),
("2200S", SqlState::INVALID_XML_COMMENT),
("42000", SqlState::SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION),
("42P03", SqlState::DUPLICATE_CURSOR),
("HV002", SqlState::FDW_DYNAMIC_PARAMETER_VALUE_NEEDED),
("2202H", SqlState::INVALID_TABLESAMPLE_ARGUMENT),
("08001", SqlState::SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
("0L000", SqlState::INVALID_GRANTOR),
("2200L", SqlState::NOT_AN_XML_DOCUMENT),
("HV006", SqlState::FDW_INVALID_DATA_TYPE_DESCRIPTORS),
("55000", SqlState::OBJECT_NOT_IN_PREREQUISITE_STATE),
("58P01", SqlState::UNDEFINED_FILE),
("0B000", SqlState::INVALID_TRANSACTION_INITIATION),
("22000", SqlState::DATA_EXCEPTION),
("HV00R", SqlState::FDW_TABLE_NOT_FOUND),
("2F002", SqlState::S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED),
("01007", SqlState::WARNING_PRIVILEGE_NOT_GRANTED),
("42P19", SqlState::INVALID_RECURSION),
("22016", SqlState::INVALID_ARGUMENT_FOR_NTH_VALUE),
("42702", SqlState::AMBIGUOUS_COLUMN),
("25005", SqlState::NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION),
("22004", SqlState::NULL_VALUE_NOT_ALLOWED),
("42P05", SqlState::DUPLICATE_PSTATEMENT),
("39001", SqlState::E_R_I_E_INVALID_SQLSTATE_RETURNED),
("22038", SqlState::SINGLETON_SQL_JSON_ITEM_REQUIRED),
("22008", SqlState::DATETIME_FIELD_OVERFLOW),
("38003", SqlState::E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
("53000", SqlState::INSUFFICIENT_RESOURCES),
("3B001", SqlState::S_E_INVALID_SPECIFICATION),
("28000", SqlState::INVALID_AUTHORIZATION_SPECIFICATION),
("P0000", SqlState::PLPGSQL_ERROR),
("38000", SqlState::EXTERNAL_ROUTINE_EXCEPTION),
("22019", SqlState::INVALID_ESCAPE_CHARACTER),
("22015", SqlState::INTERVAL_FIELD_OVERFLOW),
("42710", SqlState::DUPLICATE_OBJECT),
("2200M", SqlState::INVALID_XML_DOCUMENT),
("HV000", SqlState::FDW_ERROR),
("22P05", SqlState::UNTRANSLATABLE_CHARACTER),
("0100C", SqlState::WARNING_DYNAMIC_RESULT_SETS_RETURNED),
("55P02", SqlState::CANT_CHANGE_RUNTIME_PARAM),
("01003", SqlState::WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION),
("2200N", SqlState::INVALID_XML_CONTENT),
("2F000", SqlState::SQL_ROUTINE_EXCEPTION), ("2F000", SqlState::SQL_ROUTINE_EXCEPTION),
("08007", SqlState::TRANSACTION_RESOLUTION_UNKNOWN),
("2200B", SqlState::ESCAPE_CHARACTER_CONFLICT),
("22P03", SqlState::INVALID_BINARY_REPRESENTATION),
("42P09", SqlState::AMBIGUOUS_ALIAS),
("39004", SqlState::E_R_I_E_NULL_VALUE_NOT_ALLOWED),
("23502", SqlState::NOT_NULL_VIOLATION),
("2203D", SqlState::TOO_MANY_JSON_ARRAY_ELEMENTS),
("42P15", SqlState::INVALID_SCHEMA_DEFINITION),
("08004", SqlState::SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION),
("HV00N", SqlState::FDW_UNABLE_TO_ESTABLISH_CONNECTION),
("0A000", SqlState::FEATURE_NOT_SUPPORTED),
("57014", SqlState::QUERY_CANCELED),
("22033", SqlState::INVALID_SQL_JSON_SUBSCRIPT),
("0F001", SqlState::L_E_INVALID_SPECIFICATION),
("HV00A", SqlState::FDW_INVALID_STRING_FORMAT),
("39P02", SqlState::E_R_I_E_SRF_PROTOCOL_VIOLATED),
("42701", SqlState::DUPLICATE_COLUMN),
("42611", SqlState::INVALID_COLUMN_DEFINITION),
("HV001", SqlState::FDW_OUT_OF_MEMORY),
("HV091", SqlState::FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER),
("23P01", SqlState::EXCLUSION_VIOLATION),
("F0001", SqlState::LOCK_FILE_EXISTS),
("42501", SqlState::INSUFFICIENT_PRIVILEGE),
("22026", SqlState::STRING_DATA_LENGTH_MISMATCH),
("54023", SqlState::TOO_MANY_ARGUMENTS),
("01008", SqlState::WARNING_IMPLICIT_ZERO_BIT_PADDING), ("01008", SqlState::WARNING_IMPLICIT_ZERO_BIT_PADDING),
("42P04", SqlState::DUPLICATE_DATABASE), ("42501", SqlState::INSUFFICIENT_PRIVILEGE),
("22027", SqlState::TRIM_ERROR), ("22000", SqlState::DATA_EXCEPTION),
("53300", SqlState::TOO_MANY_CONNECTIONS), ("0100C", SqlState::WARNING_DYNAMIC_RESULT_SETS_RETURNED),
("0Z002", SqlState::STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER), ("2200N", SqlState::INVALID_XML_CONTENT),
("42P14", SqlState::INVALID_PSTATEMENT_DEFINITION),
("P0001", SqlState::RAISE_EXCEPTION),
("HV014", SqlState::FDW_TOO_MANY_HANDLES),
("40002", SqlState::T_R_INTEGRITY_CONSTRAINT_VIOLATION),
("3D000", SqlState::INVALID_CATALOG_NAME),
("03000", SqlState::SQL_STATEMENT_NOT_YET_COMPLETE),
("22024", SqlState::UNTERMINATED_C_STRING),
("42P13", SqlState::INVALID_FUNCTION_DEFINITION),
("08000", SqlState::CONNECTION_EXCEPTION),
("25007", SqlState::SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED),
("40001", SqlState::T_R_SERIALIZATION_FAILURE), ("40001", SqlState::T_R_SERIALIZATION_FAILURE),
("28P01", SqlState::INVALID_PASSWORD),
("38000", SqlState::EXTERNAL_ROUTINE_EXCEPTION),
("25006", SqlState::READ_ONLY_SQL_TRANSACTION),
("2203D", SqlState::TOO_MANY_JSON_ARRAY_ELEMENTS),
("42P09", SqlState::AMBIGUOUS_ALIAS),
("F0000", SqlState::CONFIG_FILE_ERROR),
("42P18", SqlState::INDETERMINATE_DATATYPE),
("40002", SqlState::T_R_INTEGRITY_CONSTRAINT_VIOLATION),
("22009", SqlState::INVALID_TIME_ZONE_DISPLACEMENT_VALUE),
("42P08", SqlState::AMBIGUOUS_PARAMETER),
("08000", SqlState::CONNECTION_EXCEPTION),
("25P01", SqlState::NO_ACTIVE_SQL_TRANSACTION),
("22024", SqlState::UNTERMINATED_C_STRING),
("55000", SqlState::OBJECT_NOT_IN_PREREQUISITE_STATE),
("25001", SqlState::ACTIVE_SQL_TRANSACTION), ("25001", SqlState::ACTIVE_SQL_TRANSACTION),
("HV00Q", SqlState::FDW_SCHEMA_NOT_FOUND), ("03000", SqlState::SQL_STATEMENT_NOT_YET_COMPLETE),
("22P04", SqlState::BAD_COPY_FILE_FORMAT), ("42710", SqlState::DUPLICATE_OBJECT),
("XX001", SqlState::DATA_CORRUPTED), ("2D000", SqlState::INVALID_TRANSACTION_TERMINATION),
("23503", SqlState::FOREIGN_KEY_VIOLATION), ("2200G", SqlState::MOST_SPECIFIC_TYPE_MISMATCH),
("23514", SqlState::CHECK_VIOLATION), ("22022", SqlState::INDICATOR_OVERFLOW),
("42809", SqlState::WRONG_OBJECT_TYPE), ("55006", SqlState::OBJECT_IN_USE),
("2200F", SqlState::ZERO_LENGTH_CHARACTER_STRING), ("53200", SqlState::OUT_OF_MEMORY),
("2BP01", SqlState::DEPENDENT_OBJECTS_STILL_EXIST), ("22012", SqlState::DIVISION_BY_ZERO),
("25008", SqlState::HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL),
("55P03", SqlState::LOCK_NOT_AVAILABLE),
("42P22", SqlState::INDETERMINATE_COLLATION),
("HV00D", SqlState::FDW_INVALID_OPTION_NAME),
("42P17", SqlState::INVALID_OBJECT_DEFINITION),
("23001", SqlState::RESTRICT_VIOLATION),
("22P06", SqlState::NONSTANDARD_USE_OF_ESCAPE_CHARACTER),
("22031", SqlState::INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
("2200D", SqlState::INVALID_ESCAPE_OCTET),
("0Z000", SqlState::DIAGNOSTICS_EXCEPTION),
("HV024", SqlState::FDW_INVALID_ATTRIBUTE_VALUE),
("22005", SqlState::ERROR_IN_ASSIGNMENT),
("58P02", SqlState::DUPLICATE_FILE),
("HV00P", SqlState::FDW_NO_SCHEMAS),
("42P10", SqlState::INVALID_COLUMN_REFERENCE),
("42P20", SqlState::WINDOWING_ERROR),
("25000", SqlState::INVALID_TRANSACTION_STATE),
("38004", SqlState::E_R_E_READING_SQL_DATA_NOT_PERMITTED),
("01P01", SqlState::WARNING_DEPRECATED_FEATURE),
("40000", SqlState::TRANSACTION_ROLLBACK),
("58030", SqlState::IO_ERROR),
("26000", SqlState::INVALID_SQL_STATEMENT_NAME),
("22007", SqlState::INVALID_DATETIME_FORMAT),
("23000", SqlState::INTEGRITY_CONSTRAINT_VIOLATION),
("0P000", SqlState::INVALID_ROLE_SPECIFICATION),
("22014", SqlState::INVALID_ARGUMENT_FOR_NTILE),
("P0002", SqlState::NO_DATA_FOUND), ("P0002", SqlState::NO_DATA_FOUND),
("39P03", SqlState::E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED), ("XX001", SqlState::DATA_CORRUPTED),
("39000", SqlState::EXTERNAL_ROUTINE_INVOCATION_EXCEPTION), ("22P05", SqlState::UNTRANSLATABLE_CHARACTER),
("42P11", SqlState::INVALID_CURSOR_DEFINITION),
("HV010", SqlState::FDW_FUNCTION_SEQUENCE_ERROR),
("22002", SqlState::NULL_VALUE_NO_INDICATOR_PARAMETER),
("08P01", SqlState::PROTOCOL_VIOLATION),
("42723", SqlState::DUPLICATE_FUNCTION),
("40003", SqlState::T_R_STATEMENT_COMPLETION_UNKNOWN), ("40003", SqlState::T_R_STATEMENT_COMPLETION_UNKNOWN),
("25003", SqlState::INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION), ("22021", SqlState::CHARACTER_NOT_IN_REPERTOIRE),
("02001", SqlState::NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED), ("25000", SqlState::INVALID_TRANSACTION_STATE),
("42P15", SqlState::INVALID_SCHEMA_DEFINITION),
("0B000", SqlState::INVALID_TRANSACTION_INITIATION),
("22004", SqlState::NULL_VALUE_NOT_ALLOWED),
("42804", SqlState::DATATYPE_MISMATCH), ("42804", SqlState::DATATYPE_MISMATCH),
("42803", SqlState::GROUPING_ERROR),
("02001", SqlState::NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED),
("25002", SqlState::BRANCH_TRANSACTION_ALREADY_ACTIVE),
("28000", SqlState::INVALID_AUTHORIZATION_SPECIFICATION),
("HV009", SqlState::FDW_INVALID_USE_OF_NULL_POINTER),
("22P01", SqlState::FLOATING_POINT_EXCEPTION),
("2B000", SqlState::DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST),
("42723", SqlState::DUPLICATE_FUNCTION),
("21000", SqlState::CARDINALITY_VIOLATION),
("0Z002", SqlState::STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER),
("23505", SqlState::UNIQUE_VIOLATION),
("HV00J", SqlState::FDW_OPTION_NAME_NOT_FOUND),
("23P01", SqlState::EXCLUSION_VIOLATION),
("39P03", SqlState::E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED),
("42P10", SqlState::INVALID_COLUMN_REFERENCE),
("2202H", SqlState::INVALID_TABLESAMPLE_ARGUMENT),
("55P04", SqlState::UNSAFE_NEW_ENUM_VALUE_USAGE),
("P0000", SqlState::PLPGSQL_ERROR),
("2F005", SqlState::S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT),
("HV00M", SqlState::FDW_UNABLE_TO_CREATE_REPLY),
("0A000", SqlState::FEATURE_NOT_SUPPORTED),
("24000", SqlState::INVALID_CURSOR_STATE),
("25008", SqlState::HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL),
("01003", SqlState::WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION),
("42712", SqlState::DUPLICATE_ALIAS),
("HV014", SqlState::FDW_TOO_MANY_HANDLES),
("58030", SqlState::IO_ERROR),
("2201W", SqlState::INVALID_ROW_COUNT_IN_LIMIT_CLAUSE),
("22033", SqlState::INVALID_SQL_JSON_SUBSCRIPT),
("2BP01", SqlState::DEPENDENT_OBJECTS_STILL_EXIST),
("HV005", SqlState::FDW_COLUMN_NAME_NOT_FOUND),
("25004", SqlState::INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION),
("54000", SqlState::PROGRAM_LIMIT_EXCEEDED),
("20000", SqlState::CASE_NOT_FOUND),
("2203G", SqlState::SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE),
("22038", SqlState::SINGLETON_SQL_JSON_ITEM_REQUIRED),
("22007", SqlState::INVALID_DATETIME_FORMAT),
("08004", SqlState::SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION),
("2200H", SqlState::SEQUENCE_GENERATOR_LIMIT_EXCEEDED),
("HV00D", SqlState::FDW_INVALID_OPTION_NAME),
("P0004", SqlState::ASSERT_FAILURE),
("22018", SqlState::INVALID_CHARACTER_VALUE_FOR_CAST),
("0L000", SqlState::INVALID_GRANTOR),
("22P04", SqlState::BAD_COPY_FILE_FORMAT),
("22031", SqlState::INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION),
("01P01", SqlState::WARNING_DEPRECATED_FEATURE),
("0LP01", SqlState::INVALID_GRANT_OPERATION),
("58P02", SqlState::DUPLICATE_FILE),
("26000", SqlState::INVALID_SQL_STATEMENT_NAME),
("54001", SqlState::STATEMENT_TOO_COMPLEX),
("22010", SqlState::INVALID_INDICATOR_PARAMETER_VALUE),
("HV00C", SqlState::FDW_INVALID_OPTION_INDEX),
("22008", SqlState::DATETIME_FIELD_OVERFLOW),
("42P06", SqlState::DUPLICATE_SCHEMA),
("25007", SqlState::SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED),
("42P20", SqlState::WINDOWING_ERROR),
("HV091", SqlState::FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER),
("HV021", SqlState::FDW_INCONSISTENT_DESCRIPTOR_INFORMATION),
("42702", SqlState::AMBIGUOUS_COLUMN),
("02000", SqlState::NO_DATA),
("54011", SqlState::TOO_MANY_COLUMNS),
("HV004", SqlState::FDW_INVALID_DATA_TYPE),
("01006", SqlState::WARNING_PRIVILEGE_NOT_REVOKED),
("42701", SqlState::DUPLICATE_COLUMN),
("08P01", SqlState::PROTOCOL_VIOLATION),
("42622", SqlState::NAME_TOO_LONG),
("P0003", SqlState::TOO_MANY_ROWS),
("22003", SqlState::NUMERIC_VALUE_OUT_OF_RANGE),
("42P03", SqlState::DUPLICATE_CURSOR),
("23001", SqlState::RESTRICT_VIOLATION),
("57000", SqlState::OPERATOR_INTERVENTION),
("22027", SqlState::TRIM_ERROR),
("42P12", SqlState::INVALID_DATABASE_DEFINITION),
("3B000", SqlState::SAVEPOINT_EXCEPTION),
("2201B", SqlState::INVALID_REGULAR_EXPRESSION),
("22030", SqlState::DUPLICATE_JSON_OBJECT_KEY_VALUE),
("2F004", SqlState::S_R_E_READING_SQL_DATA_NOT_PERMITTED),
("428C9", SqlState::GENERATED_ALWAYS),
("2200S", SqlState::INVALID_XML_COMMENT),
("22039", SqlState::SQL_JSON_ARRAY_NOT_FOUND),
("42809", SqlState::WRONG_OBJECT_TYPE),
("2201X", SqlState::INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE),
("39001", SqlState::E_R_I_E_INVALID_SQLSTATE_RETURNED),
("25P02", SqlState::IN_FAILED_SQL_TRANSACTION),
("0P000", SqlState::INVALID_ROLE_SPECIFICATION),
("HV00N", SqlState::FDW_UNABLE_TO_ESTABLISH_CONNECTION),
("53100", SqlState::DISK_FULL),
("42601", SqlState::SYNTAX_ERROR),
("23000", SqlState::INTEGRITY_CONSTRAINT_VIOLATION),
("HV006", SqlState::FDW_INVALID_DATA_TYPE_DESCRIPTORS),
("HV00B", SqlState::FDW_INVALID_HANDLE),
("HV00Q", SqlState::FDW_SCHEMA_NOT_FOUND),
("01000", SqlState::WARNING),
("42883", SqlState::UNDEFINED_FUNCTION),
("57P01", SqlState::ADMIN_SHUTDOWN),
("22037", SqlState::NON_UNIQUE_KEYS_IN_A_JSON_OBJECT),
("00000", SqlState::SUCCESSFUL_COMPLETION),
("55P03", SqlState::LOCK_NOT_AVAILABLE),
("42P01", SqlState::UNDEFINED_TABLE),
("42830", SqlState::INVALID_FOREIGN_KEY),
("22005", SqlState::ERROR_IN_ASSIGNMENT),
("22025", SqlState::INVALID_ESCAPE_SEQUENCE),
("XX002", SqlState::INDEX_CORRUPTED),
("42P16", SqlState::INVALID_TABLE_DEFINITION),
("55P02", SqlState::CANT_CHANGE_RUNTIME_PARAM),
("22019", SqlState::INVALID_ESCAPE_CHARACTER),
("P0001", SqlState::RAISE_EXCEPTION),
("72000", SqlState::SNAPSHOT_TOO_OLD),
("42P11", SqlState::INVALID_CURSOR_DEFINITION),
("40P01", SqlState::T_R_DEADLOCK_DETECTED),
("57P02", SqlState::CRASH_SHUTDOWN),
("HV00A", SqlState::FDW_INVALID_STRING_FORMAT),
("2F002", SqlState::S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED),
("23503", SqlState::FOREIGN_KEY_VIOLATION),
("40000", SqlState::TRANSACTION_ROLLBACK),
("22032", SqlState::INVALID_JSON_TEXT),
("2202E", SqlState::ARRAY_ELEMENT_ERROR),
("42P19", SqlState::INVALID_RECURSION),
("42611", SqlState::INVALID_COLUMN_DEFINITION),
("42P13", SqlState::INVALID_FUNCTION_DEFINITION),
("25003", SqlState::INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION),
("39P02", SqlState::E_R_I_E_SRF_PROTOCOL_VIOLATED),
("XX000", SqlState::INTERNAL_ERROR),
("08006", SqlState::CONNECTION_FAILURE),
("57P04", SqlState::DATABASE_DROPPED),
("42P07", SqlState::DUPLICATE_TABLE),
("22P03", SqlState::INVALID_BINARY_REPRESENTATION),
("22035", SqlState::NO_SQL_JSON_ITEM),
("42P14", SqlState::INVALID_PSTATEMENT_DEFINITION),
("01007", SqlState::WARNING_PRIVILEGE_NOT_GRANTED),
("38004", SqlState::E_R_E_READING_SQL_DATA_NOT_PERMITTED),
("42P21", SqlState::COLLATION_MISMATCH),
("0Z000", SqlState::DIAGNOSTICS_EXCEPTION),
("HV001", SqlState::FDW_OUT_OF_MEMORY),
("0F000", SqlState::LOCATOR_EXCEPTION),
("22013", SqlState::INVALID_PRECEDING_OR_FOLLOWING_SIZE),
("2201E", SqlState::INVALID_ARGUMENT_FOR_LOG),
("22011", SqlState::SUBSTRING_ERROR),
("42602", SqlState::INVALID_NAME),
("01004", SqlState::WARNING_STRING_DATA_RIGHT_TRUNCATION),
("42P02", SqlState::UNDEFINED_PARAMETER),
("2203C", SqlState::SQL_JSON_OBJECT_NOT_FOUND),
("HV002", SqlState::FDW_DYNAMIC_PARAMETER_VALUE_NEEDED),
("0F001", SqlState::L_E_INVALID_SPECIFICATION),
("58P01", SqlState::UNDEFINED_FILE),
("38001", SqlState::E_R_E_CONTAINING_SQL_NOT_PERMITTED),
("42703", SqlState::UNDEFINED_COLUMN),
("57P05", SqlState::IDLE_SESSION_TIMEOUT),
("57P03", SqlState::CANNOT_CONNECT_NOW),
("HV007", SqlState::FDW_INVALID_COLUMN_NAME),
("22014", SqlState::INVALID_ARGUMENT_FOR_NTILE),
("22P06", SqlState::NONSTANDARD_USE_OF_ESCAPE_CHARACTER),
("2203F", SqlState::SQL_JSON_SCALAR_REQUIRED),
("2200F", SqlState::ZERO_LENGTH_CHARACTER_STRING),
("09000", SqlState::TRIGGERED_ACTION_EXCEPTION),
("2201F", SqlState::INVALID_ARGUMENT_FOR_POWER_FUNCTION),
("08003", SqlState::CONNECTION_DOES_NOT_EXIST),
("38002", SqlState::E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED),
("F0001", SqlState::LOCK_FILE_EXISTS),
("42P22", SqlState::INDETERMINATE_COLLATION),
("2200C", SqlState::INVALID_USE_OF_ESCAPE_CHARACTER),
("2203E", SqlState::TOO_MANY_JSON_OBJECT_MEMBERS),
("23514", SqlState::CHECK_VIOLATION),
("22P02", SqlState::INVALID_TEXT_REPRESENTATION),
("54023", SqlState::TOO_MANY_ARGUMENTS),
("2200T", SqlState::INVALID_XML_PROCESSING_INSTRUCTION),
("22016", SqlState::INVALID_ARGUMENT_FOR_NTH_VALUE),
("25P03", SqlState::IDLE_IN_TRANSACTION_SESSION_TIMEOUT),
("3B001", SqlState::S_E_INVALID_SPECIFICATION),
("08001", SqlState::SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
("22036", SqlState::NON_NUMERIC_SQL_JSON_ITEM),
("3F000", SqlState::INVALID_SCHEMA_NAME),
("39P01", SqlState::E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
("22026", SqlState::STRING_DATA_LENGTH_MISMATCH),
("42P17", SqlState::INVALID_OBJECT_DEFINITION),
("22034", SqlState::MORE_THAN_ONE_SQL_JSON_ITEM),
("HV000", SqlState::FDW_ERROR),
("2200B", SqlState::ESCAPE_CHARACTER_CONFLICT),
("HV008", SqlState::FDW_INVALID_COLUMN_NUMBER),
("34000", SqlState::INVALID_CURSOR_NAME),
("2201G", SqlState::INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION),
("44000", SqlState::WITH_CHECK_OPTION_VIOLATION),
("HV010", SqlState::FDW_FUNCTION_SEQUENCE_ERROR),
("39004", SqlState::E_R_I_E_NULL_VALUE_NOT_ALLOWED),
("22001", SqlState::STRING_DATA_RIGHT_TRUNCATION),
("3D000", SqlState::INVALID_CATALOG_NAME),
("25005", SqlState::NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION),
("2200L", SqlState::NOT_AN_XML_DOCUMENT),
("27000", SqlState::TRIGGERED_DATA_CHANGE_VIOLATION),
("HV090", SqlState::FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH),
("42939", SqlState::RESERVED_NAME),
("58000", SqlState::SYSTEM_ERROR),
("2200M", SqlState::INVALID_XML_DOCUMENT),
("HV00L", SqlState::FDW_UNABLE_TO_CREATE_EXECUTION),
("57014", SqlState::QUERY_CANCELED),
("23502", SqlState::NOT_NULL_VIOLATION),
("22002", SqlState::NULL_VALUE_NO_INDICATOR_PARAMETER),
("HV00R", SqlState::FDW_TABLE_NOT_FOUND),
("HV00P", SqlState::FDW_NO_SCHEMAS),
("38003", SqlState::E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
("39000", SqlState::EXTERNAL_ROUTINE_INVOCATION_EXCEPTION),
("22015", SqlState::INTERVAL_FIELD_OVERFLOW),
("HV00K", SqlState::FDW_REPLY_HANDLE),
("HV024", SqlState::FDW_INVALID_ATTRIBUTE_VALUE),
("2200D", SqlState::INVALID_ESCAPE_OCTET),
("08007", SqlState::TRANSACTION_RESOLUTION_UNKNOWN),
("2F003", SqlState::S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
("42725", SqlState::AMBIGUOUS_FUNCTION),
("2203A", SqlState::SQL_JSON_MEMBER_NOT_FOUND),
("42846", SqlState::CANNOT_COERCE),
("42P04", SqlState::DUPLICATE_DATABASE),
("42000", SqlState::SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION),
("2203B", SqlState::SQL_JSON_NUMBER_NOT_FOUND),
("42P05", SqlState::DUPLICATE_PSTATEMENT),
("53300", SqlState::TOO_MANY_CONNECTIONS),
("53400", SqlState::CONFIGURATION_LIMIT_EXCEEDED),
("42704", SqlState::UNDEFINED_OBJECT),
("2202G", SqlState::INVALID_TABLESAMPLE_REPEAT),
("22023", SqlState::INVALID_PARAMETER_VALUE),
("53000", SqlState::INSUFFICIENT_RESOURCES),
], ],
}; };