Skip to content

Commit d8b5412

Browse files
committed
Upgrade errcodes to Postgres 12
1 parent e155af6 commit d8b5412

File tree

4 files changed

+347
-266
lines changed

4 files changed

+347
-266
lines changed

codegen/src/errcodes.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# errcodes.txt
33
# PostgreSQL error codes
44
#
5-
# Copyright (c) 2003-2017, PostgreSQL Global Development Group
5+
# Copyright (c) 2003-2019, PostgreSQL Global Development Group
66
#
77
# This list serves as the basis for generating source files containing error
88
# codes. It is kept in a common format to make sure all these source files have
@@ -18,7 +18,7 @@
1818
# src/pl/tcl/pltclerrcodes.h
1919
# the same, for PL/Tcl
2020
#
21-
# doc/src/sgml/errcodes-list.sgml
21+
# doc/src/sgml/errcodes-table.sgml
2222
# a SGML table of error codes for inclusion in the documentation
2323
#
2424
# The format of this file is one error code per line, with the following
@@ -177,6 +177,7 @@ Section: Class 22 - Data Exception
177177
22P06 E ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER nonstandard_use_of_escape_character
178178
22010 E ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE invalid_indicator_parameter_value
179179
22023 E ERRCODE_INVALID_PARAMETER_VALUE invalid_parameter_value
180+
22013 E ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE invalid_preceding_or_following_size
180181
2201B E ERRCODE_INVALID_REGULAR_EXPRESSION invalid_regular_expression
181182
2201W E ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE invalid_row_count_in_limit_clause
182183
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
205206
2200N E ERRCODE_INVALID_XML_CONTENT invalid_xml_content
206207
2200S E ERRCODE_INVALID_XML_COMMENT invalid_xml_comment
207208
2200T E ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION invalid_xml_processing_instruction
209+
22030 E ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE duplicate_json_object_key_value
210+
22032 E ERRCODE_INVALID_JSON_TEXT invalid_json_text
211+
22033 E ERRCODE_INVALID_SQL_JSON_SUBSCRIPT invalid_sql_json_subscript
212+
22034 E ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM more_than_one_sql_json_item
213+
22035 E ERRCODE_NO_SQL_JSON_ITEM no_sql_json_item
214+
22036 E ERRCODE_NON_NUMERIC_SQL_JSON_ITEM non_numeric_sql_json_item
215+
22037 E ERRCODE_NON_UNIQUE_KEYS_IN_A_JSON_OBJECT non_unique_keys_in_a_json_object
216+
22038 E ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED singleton_sql_json_item_required
217+
22039 E ERRCODE_SQL_JSON_ARRAY_NOT_FOUND sql_json_array_not_found
218+
2203A E ERRCODE_SQL_JSON_MEMBER_NOT_FOUND sql_json_member_not_found
219+
2203B E ERRCODE_SQL_JSON_NUMBER_NOT_FOUND sql_json_number_not_found
220+
2203C E ERRCODE_SQL_JSON_OBJECT_NOT_FOUND sql_json_object_not_found
221+
2203D E ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS too_many_json_array_elements
222+
2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
223+
2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required
208224

209225
Section: Class 23 - Integrity Constraint Violation
210226

postgres/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use tokio_postgres::tls::{MakeTlsConnect, TlsConnect};
1414
use tokio_postgres::{Error, Socket};
1515

1616
#[doc(inline)]
17-
pub use tokio_postgres::config::{SslMode, TargetSessionAttrs, ChannelBinding};
17+
pub use tokio_postgres::config::{ChannelBinding, SslMode, TargetSessionAttrs};
1818

1919
use crate::{Client, RUNTIME};
2020

tokio-postgres/src/connect_raw.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,7 @@ where
255255
let (channel_binding, mechanism) = if has_scram_plus {
256256
match channel_binding {
257257
Some(channel_binding) => (channel_binding, sasl::SCRAM_SHA_256_PLUS),
258-
None => {
259-
(sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256)
260-
},
258+
None => (sasl::ChannelBinding::unsupported(), sasl::SCRAM_SHA_256),
261259
}
262260
} else if has_scram {
263261
match channel_binding {

0 commit comments

Comments
 (0)