Every error, explained
SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.
Showing 192 of 578 errors
22P02
ERROR
invalid input syntax for type uuid: “…” — 22P02
invalid_text_representation
PostgreSQL error "invalid input syntax for type uuid: "…"" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
invalid input syntax for type json — 22P02
invalid_text_representation
PostgreSQL error "invalid input syntax for type json" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
malformed array literal: “…” — 22P02
invalid_text_representation
PostgreSQL error "malformed array literal: "…"" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
invalid input syntax for type bigint: “…” — 22P02
invalid_text_representation
PostgreSQL error "invalid input syntax for type bigint: "…"" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
malformed range literal: “…” — 22P02
invalid_text_representation
PostgreSQL error "malformed range literal: "…"" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
array value must start with “{” or dimension information — 22P02
invalid_text_representation
PostgreSQL error "array value must start with "{" or dimension information" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P02
ERROR
invalid input syntax for type inet: “…” — 22P02
invalid_text_representation
PostgreSQL error "invalid input syntax for type inet: "…"" (SQLSTATE 22P02): what it means, common causes, and how to fix it.
22P03
ERROR
Invalid Binary Representation — SQLSTATE 22P03
invalid_binary_representation
SQLSTATE 22P03 (invalid_binary_representation): A value is invalid for its data type or the operation applied to it.
22P03
ERROR
invalid input syntax for type bytea — 22P03
invalid_binary_representation
PostgreSQL error "invalid input syntax for type bytea" (SQLSTATE 22P03): what it means, common causes, and how to fix it.
22P04
ERROR
Bad Copy File Format — SQLSTATE 22P04
bad_copy_file_format
COPY input does not match the expected format.
22P04
ERROR
COPY from stdin failed: … — 22P04
bad_copy_file_format
PostgreSQL error "COPY from stdin failed: …" (SQLSTATE 22P04): what it means, common causes, and how to fix it.
22P04
ERROR
extra data after last expected column — 22P04
bad_copy_file_format
PostgreSQL error "extra data after last expected column" (SQLSTATE 22P04): what it means, common causes, and how to fix it.
22P04
ERROR
missing data for column “…” — 22P04
bad_copy_file_format
PostgreSQL error "missing data for column "…"" (SQLSTATE 22P04): what it means, common causes, and how to fix it.
22P05
ERROR
Untranslatable Character — SQLSTATE 22P05
untranslatable_character
SQLSTATE 22P05 (untranslatable_character): A value is invalid for its data type or the operation applied to it.
22P05
ERROR
requested character too large for encoding: N — 22P05
untranslatable_character
PostgreSQL error "requested character too large for encoding: N" (SQLSTATE 22P05): what it means, common causes, and how to fix it.
22P05
ERROR
character with byte sequence … in encoding “…” has no equivalent in encoding “…” — 22P05
untranslatable_character
PostgreSQL error "character with byte sequence … in encoding "…" has no equivalent in encoding "…"" (SQLSTATE 22P05): what it means, common causes, and ...
22P06
ERROR
Nonstandard Use Of Escape Character — SQLSTATE 22P06
nonstandard_use_of_escape_character
SQLSTATE 22P06 (nonstandard_use_of_escape_character): A value is invalid for its data type or the operation applied to it.
23000
ERROR
Integrity Constraint Violation — SQLSTATE 23000
integrity_constraint_violation
SQLSTATE 23000 (integrity_constraint_violation): A write violates a NOT NULL, UNIQUE, CHECK, or FOREIGN KEY constraint.
23001
ERROR
Restrict Violation — SQLSTATE 23001
restrict_violation
A delete or update was blocked by a RESTRICT foreign-key rule.
23502
ERROR
null value in column “…” violates not-null constraint — 23502
not_null_violation
PostgreSQL error "null value in column "…" violates not-null constraint" (SQLSTATE 23502): what it means, common causes, and how to fix it.
23502
ERROR
null value in column “…” violates not-null constraint (generated always) — 23502
not_null_violation
PostgreSQL error "null value in column … violates not-null constraint (generated always) — 23502" (SQLSTATE 23502): what it means, common causes, and how to fix it.
23502
ERROR
Not Null Violation — SQLSTATE 23502
not_null_violation
A NULL was written to a column defined NOT NULL.
23502
ERROR
null value in column “…” of relation “…” violates not-null constraint — 23502
not_null_violation
PostgreSQL error "null value in column "…" of relation "…" violates not-null constraint" (SQLSTATE 23502): what it means, common causes, and how to fix it.
23503
ERROR
insert or update on table “…” violates foreign key constraint “…” — 23503
foreign_key_violation
PostgreSQL error "insert or update on table "…" violates foreign key constraint "…"" (SQLSTATE 23503): what it means, common causes, and how to fix it.