Posted on 29th April 2025|6702 views
Why do we get "Relation does not exist" in PostgreSQL?
Posted on 29th April 2025| views
This (programming error ) does not exist when you give a keyword that does not exist in the column you provide in the PostgreSQL database.
For example:
SELECT name_of_column
FROM my_schema.columns
WHERE name_of_table="my_database";
The name of table my_database referencing a column in my_schema does not exist because you need to add CREATE TABLE statement to create a table.
Now by adding the statement below, we can make sure that we don’t get this comment relation does not exist.
SELECT *
FROM public <schema>."my_database"