You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you receive a 400 error with the message column example_table.example_column does not exist only on mutation requests (PATCH, POST, DELETE) — while SELECT queries on the same column work fine — this is a known bug in PostgREST versions prior to 14.4 (issue #3707).
Root cause
The bug is triggered when an or() filter is included in a mutation request. PostgREST incorrectly applies the OR filter's column resolution logic to the mutation plan, causing it to fail to locate columns that exist and are otherwise accessible.
How to confirm
Reproduce the asymmetry — run the same filter as a GET request. If it succeeds but the PATCH/POST/DELETE fails with the same column reference, the bug is the likely cause.
Check your PostgREST version — go to Project Settings > Infrastructure and note the PostgreSQL version. PostgREST 14.1 and earlier are affected; 14.4+ includes the fix.
Check Postgres logs — if you have logging enabled, you should see column "example_column" does not exist errors correlating with the timestamps of the failed mutation requests.
Explicitly include the column referenced in the error in the select parameter of your mutation request. This forces PostgREST to resolve the column correctly during the mutation plan.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
If you receive a
400error with the messagecolumn example_table.example_column does not existonly on mutation requests (PATCH,POST,DELETE) — whileSELECTqueries on the same column work fine — this is a known bug in PostgREST versions prior to 14.4 (issue #3707).Root cause
The bug is triggered when an
or()filter is included in a mutation request. PostgREST incorrectly applies the OR filter's column resolution logic to the mutation plan, causing it to fail to locate columns that exist and are otherwise accessible.How to confirm
GETrequest. If it succeeds but thePATCH/POST/DELETEfails with the same column reference, the bug is the likely cause.column "example_column" does not existerrors correlating with the timestamps of the failed mutation requests.Resolution
Option 1: Upgrade (permanent fix)
Navigate to Project Settings > Infrastructure and upgrade to the latest PostgreSQL version. This automatically upgrades PostgREST to 14.5+, where the bug is resolved.
Option 2: Query workaround (immediate)
Explicitly include the column referenced in the error in the
selectparameter of your mutation request. This forces PostgREST to resolve the column correctly during the mutation plan.For example, if your request looks like:
Add
select=with the affected column:This workaround applies per-request and does not require any schema changes or infrastructure modifications.
Related topics
All reactions