PostgreSQL Error Reference

Every error, explained

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

1815 errors documentedFree diagnostics on every pageAll PG versions covered

Showing 912 of 1815 errors

42601 ERROR

query returned n column — 42601

syntax_error

PostgreSQL error "query returned n column" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

INTO used with a command that cannot return data — 42601

syntax_error

PostgreSQL error "INTO used with a command that cannot return data" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

RAISE option already specified: … — 42601

syntax_error

PostgreSQL error "RAISE option already specified: …" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

cannot use RETURN QUERY in a non-SETOF function — 42601

syntax_error

PostgreSQL error "cannot use RETURN QUERY in a non-SETOF function" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

RETURN NEXT must have a parameter — 42601

syntax_error

PostgreSQL error "RETURN NEXT must have a parameter" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

cannot use RETURN NEXT in a non-SETOF function — 42601

syntax_error

PostgreSQL error "cannot use RETURN NEXT in a non-SETOF function" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

arguments required for cursor — 42601

syntax_error

PostgreSQL error "arguments required for cursor" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

arguments given for cursor without arguments — 42601

syntax_error

PostgreSQL error "arguments given for cursor without arguments" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

RESET must not include values for parameters — 42601

syntax_error

PostgreSQL error "RESET must not include values for parameters" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

procedure parameter n is an output parameter but corresponding argu… — 42601

syntax_error

PostgreSQL error "procedure parameter n is an output parameter but corresponding argument is not writable" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

procedure parameter “…” is an output parameter but corresponding ar… — 42601

syntax_error

PostgreSQL error "procedure parameter "…" is an output parameter but corresponding argument is not writable" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

cannot use return_next in a non-SETOF function — 42601

syntax_error

PostgreSQL error "cannot use return_next in a non-SETOF function" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

didn’t get a CODE reference from compiling function “…” — 42601

syntax_error

PostgreSQL error "didn't get a CODE reference from compiling function "…"" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

collation attribute “…” not recognized — 42601

syntax_error

PostgreSQL error "collation attribute "…" not recognized" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

invalid Unicode code point — 42601

syntax_error

PostgreSQL error "invalid Unicode code point" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

subscription with … must also set … — 42601

syntax_error

PostgreSQL error "subscription with … must also set …" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

… and … are mutually exclusive options — 42601

syntax_error

PostgreSQL error "… and … are mutually exclusive options" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

Unicode normalization can only be performed if server encoding is UTF8 — 42601

syntax_error

PostgreSQL error "Unicode normalization can only be performed if server encoding is UTF8" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

unrecognized subscription parameter: “…” — 42601

syntax_error

PostgreSQL error "unrecognized subscription parameter: "…"" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

unrecognized statistics kind “…” — 42601

syntax_error

PostgreSQL error "unrecognized statistics kind "…"" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

parameter “…” must be READ_ONLY, SHAREABLE, or READ_WRITE — 42601

syntax_error

PostgreSQL error "parameter "…" must be READ_ONLY, SHAREABLE, or READ_WRITE" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

parameter “parallel” must be SAFE, RESTRICTED, or UNSAFE — 42601

syntax_error

PostgreSQL error "parameter "parallel" must be SAFE, RESTRICTED, or UNSAFE" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

invalid sequence option SEQUENCE NAME — 42601

syntax_error

PostgreSQL error "invalid sequence option SEQUENCE NAME" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation
42601 ERROR

cannot use “S” and “SG” together — 42601

syntax_error

PostgreSQL error "cannot use "S" and "SG" together" (SQLSTATE 42601, syntax_error): what it means, common causes, and how to fix it.

Syntax Error or Access Rule Violation