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 264 of 578 errors

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
28P01 FATAL

SCRAM authentication requires a non-empty password — 28P01

invalid_password

PostgreSQL error "SCRAM authentication requires a non-empty password — 28P01" (SQLSTATE 28P01): what it means, common causes, and how to fix it.

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 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
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
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
2F002 ERROR

Modifying Sql Data Not Permitted — SQLSTATE 2F002

modifying_sql_data_not_permitted

SQLSTATE 2F002 (modifying_sql_data_not_permitted): An SQL function raised an error.

SQL Routine Exception
2F003 ERROR

Prohibited Sql Statement Attempted — SQLSTATE 2F003

prohibited_sql_statement_attempted

SQLSTATE 2F003 (prohibited_sql_statement_attempted): An SQL function raised an error.

SQL Routine Exception
2F004 ERROR

Reading Sql Data Not Permitted — SQLSTATE 2F004

reading_sql_data_not_permitted

SQLSTATE 2F004 (reading_sql_data_not_permitted): An SQL function raised an error.

SQL Routine Exception
2F005 ERROR

Function Executed No Return Statement — SQLSTATE 2F005

function_executed_no_return_statement

SQLSTATE 2F005 (function_executed_no_return_statement): An SQL function raised an error.

SQL Routine Exception
2F005 ERROR

control reached end of function without RETURN — 2F005

function_executed_no_return_statement

PostgreSQL error "control reached end of function without RETURN" (SQLSTATE 2F005): what it means, common causes, and how to fix it.

SQL Routine Exception
34000 ERROR

cursor “…” does not exist — 34000

invalid_cursor_name

PostgreSQL error "cursor … does not exist — 34000" (SQLSTATE 34000): what it means, common causes, and how to fix it.

Invalid Cursor Name
34000 ERROR

cursor “…” does not exist — 34000

invalid_cursor_name

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

Invalid Cursor Name
34000 ERROR

Invalid Cursor Name — SQLSTATE 34000

invalid_cursor_name

The named cursor does not exist.

Invalid Cursor Name
38000 ERROR

External Routine Exception — SQLSTATE 38000

external_routine_exception

SQLSTATE 38000 (external_routine_exception): An external (C) routine raised an error.

External Routine Exception
38001 ERROR

Containing Sql Not Permitted — SQLSTATE 38001

containing_sql_not_permitted

SQLSTATE 38001 (containing_sql_not_permitted): An external (C) routine raised an error.

External Routine Exception
38002 ERROR

Modifying Sql Data Not Permitted — SQLSTATE 38002

modifying_sql_data_not_permitted

SQLSTATE 38002 (modifying_sql_data_not_permitted): An external (C) routine raised an error.

External Routine Exception
38003 ERROR

Prohibited Sql Statement Attempted — SQLSTATE 38003

prohibited_sql_statement_attempted

SQLSTATE 38003 (prohibited_sql_statement_attempted): An external (C) routine raised an error.

External Routine Exception
38004 ERROR

Reading Sql Data Not Permitted — SQLSTATE 38004

reading_sql_data_not_permitted

SQLSTATE 38004 (reading_sql_data_not_permitted): An external (C) routine raised an error.

External Routine Exception
39000 ERROR

External Routine Invocation Exception — SQLSTATE 39000

external_routine_invocation_exception

SQLSTATE 39000 (external_routine_invocation_exception): An external routine invocation failed.

External Routine Invocation Exception