SQLSTATE 42601Severity lowLab verified

Incident brief

Syntax error

PostgreSQL's parser rejected the statement because it didn't match valid SQL grammar — here, an unquoted reserved key word used as a table name.

Reproduced on PostgreSQL 16.14Verified 2026-07-16 (Docker lab, PostgreSQL 16.14)Reviewed by Verified against PostgreSQL 16.14 in an isolated lab environment

In 10 seconds

What
Syntax error
What triggers it
Try to CREATE TABLE using a reserved SQL key word as the name, without quoting it.
The fix
Quote the identifier with double quotes so PostgreSQL treats it as a name, not a key word.
Proof
Reproduced on PostgreSQL 16.14 → Creating a table named order, unquoted, was rejected with SQLSTATE 42601. No table was created.

The fix

What to do right now

The immediate, application-level response to this error.

  • Quote the identifier with double quotes so PostgreSQL treats it as a name, not a key word.
  • Prefer a name that isn't a reserved word at all, so you don't need to quote it everywhere it's used.
  • Quoting only fixes reserved-word collisions — it does not fix an unrelated missing-keyword syntax error, see the premium test.
Fix — SQL
CREATE TABLE "order" (id int);

Related & next steps

Follow the thread

Everything this error touches — jump straight to the sibling error, term, runbook, or parameter.

Verification

PG 16.14
Last verified
2026-07-16 (Docker lab, PostgreSQL 16.14)
Reviewed by
Verified against PostgreSQL 16.14 in an isolated lab environment
Audit status
reviewed