42703 PostgreSQL Origin: Data Last updated 12 Oct 2026

PostgreSQL: ERROR: column "x" does not exist

PostgreSQL can’t find the column — a missing migration, a case-sensitive quoted name, or a string literal written in double quotes.

Exact message you may see column does not exist
Seen on: PostgreSQL

Meaning

Two PostgreSQL-specific traps cause most of these: unquoted identifiers are folded to lower case (a column created as "createdAt" must always be quoted), and double quotes mean *identifier*, not string — WHERE status = "paid" looks for a column named paid.

Common causes

  • String value in double quotes ("paid" instead of 'paid')
  • Mixed-case column created with quotes, queried without (createdAt → createdat)
  • Migration adding the column not run
  • Column alias used in WHERE (aliases only exist in ORDER BY/outer query)

⚡ Quick fix

  1. Use single quotes for strings
  2. Quote mixed-case names exactly ("createdAt") — or rename columns to snake_case
  3. Run pending migrations
  4. Move alias-based filters into a subquery or repeat the expression

Detailed fix by platform

PostgreSQL

  1. Common mistakes:
    sql
    SELECT * FROM orders WHERE status = "paid";   -- ❌ column "paid" does not exist
    SELECT * FROM orders WHERE status = 'paid';   -- ✅
    
    SELECT "createdAt" FROM users;                -- ✅ if the column was created with quotes
    \d users                                      -- psql: list real column names

How to diagnose

  1. Quotes — Double quotes around a value?
  2. Case — How is the column really named (\d table)?
  3. Migrations — Run on this database?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

1054 — MySQL ERROR 1054 (42S22): Unknown column in 'field list' (MySQL)10542BP01 — ERROR: cannot drop table x because other objects depend on it (PostgreSQL)2BP0142601 — ERROR: syntax error at or near "x" (PostgreSQL)4260142701 — ERROR: column "x" of relation "y" already exists (PostgreSQL)4270142P01 — PostgreSQL: ERROR: relation "x" does not exist (PostgreSQL)42P0155006 — ERROR: database "x" is being accessed by other users — There is 1 other session using the database. (PostgreSQL)55006additionalProperties — API Error: Request failed schema validation (must NOT have additional properties / Additional properties are not allowed) (API)additionalPropertiesambiguous column — Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052) (SQL)ambiguous column42703

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.