U119: Relation does not exist

Category: Application / User Errors
SQLSTATE: 42P01 (Class 42 — Syntax Error or Access Rule Violation: undefined_table)
Urgency: low

Example Postgres Log Output:

ERROR: relation "x" does not exist at character 15
STATEMENT: SELECT * FROM x

Explanation:

The query is referencing a table or view that does not exist in the database.

You may have connected to the wrong database, mistyped a table name or forgot to specify the schema.

Recommended Action:

Usually no action required as this occurs mostly with typos in interactive sessions.

Sometimes application code generates table names (e.g. with timeseries data split up by date), where you may also see this error occur when there are ordering issues, i.e. a table gets queried before it was created.

Learn More:

No additional resources available.


Download Free eBook: The Top 6 Postgres Log Events
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →