Skip to content

Commit 86367c6

Browse files
committed
Update error codes by rake update_error_codes
1 parent 94f1d7f commit 86367c6

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

Rakefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ end
9494

9595
desc "Update list of server error codes"
9696
task :update_error_codes do
97-
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_16_0"
97+
URL_ERRORCODES_TXT = "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;f=src/backend/utils/errcodes.txt;hb=refs/tags/REL_17_0"
9898

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

ext/errorcodes.def

+4-5
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@
453453
VALUE klass = define_error_class( "IdleInTransactionSessionTimeout", "25" );
454454
register_error_class( "25P03", klass );
455455
}
456+
{
457+
VALUE klass = define_error_class( "TransactionTimeout", "25" );
458+
register_error_class( "25P04", klass );
459+
}
456460
{
457461
VALUE klass = define_error_class( "InvalidSqlStatementName", NULL );
458462
register_error_class( "26000", klass );
@@ -885,11 +889,6 @@
885889
VALUE klass = define_error_class( "DuplicateFile", "58" );
886890
register_error_class( "58P02", klass );
887891
}
888-
{
889-
VALUE klass = define_error_class( "SnapshotTooOld", NULL );
890-
register_error_class( "72000", klass );
891-
register_error_class( "72", klass );
892-
}
893892
{
894893
VALUE klass = define_error_class( "ConfigFileError", NULL );
895894
register_error_class( "F0000", klass );

ext/errorcodes.txt

+2-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# errcodes.txt
33
# PostgreSQL error codes
44
#
5-
# Copyright (c) 2003-2023, PostgreSQL Global Development Group
5+
# Copyright (c) 2003-2024, 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
@@ -252,6 +252,7 @@ Section: Class 25 - Invalid Transaction State
252252
25P01 E ERRCODE_NO_ACTIVE_SQL_TRANSACTION no_active_sql_transaction
253253
25P02 E ERRCODE_IN_FAILED_SQL_TRANSACTION in_failed_sql_transaction
254254
25P03 E ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT idle_in_transaction_session_timeout
255+
25P04 E ERRCODE_TRANSACTION_TIMEOUT transaction_timeout
255256

256257
Section: Class 26 - Invalid SQL Statement Name
257258

@@ -439,10 +440,6 @@ Section: Class 58 - System Error (errors external to PostgreSQL itself)
439440
58P01 E ERRCODE_UNDEFINED_FILE undefined_file
440441
58P02 E ERRCODE_DUPLICATE_FILE duplicate_file
441442

442-
Section: Class 72 - Snapshot Failure
443-
# (class borrowed from Oracle)
444-
72000 E ERRCODE_SNAPSHOT_TOO_OLD snapshot_too_old
445-
446443
Section: Class F0 - Configuration File Error
447444

448445
# (PostgreSQL-specific error class)

0 commit comments

Comments
 (0)