I want to disable users from seeing the names of tables that he doesn't have access to. So the goal is to have several tables and several users that can make \dt and see only tables they have access to in single database. I tried accomplish this with
REVOKE ALL ON ALL TABLES IN SCHEMA pg_catalog FROM public, my_user; CREATE SCHEMA my_schema; GRANT ALL ON SCHEMA my_schema TO my_user; GRANT ALL ON ALL TABLES IN SCHEMA my_schema TO my_user; GRANT USAGE ON SCHEMA my_schema TO my_user;
And after creating table in my_schema my_user can access it and work with but can't list tables in this schema. Is there a better or another solution?