Every error, explained
SQLSTATE codes, condition names, root causes, diagnostic queries, and recovery steps — structured for engineers running PostgreSQL in production.
Showing 672 of 3908 errors
0L000
ERROR
Invalid Grantor — SQLSTATE 0L000
invalid_grantor
SQLSTATE 0L000 (invalid_grantor): The grantor or grant operation is invalid.
0LP01
ERROR
grant options can only be granted to roles — 0LP01
invalid_grant_operation
PostgreSQL error "grant options can only be granted to roles" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
Invalid Grant Operation — SQLSTATE 0LP01
invalid_grant_operation
SQLSTATE 0LP01 (invalid_grant_operation): The grantor or grant operation is invalid.
0LP01
ERROR
default privileges cannot be set for columns — 0LP01
invalid_grant_operation
PostgreSQL error "default privileges cannot be set for columns" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
column privileges are only valid for relations — 0LP01
invalid_grant_operation
PostgreSQL error "column privileges are only valid for relations" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
cannot set privileges of array types — 0LP01
invalid_grant_operation
PostgreSQL error "cannot set privileges of array types" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
invalid privilege type … for table — 0LP01
invalid_grant_operation
PostgreSQL error "invalid privilege type … for table" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
invalid privilege type … for column — 0LP01
invalid_grant_operation
PostgreSQL error "invalid privilege type … for column" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
column names cannot be included in GRANT/REVOKE ROLE — 0LP01
invalid_grant_operation
PostgreSQL error "column names cannot be included in GRANT/REVOKE ROLE" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
role “…” is a member of role “…” — 0LP01
invalid_grant_operation
PostgreSQL error "role "…" is a member of role "…"" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
grant options cannot be granted back to your own grantor — 0LP01
invalid_grant_operation
PostgreSQL error "grant options cannot be granted back to your own grantor" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
cannot set privileges of multirange types — 0LP01
invalid_grant_operation
PostgreSQL error "cannot set privileges of multirange types" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
cannot use IN SCHEMA clause when using GRANT/REVOKE ON SCHEMAS — 0LP01
invalid_grant_operation
PostgreSQL error "cannot use IN SCHEMA clause when using GRANT/REVOKE ON SCHEMAS" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
… option cannot be granted back to your own grantor — 0LP01
invalid_grant_operation
PostgreSQL error "… option cannot be granted back to your own grantor" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0LP01
ERROR
cannot use IN SCHEMA clause when using … — 0LP01
invalid_grant_operation
PostgreSQL error "cannot use IN SCHEMA clause when using …" (SQLSTATE 0LP01, invalid_grant_operation): what it means, common causes, and how to fix it.
0P000
ERROR
Invalid Role Specification — SQLSTATE 0P000
invalid_role_specification
SQLSTATE 0P000 (invalid_role_specification): The role specification is invalid.
0Z000
ERROR
Diagnostics Exception — SQLSTATE 0Z000
diagnostics_exception
SQLSTATE 0Z000 (diagnostics_exception): Stacked diagnostics were accessed without an active handler.
0Z002
ERROR
GET STACKED DIAGNOSTICS cannot be used outside an exception handler — 0Z002
stacked_diagnostics_accessed_without_active_handler
PostgreSQL error "GET STACKED DIAGNOSTICS cannot be used outside an exception handler" (SQLSTATE 0Z002, stacked_diagnostics_accessed_without_active_handler): what it means, common causes, and how to fix it.
0Z002
ERROR
Stacked Diagnostics Accessed Without Active Handler — SQLSTATE 0Z002
stacked_diagnostics_accessed_without_active_handler
SQLSTATE 0Z002 (stacked_diagnostics_accessed_without_active_handler): Stacked diagnostics were accessed without an active handler.
0Z002
ERROR
RAISE without parameters cannot be used outside an exception handler — 0Z002
stacked_diagnostics_accessed_without_active_handler
PostgreSQL error "RAISE without parameters cannot be used outside an exception handler" (SQLSTATE 0Z002, stacked_diagnostics_accessed_without_active_handler): what it means, common causes, and how to fix it.
10608
ERROR
Invalid Argument For Xquery — SQLSTATE 10608
invalid_argument_for_xquery
PostgreSQL raises SQLSTATE 10608 (invalid_argument_for_xquery), a ERROR in the XQuery Error class. Inspect the server log for context.
20000
ERROR
Case Not Found — SQLSTATE 20000
case_not_found
SQLSTATE 20000 (case_not_found): A CASE expression matched no branch and had no ELSE.
20000
ERROR
case not found — 20000
case_not_found
PostgreSQL error "case not found" (SQLSTATE 20000, case_not_found): what it means, common causes, and how to fix it.
21000
ERROR
multiranges cannot be constructed from multidimensional arrays — 21000
cardinality_violation
PostgreSQL error "multiranges cannot be constructed from multidimensional arrays" (SQLSTATE 21000, cardinality_violation): what it means, common causes, and how to fix it.