Postgres : Relation does not exist error
30
votes
1
answer
240473
views
I used pg_restore to load my postgres db with a dump file.
I connected to my db with my user :
sudo -u arajguru psql dump
select current_user;
current_user
--------------
arajguru
Now I was able to see all the newly created tables:
dump=> \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------+-------+----------
public | Approvals | table | arajguru
public | Approvers | table | arajguru
public | Conditions | table | arajguru
public | Entities | table | arajguru
public | EntityDefinitions | table | arajguru
public | Projects | table | arajguru
public | Rules | table | arajguru
public | run_history | table | arajguru
(8 rows)
But when I try to fire a select * query, it gave me this error:
dump=> select * from Approvals;
ERROR: relation "approvals" does not exist
LINE 1: select * from Approvals;
What can be the reason for this error? Please help.
Asked by Ayushi Rajguru
(403 rep)
Dec 12, 2017, 07:29 AM
Last activity: Sep 11, 2020, 05:09 PM
Last activity: Sep 11, 2020, 05:09 PM