Error 42P01: relation does not exist (PostgreSQL)
In short: The table or view in the query does not exist.
In more detail: PostgreSQL code 42P01 (undefined_table).
In Depth
Possible causes
- Table not created, migration not run.
- Wrong schema or database.
- Upper/lower case with quotes.
Solutions
- Run migrations.
- Check schema and connection.
- Show existing tables with
\dt.
See also: PostgreSQL, SQL, Database