Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit56b21b7

Browse files
Re-classify ERRCODE_DATABASE_DROPPED to 57P04
1 parent0c707aa commit56b21b7

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

‎doc/src/sgml/errcodes.sgml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -985,11 +985,6 @@
985985
<entry>deadlock_detected</entry>
986986
</row>
987987

988-
<row>
989-
<entry><literal>40P02</literal></entry>
990-
<entry>DATABASE DROPPED</entry>
991-
<entry>database_dropped</entry>
992-
</row>
993988

994989
<row>
995990
<entry spanname="span13"><emphasis role="bold">Class 42 &mdash; Syntax Error or Access Rule Violation</></entry>
@@ -1374,6 +1369,12 @@
13741369
<entry>cannot_connect_now</entry>
13751370
</row>
13761371

1372+
<row>
1373+
<entry><literal>57P04</literal></entry>
1374+
<entry>DATABASE DROPPED</entry>
1375+
<entry>database_dropped</entry>
1376+
</row>
1377+
13771378

13781379
<row>
13791380
<entry spanname="span13"><emphasis role="bold">Class 58 &mdash; System Error (errors external to <productname>PostgreSQL</> itself)</></entry>

‎src/backend/tcop/postgres.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2916,7 +2916,7 @@ ProcessInterrupts(void)
29162916
Assert(RecoveryConflictReason==PROCSIG_RECOVERY_CONFLICT_DATABASE);
29172917
pgstat_report_recovery_conflict(RecoveryConflictReason);
29182918
ereport(FATAL,
2919-
(errcode(ERRCODE_T_R_DATABASE_DROPPED),
2919+
(errcode(ERRCODE_DATABASE_DROPPED),
29202920
errmsg("terminating connection due to conflict with recovery"),
29212921
errdetail_recovery_conflict()));
29222922
}

‎src/include/utils/errcodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@
243243
#defineERRCODE_T_R_SERIALIZATION_FAILUREMAKE_SQLSTATE('4','0', '0','0','1')
244244
#defineERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWNMAKE_SQLSTATE('4','0', '0','0','3')
245245
#defineERRCODE_T_R_DEADLOCK_DETECTEDMAKE_SQLSTATE('4','0', 'P','0','1')
246-
#defineERRCODE_T_R_DATABASE_DROPPEDMAKE_SQLSTATE('4','0', 'P','0','2')
247246

248247
/* Class 42 - Syntax Error or Access Rule Violation */
249248
#defineERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATIONMAKE_SQLSTATE('4','2', '0','0','0')
@@ -333,6 +332,7 @@
333332
#defineERRCODE_ADMIN_SHUTDOWNMAKE_SQLSTATE('5','7', 'P','0','1')
334333
#defineERRCODE_CRASH_SHUTDOWNMAKE_SQLSTATE('5','7', 'P','0','2')
335334
#defineERRCODE_CANNOT_CONNECT_NOWMAKE_SQLSTATE('5','7', 'P','0','3')
335+
#defineERRCODE_DATABASE_DROPPEDMAKE_SQLSTATE('5','7', 'P','0','4')
336336

337337
/* Class 58 - System Error (class borrowed from DB2) */
338338
/* (we define this as errors external to PostgreSQL itself) */

‎src/pl/plpgsql/src/plerrcodes.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,6 @@
483483
"deadlock_detected",ERRCODE_T_R_DEADLOCK_DETECTED
484484
},
485485

486-
{
487-
"database_dropped",ERRCODE_T_R_DATABASE_DROPPED
488-
},
489-
490486
{
491487
"syntax_error_or_access_rule_violation",ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION
492488
},
@@ -739,6 +735,10 @@
739735
"cannot_connect_now",ERRCODE_CANNOT_CONNECT_NOW
740736
},
741737

738+
{
739+
"database_dropped",ERRCODE_DATABASE_DROPPED
740+
},
741+
742742
{
743743
"io_error",ERRCODE_IO_ERROR
744744
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp