Skip to content

Commit f52e8ea

Browse files
committed
Update error codes to PostgreSQL-15
1 parent 8431e47 commit f52e8ea

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ end
9292

9393
desc "Update list of server error codes"
9494
task :update_error_codes do
95-
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_14_0"
95+
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_15_0"
9696

9797
ERRORCODES_TXT = "ext/errorcodes.txt"
9898
sh "wget #{URL_ERRORCODES_TXT.inspect} -O #{ERRORCODES_TXT.inspect} || curl #{URL_ERRORCODES_TXT.inspect} -o #{ERRORCODES_TXT.inspect}"

ext/errorcodes.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@
366366
VALUE klass = define_error_class( "SqlJsonScalarRequired", "22" );
367367
register_error_class( "2203F", klass );
368368
}
369+
{
370+
VALUE klass = define_error_class( "SqlJsonItemCannotBeCastToTargetType", "22" );
371+
register_error_class( "2203G", klass );
372+
}
369373
{
370374
VALUE klass = define_error_class( "IntegrityConstraintViolation", NULL );
371375
register_error_class( "23000", klass );

ext/errorcodes.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# errcodes.txt
33
# PostgreSQL error codes
44
#
5-
# Copyright (c) 2003-2021, PostgreSQL Global Development Group
5+
# Copyright (c) 2003-2022, 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
@@ -222,6 +222,7 @@ Section: Class 22 - Data Exception
222222
2203D E ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS too_many_json_array_elements
223223
2203E E ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS too_many_json_object_members
224224
2203F E ERRCODE_SQL_JSON_SCALAR_REQUIRED sql_json_scalar_required
225+
2203G E ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE sql_json_item_cannot_be_cast_to_target_type
225226

226227
Section: Class 23 - Integrity Constraint Violation
227228

0 commit comments

Comments
 (0)