PostgreSQL Error Codes
SQLSTATE error codes returned by PostgreSQL. Each code is five characters: the first two identify the class, the last three the specific condition.
148 codes
-
00000Successful completion -
0A000Feature not supported -
0B000Invalid transaction initiation -
01P01Deprecated feature -
2BP01Dependent objects still exist -
2D000Invalid transaction termination -
3B001Invalid savepoint specification -
3D000Invalid catalog name -
3F000Invalid schema name -
08P01Protocol violation -
22P01Floating point exception -
22P02Invalid text representation -
22P03Invalid binary representation -
22P04Bad copy file format -
22P05Untranslatable character -
23P01Exclusion violation -
25P01No active SQL transaction -
25P02In failed SQL transaction -
25P03Idle in transaction session timeout -
28P01Invalid password -
40P01Deadlock detected -
42P01Undefined table -
42P02Undefined parameter -
42P03Duplicate cursor -
42P04Duplicate database -
42P05Duplicate prepared statement -
42P06Duplicate schema -
42P07Duplicate table -
42P08Ambiguous parameter -
42P18Indeterminate datatype -
42P20Windowing error -
55P02Cannot change runtime parameter -
55P03Lock not available -
57P01Admin shutdown -
57P02Crash shutdown -
57P03Cannot connect now -
57P04Database dropped -
57P05Idle session timeout -
58P01Undefined file -
58P02Duplicate file -
01000Warning -
01003Null value eliminated in set function -
01004String data right truncation -
01006Privilege not revoked -
01007Privilege not granted -
02000No data -
2201BInvalid regular expression -
2201EInvalid argument for logarithm -
2201FInvalid argument for power function -
2202EArray subscript error -
03000SQL statement not yet complete -
08000Connection exception -
08001SQL client unable to establish SQL connection -
08003Connection does not exist -
08004SQL server rejected establishment of SQL connection -
08006Connection failure -
08007Transaction resolution unknown -
09000Triggered action exception -
20000Case not found -
21000Cardinality violation -
22000Data exception -
22001String data right truncation -
22002Null value, no indicator parameter -
22003Numeric value out of range -
22004Null value not allowed -
22005Error in assignment -
22007Invalid datetime format -
22008Datetime field overflow -
22009Invalid time zone displacement value -
22012Division by zero -
22015Interval field overflow -
22018Invalid character value for cast -
22019Invalid escape character -
22021Character not in repertoire -
22022Indicator overflow -
22023Invalid parameter value -
22024Unterminated C string -
22025Invalid escape sequence -
22026String data length mismatch -
22032Invalid JSON text -
22034More than one SQL/JSON item -
22035No SQL/JSON item -
23000Integrity constraint violation -
23001Restrict violation -
23502Not null violation -
23503Foreign key violation -
23505Unique violation -
23514Check violation -
24000Invalid cursor state -
25000Invalid transaction state -
25001Active SQL transaction -
25006Read only SQL transaction -
26000Invalid SQL statement name -
27000Triggered data change violation -
28000Invalid authorization specification -
34000Invalid cursor name -
40000Transaction rollback -
40001Serialization failure -
40002Transaction integrity constraint violation -
40003Statement completion unknown -
42000Syntax error or access rule violation -
42501Insufficient privilege -
42601Syntax error -
42602Invalid name -
42611Invalid column definition -
42622Name too long -
42701Duplicate column -
42702Ambiguous column -
42703Undefined column -
42704Undefined object -
42710Duplicate object -
42712Duplicate alias -
42723Duplicate function -
42725Ambiguous function -
42803Grouping error -
42804Datatype mismatch -
42809Wrong object type -
42830Invalid foreign key -
42846Cannot coerce -
42883Undefined function -
42939Reserved name -
44000WITH CHECK OPTION violation -
53000Insufficient resources -
53100Disk full -
53200Out of memory -
53300Too many connections -
53400Configuration limit exceeded -
54000Program limit exceeded -
54001Statement too complex -
54011Too many columns -
54023Too many arguments -
55000Object not in prerequisite state -
55006Object in use -
57000Operator intervention -
57014Query cancelled -
58000System error -
58030IO error -
72000Snapshot too old -
F0000Config file error -
F0001Lock file exists -
P0000PL/pgSQL error -
P0001Raise exception -
P0002No data found -
P0003Too many rows -
P0004Assert failure -
XX000Internal error -
XX001Data corrupted -
XX002Index corrupted