Skip to content

Commit 4edf968

Browse files
committed
Rethink SQLSTATE code for ERRCODE_IDLE_SESSION_TIMEOUT.
Move it to class 57 (Operator Intervention), which seems like a better choice given that from the client's standpoint it behaves a heck of a lot like, e.g., ERRCODE_ADMIN_SHUTDOWN. In a green field I'd put ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT here as well. But that's been around for a few years, so it's probably too late to change its SQLSTATE code. Discussion: https://postgr.es/m/763A0689-F189-459E-946F-F0EC4458980B@hotmail.com
1 parent c1d5895 commit 4edf968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/errcodes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ Section: Class 08 - Connection Exception
109109
08004 E ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION sqlserver_rejected_establishment_of_sqlconnection
110110
08007 E ERRCODE_TRANSACTION_RESOLUTION_UNKNOWN transaction_resolution_unknown
111111
08P01 E ERRCODE_PROTOCOL_VIOLATION protocol_violation
112-
08P02 E ERRCODE_IDLE_SESSION_TIMEOUT idle_session_timeout
113112

114113
Section: Class 09 - Triggered Action Exception
115114

@@ -429,6 +428,7 @@ Section: Class 57 - Operator Intervention
429428
57P02 E ERRCODE_CRASH_SHUTDOWN crash_shutdown
430429
57P03 E ERRCODE_CANNOT_CONNECT_NOW cannot_connect_now
431430
57P04 E ERRCODE_DATABASE_DROPPED database_dropped
431+
57P05 E ERRCODE_IDLE_SESSION_TIMEOUT idle_session_timeout
432432

433433
Section: Class 58 - System Error (errors external to PostgreSQL itself)
434434

0 commit comments

Comments
 (0)