PostgreSQL Error Reference

Every error, explained

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

3908 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 792 of 3908 errors

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
22005 ERROR

variable “…” is declared CONSTANT — 22005

error_in_assignment

PostgreSQL error "variable "…" is declared CONSTANT" (SQLSTATE 22005, error_in_assignment): what it means, common causes, and how to fix 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: "…"" (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
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 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 format specification for an interval value — 22007

invalid_datetime_format

PostgreSQL error "invalid format specification for an interval value" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

source string too short for “…” formatting field — 22007

invalid_datetime_format

PostgreSQL error "source string too short for "…" formatting field" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid value “…” for “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid value "…" for "…"" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid datetime format separator: “…” — 22007

invalid_datetime_format

PostgreSQL error "invalid datetime format separator: "…"" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

conflicting values for “…” field in formatting string — 22007

invalid_datetime_format

PostgreSQL error "conflicting values for "…" field in formatting string" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid combination of date conventions — 22007

invalid_datetime_format

PostgreSQL error "invalid combination of date conventions" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

hour “n” is invalid for the 12-hour clock — 22007

invalid_datetime_format

PostgreSQL error "hour "n" is invalid for the 12-hour clock" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

unmatched format separator “…” — 22007

invalid_datetime_format

PostgreSQL error "unmatched format separator "…"" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

unmatched format character “…” — 22007

invalid_datetime_format

PostgreSQL error "unmatched format character "…"" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

invalid input string for “Y,YYY” — 22007

invalid_datetime_format

PostgreSQL error "invalid input string for "Y,YYY"" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

input string is too short for datetime format — 22007

invalid_datetime_format

PostgreSQL error "input string is too short for datetime format" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

trailing characters remain in input string after datetime format — 22007

invalid_datetime_format

PostgreSQL error "trailing characters remain in input string after datetime format" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

missing time zone in input string for type timestamptz — 22007

invalid_datetime_format

PostgreSQL error "missing time zone in input string for type timestamptz" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

datetime format is zoned but not timed — 22007

invalid_datetime_format

PostgreSQL error "datetime format is zoned but not timed" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

missing time zone in input string for type timetz — 22007

invalid_datetime_format

PostgreSQL error "missing time zone in input string for type timetz" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

datetime format is not dated and not timed — 22007

invalid_datetime_format

PostgreSQL error "datetime format is not dated and not timed" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception
22007 ERROR

cannot calculate day of year without year information — 22007

invalid_datetime_format

PostgreSQL error "cannot calculate day of year without year information" (SQLSTATE 22007, invalid_datetime_format): what it means, common causes, and how to fix it.

Data Exception