PostgreSQL: ERROR: relation "x" does not exist
The table/view isn’t found — missing migration, wrong schema, or a case-sensitive quoted name.
Seen on:
PostgreSQL
Meaning
PostgreSQL folds unquoted identifiers to lower case. A table created as "Users" (quoted) must always be queried as "Users". Also check search_path — the table may be in another schema.
Common causes
- Migrations not run
- Wrong database or schema (search_path)
- Case-sensitive quoted table name
- Table created in a transaction that was rolled back
⚡ Quick fix
\dt *.*in psql to list tables across schemas- Run migrations
- Use lower-case unquoted names, or quote consistently
- Set
search_pathor schema-qualify:app.users
Detailed fix by platform
PostgreSQL
- ORMs like Prisma/Sequelize may quote names — keep model names lower-case or configure table names explicitly.
How to diagnose
- Database — Connected to the right DB?
- Schema — search_path includes it?
- Case — Created with quotes?
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026