diff --git a/codegen/src/errcodes.txt b/codegen/src/errcodes.txt index 4f354717..867e98b6 100644 --- a/codegen/src/errcodes.txt +++ b/codegen/src/errcodes.txt @@ -2,7 +2,7 @@ # errcodes.txt # PostgreSQL error codes # -# Copyright (c) 2003-2017, PostgreSQL Global Development Group +# Copyright (c) 2003-2019, 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 @@ -18,7 +18,7 @@ # src/pl/tcl/pltclerrcodes.h # the same, for PL/Tcl # -# doc/src/sgml/errcodes-list.sgml +# doc/src/sgml/errcodes-table.sgml # a SGML table of error codes for inclusion in the documentation # # The format of this file is one error code per line, with the following @@ -177,6 +177,7 @@ Section: Class 22 - Data Exception 22P06 E ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER nonstandard_use_of_escape_character 22010 E ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE invalid_indicator_parameter_value 22023 E ERRCODE_INVALID_PARAMETER_VALUE invalid_parameter_value +22013 E ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE invalid_preceding_or_following_size 2201B E ERRCODE_INVALID_REGULAR_EXPRESSION invalid_regular_expression 2201W E ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE invalid_row_count_in_limit_clause 2201X E ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE invalid_row_count_in_result_offset_clause @@ -205,6 +206,21 @@ Section: Class 22 - Data Exception 2200N E ERRCODE_INVALID_XML_CONTENT invalid_xml_content 2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment 2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction +22030 E ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE duplicate_json_object_key_value +22032 E ERRCODE_INVALID_JSON_TEXT invalid_json_text +22033 E ERRCODE_INVALID_SQL_JSON_SUBSCRIPT invalid_sql_json_subscript +22034 E ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM more_than_one_sql_json_item +22035 E ERRCODE_NO_SQL_JSON_ITEM no_sql_json_item +22036 E ERRCODE_NON_NUMERIC_SQL_JSON_ITEM non_numeric_sql_json_item +22037 E ERRCODE_NON_UNIQUE_KEYS_IN_A_JSON_OBJECT non_unique_keys_in_a_json_object +22038 E ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED singleton_sql_json_item_required +22039 E ERRCODE_SQL_JSON_ARRAY_NOT_FOUND sql_json_array_not_found +2203A E ERRCODE_SQL_JSON_MEMBER_NOT_FOUND sql_json_member_not_found +2203B E ERRCODE_SQL_JSON_NUMBER_NOT_FOUND sql_json_number_not_found +2203C E ERRCODE_SQL_JSON_OBJECT_NOT_FOUND sql_json_object_not_found +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 Section: Class 23 - Integrity Constraint Violation diff --git a/postgres/src/config.rs b/postgres/src/config.rs index 354a99ce..a7702ef8 100644 --- a/postgres/src/config.rs +++ b/postgres/src/config.rs @@ -14,7 +14,7 @@ use tokio_postgres::tls::{MakeTlsConnect, TlsConnect}; use tokio_postgres::{Error, Socket}; #[doc(inline)] -pub use tokio_postgres::config::{SslMode, TargetSessionAttrs, ChannelBinding}; +pub use tokio_postgres::config::{ChannelBinding, SslMode, TargetSessionAttrs}; use crate::{Client, RUNTIME}; diff --git a/tokio-postgres/src/connect_raw.rs b/tokio-postgres/src/connect_raw.rs index 4ac5c667..dbbc71a5 100644 --- a/tokio-postgres/src/connect_raw.rs +++ b/tokio-postgres/src/connect_raw.rs @@ -255,9 +255,7 @@ where let (channel_binding, mechanism) = if has_scram_plus { match channel_binding { Some(channel_binding) => (channel_binding, sasl::SCRAM_SHA_256_PLUS), - None => { - (sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256) - }, + None => (sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256), } } else if has_scram { match channel_binding { diff --git a/tokio-postgres/src/error/sqlstate.rs b/tokio-postgres/src/error/sqlstate.rs index 60c18e42..b6aff0ef 100644 --- a/tokio-postgres/src/error/sqlstate.rs +++ b/tokio-postgres/src/error/sqlstate.rs @@ -190,6 +190,9 @@ impl SqlState { /// 22023 pub const INVALID_PARAMETER_VALUE: SqlState = SqlState(Cow::Borrowed("22023")); + /// 22013 + pub const INVALID_PRECEDING_OR_FOLLOWING_SIZE: SqlState = SqlState(Cow::Borrowed("22013")); + /// 2201B pub const INVALID_REGULAR_EXPRESSION: SqlState = SqlState(Cow::Borrowed("2201B")); @@ -275,6 +278,51 @@ impl SqlState { /// 2200T pub const INVALID_XML_PROCESSING_INSTRUCTION: SqlState = SqlState(Cow::Borrowed("2200T")); + /// 22030 + pub const DUPLICATE_JSON_OBJECT_KEY_VALUE: SqlState = SqlState(Cow::Borrowed("22030")); + + /// 22032 + pub const INVALID_JSON_TEXT: SqlState = SqlState(Cow::Borrowed("22032")); + + /// 22033 + pub const INVALID_SQL_JSON_SUBSCRIPT: SqlState = SqlState(Cow::Borrowed("22033")); + + /// 22034 + pub const MORE_THAN_ONE_SQL_JSON_ITEM: SqlState = SqlState(Cow::Borrowed("22034")); + + /// 22035 + pub const NO_SQL_JSON_ITEM: SqlState = SqlState(Cow::Borrowed("22035")); + + /// 22036 + pub const NON_NUMERIC_SQL_JSON_ITEM: SqlState = SqlState(Cow::Borrowed("22036")); + + /// 22037 + pub const NON_UNIQUE_KEYS_IN_A_JSON_OBJECT: SqlState = SqlState(Cow::Borrowed("22037")); + + /// 22038 + pub const SINGLETON_SQL_JSON_ITEM_REQUIRED: SqlState = SqlState(Cow::Borrowed("22038")); + + /// 22039 + pub const SQL_JSON_ARRAY_NOT_FOUND: SqlState = SqlState(Cow::Borrowed("22039")); + + /// 2203A + pub const SQL_JSON_MEMBER_NOT_FOUND: SqlState = SqlState(Cow::Borrowed("2203A")); + + /// 2203B + pub const SQL_JSON_NUMBER_NOT_FOUND: SqlState = SqlState(Cow::Borrowed("2203B")); + + /// 2203C + pub const SQL_JSON_OBJECT_NOT_FOUND: SqlState = SqlState(Cow::Borrowed("2203C")); + + /// 2203D + pub const TOO_MANY_JSON_ARRAY_ELEMENTS: SqlState = SqlState(Cow::Borrowed("2203D")); + + /// 2203E + pub const TOO_MANY_JSON_OBJECT_MEMBERS: SqlState = SqlState(Cow::Borrowed("2203E")); + + /// 2203F + pub const SQL_JSON_SCALAR_REQUIRED: SqlState = SqlState(Cow::Borrowed("2203F")); + /// 23000 pub const INTEGRITY_CONSTRAINT_VIOLATION: SqlState = SqlState(Cow::Borrowed("23000")); @@ -777,299 +825,318 @@ impl SqlState { } #[rustfmt::skip] static SQLSTATE_MAP: phf::Map<&'static str, SqlState> = ::phf::Map { - key: 3213172566270843353, + key: 732231254413039614, disps: ::phf::Slice::Static(&[ - (1, 16), - (1, 97), - (0, 146), - (0, 0), - (1, 0), - (0, 217), - (3, 134), - (0, 2), - (0, 6), - (0, 32), - (1, 99), - (1, 227), - (0, 6), - (0, 163), - (0, 89), - (0, 5), - (0, 3), - (0, 200), - (4, 99), - (0, 32), - (0, 19), - (0, 82), - (0, 54), - (1, 126), - (0, 11), - (0, 83), - (6, 102), - (0, 67), - (4, 162), + (0, 7), + (2, 136), (0, 13), - (0, 116), - (11, 57), - (0, 210), + (2, 32), + (0, 204), + (0, 46), + (0, 154), + (1, 221), + (0, 42), + (2, 246), + (0, 0), + (0, 1), + (1, 18), + (2, 7), + (0, 0), + (0, 1), (0, 4), - (4, 127), - (1, 133), - (1, 158), - (0, 180), - (2, 201), - (0, 148), - (4, 135), - (0, 5), - (1, 1), - (0, 0), - (0, 191), - (0, 171), - (7, 38), + (0, 17), + (0, 2), + (0, 22), + (0, 93), + (1, 92), + (0, 145), + (0, 1), + (9, 81), + (0, 26), + (1, 53), + (0, 62), + (2, 173), + (0, 10), + (0, 3), + (0, 204), + (0, 26), + (0, 2), + (3, 80), + (1, 206), + (1, 61), + (0, 103), + (0, 3), + (25, 171), (0, 0), (0, 0), + (4, 107), + (0, 129), + (0, 114), + (4, 201), + (20, 163), + (14, 72), + (0, 147), + (6, 113), + (5, 170), + (0, 23), ]), entries: ::phf::Slice::Static(&[ - ("22022", SqlState::INDICATOR_OVERFLOW), - ("3B000", SqlState::SAVEPOINT_EXCEPTION), - ("54023", SqlState::TOO_MANY_ARGUMENTS), - ("25P02", SqlState::IN_FAILED_SQL_TRANSACTION), - ("38002", SqlState::E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED), - ("02001", SqlState::NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED), - ("72000", SqlState::SNAPSHOT_TOO_OLD), - ("42622", SqlState::NAME_TOO_LONG), - ("42P19", SqlState::INVALID_RECURSION), - ("F0000", SqlState::CONFIG_FILE_ERROR), - ("HV014", SqlState::FDW_TOO_MANY_HANDLES), ("2BP01", SqlState::DEPENDENT_OBJECTS_STILL_EXIST), - ("HV00C", SqlState::FDW_INVALID_OPTION_INDEX), - ("01P01", SqlState::WARNING_DEPRECATED_FEATURE), - ("03000", SqlState::SQL_STATEMENT_NOT_YET_COMPLETE), - ("HV090", SqlState::FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH), - ("3F000", SqlState::INVALID_SCHEMA_NAME), - ("42000", SqlState::SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION), - ("22P02", SqlState::INVALID_TEXT_REPRESENTATION), - ("08000", SqlState::CONNECTION_EXCEPTION), - ("38000", SqlState::EXTERNAL_ROUTINE_EXCEPTION), - ("39001", SqlState::E_R_I_E_INVALID_SQLSTATE_RETURNED), - ("HV009", SqlState::FDW_INVALID_USE_OF_NULL_POINTER), - ("53200", SqlState::OUT_OF_MEMORY), - ("22P01", SqlState::FLOATING_POINT_EXCEPTION), - ("3D000", SqlState::INVALID_CATALOG_NAME), - ("42702", SqlState::AMBIGUOUS_COLUMN), - ("2201G", SqlState::INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - ("08006", SqlState::CONNECTION_FAILURE), - ("25003", SqlState::INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION), - ("P0004", SqlState::ASSERT_FAILURE), - ("0B000", SqlState::INVALID_TRANSACTION_INITIATION), - ("57014", SqlState::QUERY_CANCELED), - ("57P01", SqlState::ADMIN_SHUTDOWN), - ("22025", SqlState::INVALID_ESCAPE_SEQUENCE), - ("55P04", SqlState::UNSAFE_NEW_ENUM_VALUE_USAGE), - ("54001", SqlState::STATEMENT_TOO_COMPLEX), - ("HV021", SqlState::FDW_INCONSISTENT_DESCRIPTOR_INFORMATION), - ("0L000", SqlState::INVALID_GRANTOR), - ("55P03", SqlState::LOCK_NOT_AVAILABLE), - ("HV00P", SqlState::FDW_NO_SCHEMAS), - ("0LP01", SqlState::INVALID_GRANT_OPERATION), - ("40002", SqlState::T_R_INTEGRITY_CONSTRAINT_VIOLATION), - ("2200B", SqlState::ESCAPE_CHARACTER_CONFLICT), - ("42P02", SqlState::UNDEFINED_PARAMETER), - ("2200D", SqlState::INVALID_ESCAPE_OCTET), - ("25000", SqlState::INVALID_TRANSACTION_STATE), - ("39P01", SqlState::E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - ("42725", SqlState::AMBIGUOUS_FUNCTION), - ("23000", SqlState::INTEGRITY_CONSTRAINT_VIOLATION), - ("42P09", SqlState::AMBIGUOUS_ALIAS), - ("42939", SqlState::RESERVED_NAME), - ("57P02", SqlState::CRASH_SHUTDOWN), - ("40P01", SqlState::T_R_DEADLOCK_DETECTED), - ("HV00Q", SqlState::FDW_SCHEMA_NOT_FOUND), - ("25P01", SqlState::NO_ACTIVE_SQL_TRANSACTION), - ("55P02", SqlState::CANT_CHANGE_RUNTIME_PARAM), - ("27000", SqlState::TRIGGERED_DATA_CHANGE_VIOLATION), - ("XX002", SqlState::INDEX_CORRUPTED), - ("0Z000", SqlState::DIAGNOSTICS_EXCEPTION), - ("42P08", SqlState::AMBIGUOUS_PARAMETER), - ("42602", SqlState::INVALID_NAME), - ("55006", SqlState::OBJECT_IN_USE), - ("44000", SqlState::WITH_CHECK_OPTION_VIOLATION), - ("0F000", SqlState::LOCATOR_EXCEPTION), - ("02000", SqlState::NO_DATA), - ("22010", SqlState::INVALID_INDICATOR_PARAMETER_VALUE), - ("24000", SqlState::INVALID_CURSOR_STATE), - ("P0002", SqlState::NO_DATA_FOUND), - ("P0003", SqlState::TOO_MANY_ROWS), - ("2201W", SqlState::INVALID_ROW_COUNT_IN_LIMIT_CLAUSE), - ("2200H", SqlState::SEQUENCE_GENERATOR_LIMIT_EXCEEDED), - ("42803", SqlState::GROUPING_ERROR), - ("HV00D", SqlState::FDW_INVALID_OPTION_NAME), - ("HV008", SqlState::FDW_INVALID_COLUMN_NUMBER), - ("HV00M", SqlState::FDW_UNABLE_TO_CREATE_REPLY), - ("2200M", SqlState::INVALID_XML_DOCUMENT), - ("HV00R", SqlState::FDW_TABLE_NOT_FOUND), - ("25001", SqlState::ACTIVE_SQL_TRANSACTION), - ("42P05", SqlState::DUPLICATE_PSTATEMENT), - ("2200G", SqlState::MOST_SPECIFIC_TYPE_MISMATCH), - ("0Z002", SqlState::STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER), - ("40003", SqlState::T_R_STATEMENT_COMPLETION_UNKNOWN), - ("08004", SqlState::SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION), - ("55000", SqlState::OBJECT_NOT_IN_PREREQUISITE_STATE), - ("42883", SqlState::UNDEFINED_FUNCTION), - ("23P01", SqlState::EXCLUSION_VIOLATION), - ("F0001", SqlState::LOCK_FILE_EXISTS), - ("0A000", SqlState::FEATURE_NOT_SUPPORTED), - ("2200C", SqlState::INVALID_USE_OF_ESCAPE_CHARACTER), - ("42846", SqlState::CANNOT_COERCE), - ("HV091", SqlState::FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER), - ("22015", SqlState::INTERVAL_FIELD_OVERFLOW), - ("53100", SqlState::DISK_FULL), - ("39000", SqlState::EXTERNAL_ROUTINE_INVOCATION_EXCEPTION), - ("HV00A", SqlState::FDW_INVALID_STRING_FORMAT), - ("58P02", SqlState::DUPLICATE_FILE), - ("P0001", SqlState::RAISE_EXCEPTION), - ("39004", SqlState::E_R_I_E_NULL_VALUE_NOT_ALLOWED), - ("22P04", SqlState::BAD_COPY_FILE_FORMAT), - ("39P03", SqlState::E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED), - ("25002", SqlState::BRANCH_TRANSACTION_ALREADY_ACTIVE), - ("22024", SqlState::UNTERMINATED_C_STRING), - ("42601", SqlState::SYNTAX_ERROR), - ("HV024", SqlState::FDW_INVALID_ATTRIBUTE_VALUE), - ("26000", SqlState::INVALID_SQL_STATEMENT_NAME), - ("2202E", SqlState::ARRAY_ELEMENT_ERROR), - ("2200T", SqlState::INVALID_XML_PROCESSING_INSTRUCTION), - ("58000", SqlState::SYSTEM_ERROR), - ("42501", SqlState::INSUFFICIENT_PRIVILEGE), - ("22002", SqlState::NULL_VALUE_NO_INDICATOR_PARAMETER), - ("23514", SqlState::CHECK_VIOLATION), - ("42809", SqlState::WRONG_OBJECT_TYPE), - ("20000", SqlState::CASE_NOT_FOUND), - ("22001", SqlState::STRING_DATA_RIGHT_TRUNCATION), - ("HV00K", SqlState::FDW_REPLY_HANDLE), - ("08007", SqlState::TRANSACTION_RESOLUTION_UNKNOWN), - ("42830", SqlState::INVALID_FOREIGN_KEY), - ("2201F", SqlState::INVALID_ARGUMENT_FOR_POWER_FUNCTION), - ("2D000", SqlState::INVALID_TRANSACTION_TERMINATION), - ("38001", SqlState::E_R_E_CONTAINING_SQL_NOT_PERMITTED), - ("53000", SqlState::INSUFFICIENT_RESOURCES), - ("XX001", SqlState::DATA_CORRUPTED), - ("54011", SqlState::TOO_MANY_COLUMNS), - ("57P04", SqlState::DATABASE_DROPPED), - ("2F005", SqlState::S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT), - ("HV00N", SqlState::FDW_UNABLE_TO_ESTABLISH_CONNECTION), - ("25004", SqlState::INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION), - ("42P11", SqlState::INVALID_CURSOR_DEFINITION), - ("42701", SqlState::DUPLICATE_COLUMN), - ("42P18", SqlState::INDETERMINATE_DATATYPE), - ("08001", SqlState::SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), - ("01007", SqlState::WARNING_PRIVILEGE_NOT_GRANTED), - ("0100C", SqlState::WARNING_DYNAMIC_RESULT_SETS_RETURNED), - ("2200L", SqlState::NOT_AN_XML_DOCUMENT), - ("22011", SqlState::SUBSTRING_ERROR), - ("42P20", SqlState::WINDOWING_ERROR), - ("42P12", SqlState::INVALID_DATABASE_DEFINITION), - ("22023", SqlState::INVALID_PARAMETER_VALUE), - ("22016", SqlState::INVALID_ARGUMENT_FOR_NTH_VALUE), - ("53400", SqlState::CONFIGURATION_LIMIT_EXCEEDED), - ("23001", SqlState::RESTRICT_VIOLATION), - ("428C9", SqlState::GENERATED_ALWAYS), - ("42723", SqlState::DUPLICATE_FUNCTION), - ("HV007", SqlState::FDW_INVALID_COLUMN_NAME), - ("38003", SqlState::E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - ("40001", SqlState::T_R_SERIALIZATION_FAILURE), - ("42P07", SqlState::DUPLICATE_TABLE), - ("22021", SqlState::CHARACTER_NOT_IN_REPERTOIRE), - ("08P01", SqlState::PROTOCOL_VIOLATION), - ("39P02", SqlState::E_R_I_E_SRF_PROTOCOL_VIOLATED), - ("22P03", SqlState::INVALID_BINARY_REPRESENTATION), - ("XX000", SqlState::INTERNAL_ERROR), - ("42P17", SqlState::INVALID_OBJECT_DEFINITION), - ("2200N", SqlState::INVALID_XML_CONTENT), - ("23502", SqlState::NOT_NULL_VIOLATION), - ("HV00B", SqlState::FDW_INVALID_HANDLE), - ("28000", SqlState::INVALID_AUTHORIZATION_SPECIFICATION), - ("2201E", SqlState::INVALID_ARGUMENT_FOR_LOG), - ("22018", SqlState::INVALID_CHARACTER_VALUE_FOR_CAST), - ("HV004", SqlState::FDW_INVALID_DATA_TYPE), - ("2F000", SqlState::SQL_ROUTINE_EXCEPTION), - ("0P000", SqlState::INVALID_ROLE_SPECIFICATION), - ("42P04", SqlState::DUPLICATE_DATABASE), - ("42P06", SqlState::DUPLICATE_SCHEMA), - ("28P01", SqlState::INVALID_PASSWORD), - ("2F004", SqlState::S_R_E_READING_SQL_DATA_NOT_PERMITTED), - ("57000", SqlState::OPERATOR_INTERVENTION), - ("P0000", SqlState::PLPGSQL_ERROR), - ("42712", SqlState::DUPLICATE_ALIAS), - ("22019", SqlState::INVALID_ESCAPE_CHARACTER), ("22012", SqlState::DIVISION_BY_ZERO), - ("25007", SqlState::SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED), - ("22026", SqlState::STRING_DATA_LENGTH_MISMATCH), - ("0F001", SqlState::L_E_INVALID_SPECIFICATION), - ("22009", SqlState::INVALID_TIME_ZONE_DISPLACEMENT_VALUE), + ("42P09", SqlState::AMBIGUOUS_ALIAS), + ("22001", SqlState::STRING_DATA_RIGHT_TRUNCATION), + ("38004", SqlState::E_R_E_READING_SQL_DATA_NOT_PERMITTED), + ("54011", SqlState::TOO_MANY_COLUMNS), + ("53100", SqlState::DISK_FULL), + ("22025", SqlState::INVALID_ESCAPE_SEQUENCE), + ("25005", SqlState::NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION), + ("42P20", SqlState::WINDOWING_ERROR), + ("2200T", SqlState::INVALID_XML_PROCESSING_INSTRUCTION), + ("25006", SqlState::READ_ONLY_SQL_TRANSACTION), ("42804", SqlState::DATATYPE_MISMATCH), - ("23503", SqlState::FOREIGN_KEY_VIOLATION), - ("2201B", SqlState::INVALID_REGULAR_EXPRESSION), - ("2B000", SqlState::DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST), - ("2200S", SqlState::INVALID_XML_COMMENT), - ("22003", SqlState::NUMERIC_VALUE_OUT_OF_RANGE), + ("54001", SqlState::STATEMENT_TOO_COMPLEX), + ("2200L", SqlState::NOT_AN_XML_DOCUMENT), + ("HV009", SqlState::FDW_INVALID_USE_OF_NULL_POINTER), + ("2203C", SqlState::SQL_JSON_OBJECT_NOT_FOUND), + ("2202E", SqlState::ARRAY_ELEMENT_ERROR), + ("42P10", SqlState::INVALID_COLUMN_REFERENCE), + ("39004", SqlState::E_R_I_E_NULL_VALUE_NOT_ALLOWED), + ("42702", SqlState::AMBIGUOUS_COLUMN), + ("28000", SqlState::INVALID_AUTHORIZATION_SPECIFICATION), + ("HV00K", SqlState::FDW_REPLY_HANDLE), + ("HV00L", SqlState::FDW_UNABLE_TO_CREATE_EXECUTION), + ("54000", SqlState::PROGRAM_LIMIT_EXCEEDED), + ("XX001", SqlState::DATA_CORRUPTED), + ("01P01", SqlState::WARNING_DEPRECATED_FEATURE), + ("42701", SqlState::DUPLICATE_COLUMN), + ("2D000", SqlState::INVALID_TRANSACTION_TERMINATION), + ("2201E", SqlState::INVALID_ARGUMENT_FOR_LOG), + ("25P01", SqlState::NO_ACTIVE_SQL_TRANSACTION), + ("22037", SqlState::NON_UNIQUE_KEYS_IN_A_JSON_OBJECT), + ("42601", SqlState::SYNTAX_ERROR), + ("HV008", SqlState::FDW_INVALID_COLUMN_NUMBER), + ("42P15", SqlState::INVALID_SCHEMA_DEFINITION), + ("0B000", SqlState::INVALID_TRANSACTION_INITIATION), + ("22022", SqlState::INDICATOR_OVERFLOW), + ("42P22", SqlState::INDETERMINATE_COLLATION), + ("22038", SqlState::SINGLETON_SQL_JSON_ITEM_REQUIRED), + ("42P02", SqlState::UNDEFINED_PARAMETER), + ("22013", SqlState::INVALID_PRECEDING_OR_FOLLOWING_SIZE), + ("42P14", SqlState::INVALID_PSTATEMENT_DEFINITION), + ("42712", SqlState::DUPLICATE_ALIAS), + ("28P01", SqlState::INVALID_PASSWORD), + ("2201X", SqlState::INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE), + ("25004", SqlState::INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION), + ("01004", SqlState::WARNING_STRING_DATA_RIGHT_TRUNCATION), + ("22016", SqlState::INVALID_ARGUMENT_FOR_NTH_VALUE), ("22P06", SqlState::NONSTANDARD_USE_OF_ESCAPE_CHARACTER), + ("22018", SqlState::INVALID_CHARACTER_VALUE_FOR_CAST), + ("55006", SqlState::OBJECT_IN_USE), + ("2200H", SqlState::SEQUENCE_GENERATOR_LIMIT_EXCEEDED), + ("25008", SqlState::HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL), + ("2203A", SqlState::SQL_JSON_MEMBER_NOT_FOUND), + ("HV00B", SqlState::FDW_INVALID_HANDLE), + ("03000", SqlState::SQL_STATEMENT_NOT_YET_COMPLETE), + ("53300", SqlState::TOO_MANY_CONNECTIONS), + ("34000", SqlState::INVALID_CURSOR_NAME), + ("53200", SqlState::OUT_OF_MEMORY), + ("38003", SqlState::E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + ("53400", SqlState::CONFIGURATION_LIMIT_EXCEEDED), + ("428C9", SqlState::GENERATED_ALWAYS), + ("57P04", SqlState::DATABASE_DROPPED), + ("55P03", SqlState::LOCK_NOT_AVAILABLE), + ("54023", SqlState::TOO_MANY_ARGUMENTS), + ("22010", SqlState::INVALID_INDICATOR_PARAMETER_VALUE), + ("42P18", SqlState::INDETERMINATE_DATATYPE), + ("22030", SqlState::DUPLICATE_JSON_OBJECT_KEY_VALUE), + ("22021", SqlState::CHARACTER_NOT_IN_REPERTOIRE), + ("HV014", SqlState::FDW_TOO_MANY_HANDLES), + ("38000", SqlState::EXTERNAL_ROUTINE_EXCEPTION), + ("P0002", SqlState::NO_DATA_FOUND), + ("42723", SqlState::DUPLICATE_FUNCTION), + ("3F000", SqlState::INVALID_SCHEMA_NAME), + ("22007", SqlState::INVALID_DATETIME_FORMAT), + ("HV00J", SqlState::FDW_OPTION_NAME_NOT_FOUND), + ("42809", SqlState::WRONG_OBJECT_TYPE), + ("42P03", SqlState::DUPLICATE_CURSOR), + ("HV00R", SqlState::FDW_TABLE_NOT_FOUND), + ("2F003", SqlState::S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), + ("08003", SqlState::CONNECTION_DOES_NOT_EXIST), + ("58000", SqlState::SYSTEM_ERROR), + ("2200F", SqlState::ZERO_LENGTH_CHARACTER_STRING), + ("02000", SqlState::NO_DATA), + ("22027", SqlState::TRIM_ERROR), + ("HV00M", SqlState::FDW_UNABLE_TO_CREATE_REPLY), + ("25002", SqlState::BRANCH_TRANSACTION_ALREADY_ACTIVE), + ("F0001", SqlState::LOCK_FILE_EXISTS), + ("09000", SqlState::TRIGGERED_ACTION_EXCEPTION), + ("57P02", SqlState::CRASH_SHUTDOWN), + ("22P03", SqlState::INVALID_BINARY_REPRESENTATION), + ("2200N", SqlState::INVALID_XML_CONTENT), + ("42P11", SqlState::INVALID_CURSOR_DEFINITION), + ("08001", SqlState::SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION), + ("08P01", SqlState::PROTOCOL_VIOLATION), + ("42602", SqlState::INVALID_NAME), + ("25000", SqlState::INVALID_TRANSACTION_STATE), + ("39P03", SqlState::E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED), + ("22019", SqlState::INVALID_ESCAPE_CHARACTER), + ("42611", SqlState::INVALID_COLUMN_DEFINITION), + ("25003", SqlState::INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION), + ("58P02", SqlState::DUPLICATE_FILE), + ("22026", SqlState::STRING_DATA_LENGTH_MISMATCH), + ("42P07", SqlState::DUPLICATE_TABLE), + ("38002", SqlState::E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED), + ("42725", SqlState::AMBIGUOUS_FUNCTION), + ("22005", SqlState::ERROR_IN_ASSIGNMENT), + ("22035", SqlState::NO_SQL_JSON_ITEM), + ("22011", SqlState::SUBSTRING_ERROR), + ("40002", SqlState::T_R_INTEGRITY_CONSTRAINT_VIOLATION), + ("08007", SqlState::TRANSACTION_RESOLUTION_UNKNOWN), + ("2200D", SqlState::INVALID_ESCAPE_OCTET), + ("57000", SqlState::OPERATOR_INTERVENTION), + ("53000", SqlState::INSUFFICIENT_RESOURCES), + ("HV005", SqlState::FDW_COLUMN_NAME_NOT_FOUND), + ("72000", SqlState::SNAPSHOT_TOO_OLD), + ("25P02", SqlState::IN_FAILED_SQL_TRANSACTION), + ("XX000", SqlState::INTERNAL_ERROR), + ("42703", SqlState::UNDEFINED_COLUMN), + ("42704", SqlState::UNDEFINED_OBJECT), + ("2F000", SqlState::SQL_ROUTINE_EXCEPTION), + ("44000", SqlState::WITH_CHECK_OPTION_VIOLATION), + ("2200B", SqlState::ESCAPE_CHARACTER_CONFLICT), + ("42P17", SqlState::INVALID_OBJECT_DEFINITION), + ("P0003", SqlState::TOO_MANY_ROWS), + ("HV00A", SqlState::FDW_INVALID_STRING_FORMAT), + ("08000", SqlState::CONNECTION_EXCEPTION), + ("22024", SqlState::UNTERMINATED_C_STRING), + ("01007", SqlState::WARNING_PRIVILEGE_NOT_GRANTED), + ("HV091", SqlState::FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER), + ("0A000", SqlState::FEATURE_NOT_SUPPORTED), + ("2203F", SqlState::SQL_JSON_SCALAR_REQUIRED), + ("HV021", SqlState::FDW_INCONSISTENT_DESCRIPTOR_INFORMATION), + ("42883", SqlState::UNDEFINED_FUNCTION), + ("39000", SqlState::EXTERNAL_ROUTINE_INVOCATION_EXCEPTION), + ("08006", SqlState::CONNECTION_FAILURE), + ("HV001", SqlState::FDW_OUT_OF_MEMORY), + ("23000", SqlState::INTEGRITY_CONSTRAINT_VIOLATION), + ("22039", SqlState::SQL_JSON_ARRAY_NOT_FOUND), + ("0100C", SqlState::WARNING_DYNAMIC_RESULT_SETS_RETURNED), + ("HV00Q", SqlState::FDW_SCHEMA_NOT_FOUND), + ("0F000", SqlState::LOCATOR_EXCEPTION), + ("2200M", SqlState::INVALID_XML_DOCUMENT), + ("0Z002", SqlState::STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER), + ("42P05", SqlState::DUPLICATE_PSTATEMENT), + ("22002", SqlState::NULL_VALUE_NO_INDICATOR_PARAMETER), + ("00000", SqlState::SUCCESSFUL_COMPLETION), + ("39P01", SqlState::E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), + ("24000", SqlState::INVALID_CURSOR_STATE), + ("08004", SqlState::SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION), + ("22023", SqlState::INVALID_PARAMETER_VALUE), + ("HV090", SqlState::FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH), + ("22036", SqlState::NON_NUMERIC_SQL_JSON_ITEM), + ("42000", SqlState::SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION), + ("42710", SqlState::DUPLICATE_OBJECT), + ("27000", SqlState::TRIGGERED_DATA_CHANGE_VIOLATION), + ("22034", SqlState::MORE_THAN_ONE_SQL_JSON_ITEM), + ("22008", SqlState::DATETIME_FIELD_OVERFLOW), + ("0F001", SqlState::L_E_INVALID_SPECIFICATION), + ("25P03", SqlState::IDLE_IN_TRANSACTION_SESSION_TIMEOUT), + ("01003", SqlState::WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION), + ("2203E", SqlState::TOO_MANY_JSON_OBJECT_MEMBERS), + ("2201F", SqlState::INVALID_ARGUMENT_FOR_POWER_FUNCTION), + ("22004", SqlState::NULL_VALUE_NOT_ALLOWED), + ("22P01", SqlState::FLOATING_POINT_EXCEPTION), + ("42P06", SqlState::DUPLICATE_SCHEMA), + ("P0004", SqlState::ASSERT_FAILURE), + ("HV006", SqlState::FDW_INVALID_DATA_TYPE_DESCRIPTORS), + ("3B000", SqlState::SAVEPOINT_EXCEPTION), + ("HV007", SqlState::FDW_INVALID_COLUMN_NAME), + ("40P01", SqlState::T_R_DEADLOCK_DETECTED), + ("HV004", SqlState::FDW_INVALID_DATA_TYPE), + ("P0001", SqlState::RAISE_EXCEPTION), + ("23514", SqlState::CHECK_VIOLATION), + ("57P03", SqlState::CANNOT_CONNECT_NOW), + ("42P13", SqlState::INVALID_FUNCTION_DEFINITION), + ("58P01", SqlState::UNDEFINED_FILE), + ("42P01", SqlState::UNDEFINED_TABLE), + ("2F005", SqlState::S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT), + ("0LP01", SqlState::INVALID_GRANT_OPERATION), + ("2201G", SqlState::INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), + ("55000", SqlState::OBJECT_NOT_IN_PREREQUISITE_STATE), + ("HV002", SqlState::FDW_DYNAMIC_PARAMETER_VALUE_NEEDED), + ("58030", SqlState::IO_ERROR), + ("22033", SqlState::INVALID_SQL_JSON_SUBSCRIPT), + ("42846", SqlState::CANNOT_COERCE), + ("42P12", SqlState::INVALID_DATABASE_DEFINITION), + ("42P08", SqlState::AMBIGUOUS_PARAMETER), ("3B001", SqlState::S_E_INVALID_SPECIFICATION), ("2202G", SqlState::INVALID_TABLESAMPLE_REPEAT), ("21000", SqlState::CARDINALITY_VIOLATION), - ("25005", SqlState::NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION), - ("08003", SqlState::CONNECTION_DOES_NOT_EXIST), - ("42710", SqlState::DUPLICATE_OBJECT), - ("2F003", SqlState::S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED), - ("42611", SqlState::INVALID_COLUMN_DEFINITION), - ("25006", SqlState::READ_ONLY_SQL_TRANSACTION), - ("2F002", SqlState::S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED), - ("HV00J", SqlState::FDW_OPTION_NAME_NOT_FOUND), - ("38004", SqlState::E_R_E_READING_SQL_DATA_NOT_PERMITTED), - ("42P16", SqlState::INVALID_TABLE_DEFINITION), - ("25008", SqlState::HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL), - ("22007", SqlState::INVALID_DATETIME_FORMAT), - ("22005", SqlState::ERROR_IN_ASSIGNMENT), - ("HV001", SqlState::FDW_OUT_OF_MEMORY), - ("HV000", SqlState::FDW_ERROR), - ("42P10", SqlState::INVALID_COLUMN_REFERENCE), - ("54000", SqlState::PROGRAM_LIMIT_EXCEEDED), - ("23505", SqlState::UNIQUE_VIOLATION), - ("42703", SqlState::UNDEFINED_COLUMN), - ("53300", SqlState::TOO_MANY_CONNECTIONS), - ("HV00L", SqlState::FDW_UNABLE_TO_CREATE_EXECUTION), - ("01000", SqlState::WARNING), - ("42P01", SqlState::UNDEFINED_TABLE), - ("22027", SqlState::TRIM_ERROR), - ("00000", SqlState::SUCCESSFUL_COMPLETION), - ("22008", SqlState::DATETIME_FIELD_OVERFLOW), - ("42P21", SqlState::COLLATION_MISMATCH), - ("HV010", SqlState::FDW_FUNCTION_SEQUENCE_ERROR), - ("2201X", SqlState::INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE), - ("HV006", SqlState::FDW_INVALID_DATA_TYPE_DESCRIPTORS), - ("2200F", SqlState::ZERO_LENGTH_CHARACTER_STRING), - ("22P05", SqlState::UNTRANSLATABLE_CHARACTER), - ("42P13", SqlState::INVALID_FUNCTION_DEFINITION), - ("40000", SqlState::TRANSACTION_ROLLBACK), - ("01008", SqlState::WARNING_IMPLICIT_ZERO_BIT_PADDING), - ("58P01", SqlState::UNDEFINED_FILE), - ("HV002", SqlState::FDW_DYNAMIC_PARAMETER_VALUE_NEEDED), - ("42704", SqlState::UNDEFINED_OBJECT), - ("HV005", SqlState::FDW_COLUMN_NAME_NOT_FOUND), - ("42P14", SqlState::INVALID_PSTATEMENT_DEFINITION), - ("42P22", SqlState::INDETERMINATE_COLLATION), - ("01004", SqlState::WARNING_STRING_DATA_RIGHT_TRUNCATION), - ("34000", SqlState::INVALID_CURSOR_NAME), - ("09000", SqlState::TRIGGERED_ACTION_EXCEPTION), - ("22014", SqlState::INVALID_ARGUMENT_FOR_NTILE), ("01006", SqlState::WARNING_PRIVILEGE_NOT_REVOKED), - ("57P03", SqlState::CANNOT_CONNECT_NOW), - ("22004", SqlState::NULL_VALUE_NOT_ALLOWED), + ("HV00N", SqlState::FDW_UNABLE_TO_ESTABLISH_CONNECTION), ("2202H", SqlState::INVALID_TABLESAMPLE_ARGUMENT), - ("42P15", SqlState::INVALID_SCHEMA_DEFINITION), + ("HV00P", SqlState::FDW_NO_SCHEMAS), + ("P0000", SqlState::PLPGSQL_ERROR), + ("23P01", SqlState::EXCLUSION_VIOLATION), + ("39001", SqlState::E_R_I_E_INVALID_SQLSTATE_RETURNED), + ("2203B", SqlState::SQL_JSON_NUMBER_NOT_FOUND), + ("40001", SqlState::T_R_SERIALIZATION_FAILURE), + ("F0000", SqlState::CONFIG_FILE_ERROR), + ("3D000", SqlState::INVALID_CATALOG_NAME), + ("25001", SqlState::ACTIVE_SQL_TRANSACTION), + ("2201B", SqlState::INVALID_REGULAR_EXPRESSION), + ("01008", SqlState::WARNING_IMPLICIT_ZERO_BIT_PADDING), + ("2201W", SqlState::INVALID_ROW_COUNT_IN_LIMIT_CLAUSE), + ("HV000", SqlState::FDW_ERROR), + ("22P05", SqlState::UNTRANSLATABLE_CHARACTER), + ("42803", SqlState::GROUPING_ERROR), ("22000", SqlState::DATA_EXCEPTION), - ("58030", SqlState::IO_ERROR), - ("25P03", SqlState::IDLE_IN_TRANSACTION_SESSION_TIMEOUT), - ("42P03", SqlState::DUPLICATE_CURSOR), - ("01003", SqlState::WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION), + ("23505", SqlState::UNIQUE_VIOLATION), + ("26000", SqlState::INVALID_SQL_STATEMENT_NAME), + ("42939", SqlState::RESERVED_NAME), + ("2F002", SqlState::S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED), + ("57014", SqlState::QUERY_CANCELED), + ("0P000", SqlState::INVALID_ROLE_SPECIFICATION), + ("HV00D", SqlState::FDW_INVALID_OPTION_NAME), + ("23001", SqlState::RESTRICT_VIOLATION), + ("0L000", SqlState::INVALID_GRANTOR), + ("2203D", SqlState::TOO_MANY_JSON_ARRAY_ELEMENTS), + ("42P04", SqlState::DUPLICATE_DATABASE), + ("42830", SqlState::INVALID_FOREIGN_KEY), + ("2200G", SqlState::MOST_SPECIFIC_TYPE_MISMATCH), + ("40000", SqlState::TRANSACTION_ROLLBACK), + ("22015", SqlState::INTERVAL_FIELD_OVERFLOW), + ("55P04", SqlState::UNSAFE_NEW_ENUM_VALUE_USAGE), + ("XX002", SqlState::INDEX_CORRUPTED), + ("23503", SqlState::FOREIGN_KEY_VIOLATION), + ("42P16", SqlState::INVALID_TABLE_DEFINITION), + ("2F004", SqlState::S_R_E_READING_SQL_DATA_NOT_PERMITTED), + ("23502", SqlState::NOT_NULL_VIOLATION), + ("2200C", SqlState::INVALID_USE_OF_ESCAPE_CHARACTER), + ("HV024", SqlState::FDW_INVALID_ATTRIBUTE_VALUE), + ("39P02", SqlState::E_R_I_E_SRF_PROTOCOL_VIOLATED), + ("22014", SqlState::INVALID_ARGUMENT_FOR_NTILE), + ("22P04", SqlState::BAD_COPY_FILE_FORMAT), + ("57P01", SqlState::ADMIN_SHUTDOWN), + ("HV010", SqlState::FDW_FUNCTION_SEQUENCE_ERROR), + ("38001", SqlState::E_R_E_CONTAINING_SQL_NOT_PERMITTED), + ("0Z000", SqlState::DIAGNOSTICS_EXCEPTION), + ("01000", SqlState::WARNING), + ("HV00C", SqlState::FDW_INVALID_OPTION_INDEX), + ("22032", SqlState::INVALID_JSON_TEXT), + ("22P02", SqlState::INVALID_TEXT_REPRESENTATION), + ("22003", SqlState::NUMERIC_VALUE_OUT_OF_RANGE), + ("42P21", SqlState::COLLATION_MISMATCH), + ("25007", SqlState::SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED), + ("55P02", SqlState::CANT_CHANGE_RUNTIME_PARAM), + ("42P19", SqlState::INVALID_RECURSION), + ("2200S", SqlState::INVALID_XML_COMMENT), + ("2B000", SqlState::DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST), + ("40003", SqlState::T_R_STATEMENT_COMPLETION_UNKNOWN), + ("42622", SqlState::NAME_TOO_LONG), + ("20000", SqlState::CASE_NOT_FOUND), + ("42501", SqlState::INSUFFICIENT_PRIVILEGE), + ("02001", SqlState::NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED), + ("22009", SqlState::INVALID_TIME_ZONE_DISPLACEMENT_VALUE), ]), };