TablePlus icon indicating copy to clipboard operation
TablePlus copied to clipboard

Postgres 10: not seeing any tables on the side

Open adamJLev opened this issue 3 years ago • 22 comments

Moving issue to the right project here, from the windows one: https://github.com/TablePlus/TablePlus-Windows/issues/61#issuecomment-717341421

  1. Which driver are you using and version of it (Ex: PostgreSQL 10.0): PostgreSQL 10.12 I havent tried other versions.

  2. Which TablePlus build number are you using (the number on the welcome screen, Ex: build 81): Version 3.10.0 (348)

  3. The steps to reproduce this issue:

  • Open connection to postgresql
  • No tables on the side
Screen Shot 2020-10-27 at 5 13 09 PM

By the way, when I run the query that I found on another ticket here that the maintainer suggested, I do see the right tables show up (I blurred them out of the screenshot, but they are there):

Screen_Shot_2020-10-27_at_5_07_56_PM

adamJLev avatar Oct 27 '20 16:10 adamJLev

Hi @adamJLev could you please run this query and let me know the result?

(SELECT table_name, table_schema, table_type FROM information_schema.tables) UNION (SELECT c.relname AS table_name, n.nspname AS table_schema, 'MATERIALIZED VIEW' FROM pg_catalog.pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'm');

Thank you!

huyphams avatar Oct 28 '20 13:10 huyphams

@huyphams yeah thats the same query you can see in my second screenshot above.

It returns all the tables in the database successfully, including all from the public schema - but the tables dont show up in the sidebar for some reason. any clue?

adamJLev avatar Oct 28 '20 15:10 adamJLev

Hmm, could you double-check if there is any extra whitespaces in the table_schema result of the query above? (double click the field to check)

huyphams avatar Oct 29 '20 02:10 huyphams

@huyphams No whitespaces or anything weird that I can see, only letters and underscores. I can send you the exact output privately if that helps in debugging, maybe by email? let me know

adamJLev avatar Oct 29 '20 09:10 adamJLev

Hi @adamJLev, check the user privileges.

I was having the same issue and figure it out by changing the user.

User with limited privileges to the selected database: Screen Shot 2020-12-10 at 12 37 36

User with all privileges to the selected database: Screen Shot 2020-12-10 at 12 38 53

In my case I changed the user, but you can try alter user privileges.

renatonitta avatar Dec 10 '20 15:12 renatonitta

Thanks @renatonitta I think that would work unfortunately I cant get more access on this db (company thing).

It does seem like a bug somewhere though, because the SQL query that @huyphams provided above does return all the tables as expected - but they dont show up on the panel for some reason.

adamJLev avatar Jan 13 '21 13:01 adamJLev

I am running into the same issue in Postgres12. My user privileges are CTc... I'm wondering if any of you were able to find a work around?

mirestrepo avatar May 20 '21 13:05 mirestrepo

Actually in my case \dt shows all the tables but

(SELECT table_name, table_schema, table_type FROM information_schema.tables WHERE table_schema = 'public') UNION (SELECT c.relname AS table_name, n.nspname AS table_schema, 'MATERIALIZED VIEW' FROM pg_catalog.pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'm');

does not....

mirestrepo avatar May 20 '21 14:05 mirestrepo

Been over a year, any plans on looking into this?

jakequade avatar Jun 21 '22 00:06 jakequade

yeah, I'm still having this issue...

adamJLev avatar Jun 21 '22 03:06 adamJLev

I think this is a permission issue, not really a TablePlus issue, however, in the upcoming review I have split this query (SELECT table_name, table_schema, table_type FROM information_schema.tables WHERE table_schema = 'public') UNION (SELECT c.relname AS table_name, n.nspname AS table_schema, 'MATERIALIZED VIEW' FROM pg_catalog.pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind = 'm');

Into two separated queries, so if the user only has read information_schema.tables permission, can load tables.

huyphams avatar Jun 21 '22 03:06 huyphams

that sounds like a great idea, thanks @huyphams !

adamJLev avatar Jun 21 '22 03:06 adamJLev

Facing the same issue... And while it could be some sort of permission issue, the tables show just fine in other database tools like DBeaver, so I believe there is definitely some work to be done on the tool side as well...

FelipeCO14 avatar Aug 19 '22 03:08 FelipeCO14

I agree with @FelipeCO14 and I am using Postgres 11.16 here

bpannes avatar Nov 11 '22 14:11 bpannes

Did you manage to make it work? @adamJLev

that sounds like a great idea, thanks @huyphams !

bpannes avatar Nov 11 '22 14:11 bpannes

It still does not work for me using latest version (5.1.0), even though its been a while and I assume @huyphams has gotten that proposed change in by now.

I still dont see any tables on the sidebar for some databases.

@huyphams Actually I just tested that query above and it does run successfuly, and I can see all my tables in there. but the sidebar is still empty, what gives?

adamJLev avatar Nov 14 '22 10:11 adamJLev

Have you tried to change the schema at the bottom of the left sidebar? @adamJLev

huyphams avatar Nov 14 '22 10:11 huyphams

@huyphams yes public schema. See attached

Notification_Center

adamJLev avatar Nov 14 '22 11:11 adamJLev

Same issue for me using Redshift.

keithharvey avatar Jan 04 '23 20:01 keithharvey

Same here !!!!!!

MouhamedMokkhtar avatar Mar 11 '24 11:03 MouhamedMokkhtar

Can you show me a screenshot @MouhamedMokkhtar ?

huyphams avatar Mar 11 '24 13:03 huyphams

Can you show me a screenshot @MouhamedMokkhtar ?

@huyphams Sorry, it wasn't an issue in my case. The user doesn't have all the necessary privileges to manage or modify the database that’s why the tables won't show up . In other database management tools, while you can see the tables you won't be able to perform any actions on them.

MouhamedMokkhtar avatar Mar 11 '24 14:03 MouhamedMokkhtar