PostgreSQL Error Reference

Every error, explained

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

2056 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 888 of 2056 errors

25008 ERROR

Held Cursor Requires Same Isolation Level — SQLSTATE 25008

held_cursor_requires_same_isolation_level

SQLSTATE 25008 (held_cursor_requires_same_isolation_level): A command is not valid in the current transaction state.

Invalid Transaction State
25P01 ERROR

RELEASE SAVEPOINT can only be used in transaction blocks — 25P01

no_active_sql_transaction

PostgreSQL error "RELEASE SAVEPOINT can only be used in transaction blocks" (SQLSTATE 25P01): what it means, common causes, and how to fix it.

Invalid Transaction State
25P01 ERROR

No Active Sql Transaction — SQLSTATE 25P01

no_active_sql_transaction

SQLSTATE 25P01 (no_active_sql_transaction): A command is not valid in the current transaction state.

Invalid Transaction State
25P01 ERROR

SAVEPOINT can only be used in transaction blocks — 25P01

no_active_sql_transaction

PostgreSQL error "SAVEPOINT can only be used in transaction blocks" (SQLSTATE 25P01): what it means, common causes, and how to fix it.

Invalid Transaction State
25P02 ERROR

current transaction is aborted, commands ignored until end of transaction block — 25P02

in_failed_sql_transaction

PostgreSQL error "current transaction is aborted, commands ignored until end of transaction block" (SQLSTATE 25P02): what it means, common causes, and h...

Invalid Transaction State
25P02 ERROR

In Failed Sql Transaction — SQLSTATE 25P02

in_failed_sql_transaction

The transaction is aborted; all further commands are ignored until it ends.

Invalid Transaction State
25P03 FATAL

terminating connection due to idle-in-transaction timeout — 25P03

idle_in_transaction_session_timeout

PostgreSQL error "terminating connection due to idle-in-transaction timeout" (SQLSTATE 25P03): what it means, common causes, and how to fix it.

Invalid Transaction State
25P03 ERROR

Idle In Transaction Session Timeout — SQLSTATE 25P03

idle_in_transaction_session_timeout

A session sat idle inside an open transaction too long and was terminated.

Invalid Transaction State
25P04 ERROR

Transaction Timeout — SQLSTATE 25P04

transaction_timeout

A transaction exceeded transaction_timeout and was aborted (PostgreSQL 17+).

Invalid Transaction State
25P04 FATAL

terminating connection due to transaction timeout — 25P04

transaction_timeout

PostgreSQL error "terminating connection due to transaction timeout" (SQLSTATE 25P04, transaction_timeout): what it means, common causes, and how to fix it.

Invalid Transaction State
26000 ERROR

Invalid Sql Statement Name — SQLSTATE 26000

invalid_sql_statement_name

A prepared statement name does not exist on the server.

Invalid SQL Statement Name
26000 ERROR

prepared statement “…” does not exist — 26000

invalid_sql_statement_name

PostgreSQL error "prepared statement "…" does not exist" (SQLSTATE 26000): what it means, common causes, and how to fix it.

Invalid SQL Statement Name
26000 ERROR

unnamed prepared statement does not exist — 26000

see SQLSTATE

PostgreSQL error "unnamed prepared statement does not exist" (SQLSTATE 26000, see SQLSTATE): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
27000 ERROR

Triggered Data Change Violation — SQLSTATE 27000

triggered_data_change_violation

SQLSTATE 27000 (triggered_data_change_violation): A trigger attempted an illegal data change.

Triggered Data Change Violation
28000 FATAL

no pg_hba.conf entry for host “…”, user “…”, database “…”, SSL off — 28000

invalid_authorization_specification

PostgreSQL error "no pg_hba.conf entry for host "…", user "…", database "…", SSL off" (SQLSTATE 28000): what it means, common causes, and how to fix it.

Invalid Authorization Specification
28000 ERROR

Invalid Authorization Specification — SQLSTATE 28000

invalid_authorization_specification

The authorization specification is invalid (authentication failure).

Invalid Authorization Specification
28P01 ERROR

Invalid Password — SQLSTATE 28P01

invalid_password

Authentication failed because the password was wrong.

Invalid Authorization Specification
28P01 FATAL

password authentication failed for user “…” — 28P01

invalid_password

PostgreSQL error "password authentication failed for user "…"" (SQLSTATE 28P01): what it means, common causes, and how to fix it.

Invalid Authorization Specification
2B000 ERROR

Dependent Privilege Descriptors Still Exist — SQLSTATE 2B000

dependent_privilege_descriptors_still_exist

SQLSTATE 2B000 (dependent_privilege_descriptors_still_exist): Other objects still depend on the target object.

Dependent Privilege Descriptors Still Exist
2BP01 ERROR

cannot drop … because other objects depend on it — 2BP01

dependent_objects_still_exist

PostgreSQL error "cannot drop … because other objects depend on it" (SQLSTATE 2BP01): what it means, common causes, and how to fix it.

Dependent Privilege Descriptors Exist
2BP01 ERROR

Dependent Objects Still Exist — SQLSTATE 2BP01

dependent_objects_still_exist

The object cannot be dropped because other objects depend on it.

Dependent Privilege Descriptors Still Exist
2BP01 ERROR

cannot drop column … of table … because other objects depend on it — 2BP01

dependent_objects_still_exist

PostgreSQL error "cannot drop column … of table … because other objects depend on it" (SQLSTATE 2BP01): what it means, common causes, and how to fix it.

Dependent Privilege Descriptors Exist
2D000 ERROR

Invalid Transaction Termination — SQLSTATE 2D000

invalid_transaction_termination

SQLSTATE 2D000 (invalid_transaction_termination): The transaction termination is invalid.

Invalid Transaction Termination
2F000 ERROR

Sql Routine Exception — SQLSTATE 2F000

sql_routine_exception

SQLSTATE 2F000 (sql_routine_exception): An SQL function raised an error.

SQL Routine Exception