I can run the following script without errors in pgadmin4

SELECT * from tbl

I have tried the following in datagrip

SELECT * from tbl


SELECT * from public.tbl

Neither of the above scripts worked. The following error was returned:

[2018-05-12 21:16:44] [42P01] ERROR: relation "public.tbl" does not exist
[2018-05-12 21:16:44] Position: 15

This ended up being really simple and a very silly mistake, but hopefully this will help someone else.

I simply needed to select the correct database. The default is postgres. The database I had my tables in was webadmin. You can change the database when you make your connection in datagrip. The screen where I made the change looked like this

enter image description here



It's better to change a search path at top right angle of the console search path selection

Refer to documentation

  • Pictures are worth a thousand words but an answer as a script showing how to change schemas is easier to search for by Google. – kevinskio Feb 25 '20 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.