Incident brief
Column does not exist
A query referenced a column name PostgreSQL couldn't find on that table. Usually a typo, PostgreSQL often suggests the real name in a HINT.
What lands in your log
ERROR: column "ballance" does not exist
In 10 seconds
- What triggers it
- Create a table with a column named balance.
- Fix
- Use the column's real name, PostgreSQL's own HINT usually names it exactly.
- Proof
- Reproduced on PostgreSQL 16.14 → Querying the misspelled column name 'ballance' was rejected with SQLSTATE 42703. PostgreSQL's HINT named the real column ('balance') exactly.
Fix
What to do right now
Application-level steps for this error.
- Use the column's real name, PostgreSQL's own HINT usually names it exactly.
- If the column name was created quoted with mixed case, it must be referenced quoted with the exact same case.
- After renaming a column, update every query that referenced its old name, quoting the old name does not bring it back.
-- use the column's real name
SELECT balance FROM banking.accounts;For this error
See this error live on the server
Run these against the affected instance to confirm the diagnosis before you act.
Compare the column named in the error with the real table definition, including case-sensitive quoted names and dropped columns.
Columns on the affected relation
Replace the relation literal. This exposes exact spelling, order, generated/identity flags, and data types.
SELECT attnum, attname, format_type(atttypid, atttypmod) AS data_type,
attnotnull, attidentity, attgenerated
FROM pg_attribute
WHERE attrelid = to_regclass('<schema.table>')
AND attnum > 0 AND NOT attisdropped
ORDER BY attnum;Why it happens
What PostgreSQL is telling you
The mechanism behind the error, grounded in the official manual, not paraphrased.
PostgreSQL 16 Documentation, §4.1.1 Identifiers and Key Words
Quoting an identifier also makes it case-sensitive, whereas unquoted names are always folded to lower case.Read the full section on postgresql.org →
The typo'd query
PostgreSQL couldn't find a column named 'ballance' on banking.accounts, and its HINT named the closest real match by name.The correctly spelled query
The correctly spelled column exists and is queried with no error, the table just happens to be empty, so 0 rows come back.Reproduce & verify
A real, single-session PostgreSQL reproduction
A literal transcript of SQL run against a live PostgreSQL instance in an isolated lab. The commands below are exactly what was executed.
- 1Create a table with a column named balance.
- 2Query a misspelled column name, e.g. ballance.
- 3PostgreSQL rejects the query with SQLSTATE 42703 and a HINT suggesting the real column name.
One client: create a table with a 'balance' column, query the typo'd 'ballance' instead.
CREATE SCHEMA IF NOT EXISTS banking;
DROP TABLE IF EXISTS banking.accounts;
CREATE TABLE banking.accounts (
id integer primary key,
balance numeric
);-- a typo: the column is "balance", not "ballance"
SELECT ballance FROM banking.accounts;-- the correctly spelled column works fine
SELECT balance FROM banking.accounts;What PostgreSQL actually returned
DROP TABLE
CREATE TABLEERROR: column "ballance" does not exist
LINE 1: SELECT ballance FROM banking.accounts;
^
HINT: Perhaps you meant to reference the column "accounts.balance". balance
---------
(0 rows)The case-folding rule from the manual was tested directly: a column created quoted with mixed case must be referenced quoted with that exact case, an unquoted reference does not match it.
Without this
Before: an unquoted reference is folded to lower case ('balance'), which doesn't match the stored name ('Balance').
With this, tested
After: quoting it with the exact original case matches the stored name exactly.
- A second operational test: exact SQL, raw output, measured result, and engineer notes
- Fix that looks safe but doesn't survive a rename: exact SQL, output, and verdict
- A manual-grounded production interpretation of the lab result
Card required. Cancel before day 7 and you are not charged.
Connected
Everything this error touches
Every page this SQLSTATE connects to: the concept that explains it, the runbooks that fix it, the parameters you tune to prevent it, and the sibling errors it travels with. All real cross-references. Jump straight in, or open the full interactive map.
Verification
- Last verified
- 2026-07-16 (Docker lab, PostgreSQL 16.14)
- Verification scope
- Verified against PostgreSQL 16.14 in an isolated lab environment
- Audit status
- reviewed
Went further?
Pro unlocks the second lab proof
Free page stops the bleeding. Pro adds the operational test, SQLSTATE audit, and deeper evidence, same error, more certainty.