Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 724 Bytes

revoke-privileges-from-a-user-or-role.md

File metadata and controls

27 lines (17 loc) · 724 Bytes

Revoke Privileges From A User Or Role

Category: Postgres

This TIL shows how to revoke privileges from a user or role.

Revoke privileges from a user

Revoke use of the default schema public for the user orbiks_dbusr:

REVOKE USAGE ON SCHEMA public FROM orbiks_dbusr;

Revoke all permissions on a set of tables for the user orbiks_dbusr:

REVOKE ALL ON orders, events, alerts IN SCHEMA public FROM orbiks_dbusr;

Revoke specific permissions on a set of tables for the user orbiks_dbusr:

REVOKE DELETE, UPDATE ON orders, events, alerts IN SCHEMA public FROM orbiks_dbusr;

See PostgreSQL REVOKE for more details.