0

I am trying to create a view for the prod table for a client where he must only have access to views.

I was able to restrict the user to have access to views and not to the table. But in postgres there is a concept of system catalog, where there are some metadata stored which I don't want to give access to the user.

I found the command to restrict pg_catalog tables by REVOKE select ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC;

My our DB is in AWS RDS and I cant run this query, as the user must be superuser to run this.

I have tried below as well, but they did not work.
REVOKE ALL PRIVILEGES ON SCHEMA pg_catalog FROM user;

REVOKE ALL PRIVILEGES on table pg_roles FROM PUBLIC;

Ebenezar John Paul
  • 1,570
  • 5
  • 20
  • 41
Logan
  • 11
  • 3
  • Read my comments here [Privileges](https://stackoverflow.com/questions/76908068/why-am-i-still-able-to-execute-a-function-despite-getting-the-warning-no-privile#comment135593107_76908068). AWS/RDS does not give you the privileges to do this. In other words this is not possible. – Adrian Klaver Aug 21 '23 at 15:02

0 Answers0