<entry>deadlock_detected</entry>
</row>
-<row>
-<entry><literal>40P02</literal></entry>
-<entry>DATABASE DROPPED</entry>
-<entry>database_dropped</entry>
-</row>
<row>
<entry spanname="span13"><emphasis role="bold">Class 42 — Syntax Error or Access Rule Violation</></entry>
<entry>cannot_connect_now</entry>
</row>
+<row>
+<entry><literal>57P04</literal></entry>
+<entry>DATABASE DROPPED</entry>
+<entry>database_dropped</entry>
+</row>
+
<row>
<entry spanname="span13"><emphasis role="bold">Class 58 — System Error (errors external to <productname>PostgreSQL</> itself)</></entry>
Assert(RecoveryConflictReason == PROCSIG_RECOVERY_CONFLICT_DATABASE);
pgstat_report_recovery_conflict(RecoveryConflictReason);
ereport(FATAL,
- (errcode(ERRCODE_T_R_DATABASE_DROPPED),
+ (errcode(ERRCODE_DATABASE_DROPPED),
errmsg("terminating connection due to conflict with recovery"),
errdetail_recovery_conflict()));
}
#define ERRCODE_T_R_SERIALIZATION_FAILURE MAKE_SQLSTATE('4','0', '0','0','1')
#define ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN MAKE_SQLSTATE('4','0', '0','0','3')
#define ERRCODE_T_R_DEADLOCK_DETECTED MAKE_SQLSTATE('4','0', 'P','0','1')
-#define ERRCODE_T_R_DATABASE_DROPPED MAKE_SQLSTATE('4','0', 'P','0','2')
/* Class 42 - Syntax Error or Access Rule Violation */
#define ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION MAKE_SQLSTATE('4','2', '0','0','0')
#define ERRCODE_ADMIN_SHUTDOWN MAKE_SQLSTATE('5','7', 'P','0','1')
#define ERRCODE_CRASH_SHUTDOWN MAKE_SQLSTATE('5','7', 'P','0','2')
#define ERRCODE_CANNOT_CONNECT_NOW MAKE_SQLSTATE('5','7', 'P','0','3')
+#define ERRCODE_DATABASE_DROPPED MAKE_SQLSTATE('5','7', 'P','0','4')
/* Class 58 - System Error (class borrowed from DB2) */
/* (we define this as errors external to PostgreSQL itself) */
"deadlock_detected", ERRCODE_T_R_DEADLOCK_DETECTED
},
-{
- "database_dropped", ERRCODE_T_R_DATABASE_DROPPED
-},
-
{
"syntax_error_or_access_rule_violation", ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION
},
"cannot_connect_now", ERRCODE_CANNOT_CONNECT_NOW
},
+{
+ "database_dropped", ERRCODE_DATABASE_DROPPED
+},
+
{
"io_error", ERRCODE_IO_ERROR
},