SQLSTATE reference

Every PostgreSQL error, indexed by class

PostgreSQL groups every error code into a two-character class. Below is the full catalog, organized the same way the official manual is — jump to a class, then open any code for the lab-reproduced explanation.

Class 08 · Connection Exception

2 codes

Class 0A · Feature Not Supported

1 code

Class 21 · Cardinality Violation

1 code

Class 22 · Data Exception

12 codes

Class 23 · Integrity Constraint Violation

5 codes

Class 25 · Invalid Transaction State

6 codes

Class 28 · Invalid Authorization Specification

1 code

Class 2B · Dependent Privilege Descriptors Still Exist

1 code

Class 34 · Other

1 code

Class 3D · Invalid Catalog Name

1 code

Class 3F · Invalid Schema Name

1 code

Class 40 · Transaction Rollback

2 codes

Class 42 · Syntax Error or Access Rule Violation

13 codes

Class 53 · Insufficient Resources

1 code

Class 54 · Program Limit Exceeded

1 code

Class 55 · Object Not In Prerequisite State

3 codes

Class 57 · Operator Intervention

1 code

Class P0 · PL/pgSQL Error

3 codes