Greetings,
To prevent a user or role from selecting data from certain system tables in PostgreSQL, you can revoke the default select permissions on those tables. Here’s how you can do it:
- Revoke SELECT permission on the system tables from the public role.
- Grant SELECT permission only to specific roles that need it.
Here’s a step-by-step guide on how to achieve this:
Salahuddin.
On Fri, 24 May 2024, 20:52 Andreas Joseph Krogh, <andreas@xxxxxxxxxx> wrote:
Hi, is there a way to prevent a user/role from SELECT-ing from certain system-tables?
I'd like the contents of pg_{user,roles,database} to not be visible to all users.
Thanks.
--Andreas Joseph KroghCTO / Partner - Visena ASMobile: +47 909 56 963