0

I have been working on a script in pgAdmin for a few days with an existing table. Now when I try to update the table from a command in my script I get a relation does not exist error. I can see the table in the object explorer tree and a right click to show the 100 rows of data works just fine. I also copied the select * limit 100 query to a new tab in pgadmin and it works, but if I copy it to my existing script then it throws the relation does not exist error. The script also works in Dbeaver. Any idea what is going on?

I have just copied my script to a new tab in pgAdmin and it has started working. I have the solution but would like to know why it happened.

5
  • I don't think there is enough detail here to really say for sure. Possibly something as simple as you weren't connected to the (right) database at the time you tried to run the script. Commented Oct 13, 2023 at 16:34
  • maybe there is a character after he text run stackoverflow.com/questions/14730228/… Commented Oct 13, 2023 at 16:35
  • It comes down to two possibilities 1) The relation does not exist because you are not connected to correct Postgres instance 2) Spelling/case issue, where the relation name was not properly written out. Without the actual query and complete error message it is not possible to be more definitive. Commented Oct 13, 2023 at 16:41
  • Use a different SQL tool, for example psql or Dbeaver. I've thrown away pgAdmin a long time ago... Commented Oct 13, 2023 at 17:23
  • can you share the exact error message? relation does not exist isn't very descriptive, and usually Postgres does a good job providing an error message that helps to quickly identify and fix the problem Commented Oct 13, 2023 at 17:27

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.