PostgreSQL Error Reference

Every error, explained

SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.

578 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 96 of 578 errors

22003 ERROR

Numeric Value Out Of Range — SQLSTATE 22003

numeric_value_out_of_range

A numeric value is outside the allowed range for its type.

Data Exception
22004 ERROR

Null Value Not Allowed — SQLSTATE 22004

null_value_not_allowed

A NULL value was supplied where a non-null value is required.

Data Exception
22005 ERROR

Error In Assignment — SQLSTATE 22005

error_in_assignment

SQLSTATE 22005 (error_in_assignment): A value is invalid for its data type or the operation applied to it.

Data Exception
22007 ERROR

Invalid Datetime Format — SQLSTATE 22007

invalid_datetime_format

A date/time string did not match the expected format.

Data Exception
22007 ERROR

invalid input syntax for type timestamp: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type timestamp: … — 22007" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input syntax for type interval: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type interval: "…"" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input syntax for type timestamp: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type timestamp: "…"" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input syntax for type date: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type date: … — 22007" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input syntax for type time: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type time: "…"" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input syntax for type date: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid input syntax for type date: "…"" (SQLSTATE 22007): what it means, common causes, and how to fix it.

Data Exception
22008 ERROR

Datetime Field Overflow — SQLSTATE 22008

datetime_field_overflow

A date/time field is out of range.

Data Exception
22008 ERROR

date/time field value out of range: “…” — 22008

datetime_field_overflow

PostgreSQL error "date/time field value out of range: "…"" (SQLSTATE 22008): what it means, common causes, and how to fix it.

Data Exception
22008 ERROR

timestamp out of range — 22008

datetime_field_overflow

PostgreSQL error "timestamp out of range" (SQLSTATE 22008): what it means, common causes, and how to fix it.

Data Exception
22008 ERROR

date out of range for type … — 22008

datetime_field_overflow

PostgreSQL error "date out of range for type …" (SQLSTATE 22008): what it means, common causes, and how to fix it.

Data Exception
22009 ERROR

Invalid Time Zone Displacement Value — SQLSTATE 22009

invalid_time_zone_displacement_value

SQLSTATE 22009 (invalid_time_zone_displacement_value): A value is invalid for its data type or the operation applied to it.

Data Exception
2200B ERROR

Escape Character Conflict — SQLSTATE 2200B

escape_character_conflict

SQLSTATE 2200B (escape_character_conflict): A value is invalid for its data type or the operation applied to it.

Data Exception
2200C ERROR

Invalid Use Of Escape Character — SQLSTATE 2200C

invalid_use_of_escape_character

SQLSTATE 2200C (invalid_use_of_escape_character): A value is invalid for its data type or the operation applied to it.

Data Exception
2200D ERROR

Invalid Escape Octet — SQLSTATE 2200D

invalid_escape_octet

SQLSTATE 2200D (invalid_escape_octet): A value is invalid for its data type or the operation applied to it.

Data Exception
2200F ERROR

Zero Length Character String — SQLSTATE 2200F

zero_length_character_string

SQLSTATE 2200F (zero_length_character_string): A value is invalid for its data type or the operation applied to it.

Data Exception
2200G ERROR

Most Specific Type Mismatch — SQLSTATE 2200G

most_specific_type_mismatch

SQLSTATE 2200G (most_specific_type_mismatch): A value is invalid for its data type or the operation applied to it.

Data Exception
2200H ERROR

Sequence Generator Limit Exceeded — SQLSTATE 2200H

sequence_generator_limit_exceeded

SQLSTATE 2200H (sequence_generator_limit_exceeded): A value is invalid for its data type or the operation applied to it.

Data Exception
2200L ERROR

Not An Xml Document — SQLSTATE 2200L

not_an_xml_document

SQLSTATE 2200L (not_an_xml_document): A value is invalid for its data type or the operation applied to it.

Data Exception
2200M ERROR

Invalid Xml Document — SQLSTATE 2200M

invalid_xml_document

SQLSTATE 2200M (invalid_xml_document): A value is invalid for its data type or the operation applied to it.

Data Exception
2200N ERROR

Invalid Xml Content — SQLSTATE 2200N

invalid_xml_content

SQLSTATE 2200N (invalid_xml_content): A value is invalid for its data type or the operation applied to it.

Data Exception