skip to Main Content

For some reason I am facing this issue that in existing database I have a user table, where I have stored data manually, but when I am trying to access it through the query I get this error

ERROR: relation "user" does not exist

Can you kindly let me know, what may be the cause of this error. Just to mention here I am able to access all the other tables present in the database.

2

Answers


  1. It’s reserved word in PostgreSQL, so if you going to use a table named like that you need to wrap that name in double quotes.

    Login or Signup to reply.
  2. Check if you’re using the correct schema. For example, if the user table is in the public schema, you should use the query like:

    SELECT * FROM public.user;
    

    It’s possible too that the table was not created or named correctly, or there may be an issue with the schema or permissions.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search