PostgreSQL: column "..." does not exist
ERROR: column "<name>" does not existPostgres could not resolve a column name. The classic trap is using double quotes around a string value: in Postgres double quotes mean an identifier, so "active" is read as a column, not the text 'active'. Use single quotes for string literals.
What this error means
Postgres treats single quotes and double quotes very differently. Single quotes wrap string and date literals. Double quotes wrap identifiers like table and column names. Swapping them is the single most common source of this error.
It also appears when a column truly does not exist because of a typo, a missing join, or schema drift where a migration has not been applied.
How to fix it
You used double quotes around a string value
WHERE status = "active" tells Postgres to compare to a column named active. Use single quotes for the literal.
-- wrong:
SELECT * FROM orders WHERE status = "active";
-- right:
SELECT * FROM orders WHERE status = 'active';The column belongs to a table you did not join
Qualify the column with its table, and make sure that table is in the FROM or JOIN clause.
SELECT o.id, c.email
FROM orders o
JOIN customers c ON c.id = o.customer_id;Typo or wrong case
List the real columns and match the name exactly.
\d ordersHow to avoid it next time
- Remember the rule: single quotes for values, double quotes for identifiers.
- Qualify columns with a table alias in any query that joins more than one table.
Frequently asked questions
Why is my string value treated as a column?
Because you wrapped it in double quotes. In Postgres, double quotes always mean an identifier. Strings must use single quotes.
How do I see the columns of a table?
Run \d tablename in psql, or query information_schema.columns for that table.
Stop struggling with SQL
Use FluentDB, the AI database client for macOS.
Related errors
Part of the PostgreSQL error reference. Last reviewed 2026-07-31.