Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC

Andreas Joseph Krogh <andreas@visena.com>

From: Andreas Joseph Krogh <andreas@visena.com>
To: pgsql-general@lists.postgresql.org
Date: 2024-09-12T03:41:03Z
Lists: pgsql-general

Hei all.



Motivation: I have PowerBI users, with a separate ‘reporting’-role, accessing 
a database and I want to prevent them from listing all tables, users, databases 
and view-definitions (to not see the underlying query).



I'm evaluating this:
REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC; REVOKE SELECT ON 
ALL TABLES IN SCHEMA information_schema FROM PUBLIC;
Will this affect “normal behaviour”, ie. prevent the planner, or other 
internal mechanisms, from working properly for sessions logged in with the 
‘reporting’-role?



Thanks.






--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com>
 <https://www.visena.com>