Postgres: Restricting users ability to view schemas Postgres: Restricting users ability to view schemas postgresql postgresql

Postgres: Restricting users ability to view schemas


Yes. Use the command GRANT USAGE ON [schemaname] TO [username] or REVOKE USAGE ON [schemaname] FROM [username] to control access to the Schema itself.

You might need to do REVOKE USAGE ON [schemaname] FROM public to remove the default access permissions as well.

I suggest reviewing https://www.postgresql.org/docs/current/static/sql-grant.html for the full set of GRANT commands available as you may need to grant/revoke read/write access on some tables as well.