|
REVOKENameREVOKE — Revokes access privilege from a user, a group or all users.REVOKE privilege [, ...] ON object [, ...] FROM { PUBLIC | GROUP groupname | username } Inputs
Outputs
DescriptionREVOKE allows creator of an object to revoke permissions granted before, from all users (via PUBLIC) or a certain user or group. NotesRefer to psql \z command for further information about permissions on existing objects: Database = lusitania +------------------+---------------------------------------------+ | Relation | Grant/Revoke Permissions | +------------------+---------------------------------------------+ | mytable | {"=rw","miriam=arwR","group todos=rw"} | +------------------+---------------------------------------------+ Legend: uname=arwR -- privileges granted to a user group gname=arwR -- privileges granted to a GROUP =arwR -- privileges granted to PUBLIC r -- SELECT w -- UPDATE/DELETE a -- INSERT R -- RULE arwR -- ALL
UsageRevoke insert privilege from all users on table films: REVOKE INSERT ON films FROM PUBLIC; Revoke all privileges from user manuel on view kinds: REVOKE ALL ON kinds FROM manuel; CompatibilitySQL92The SQL92 syntax for REVOKE has additional capabilities for rescinding privileges, including those on individual columns in tables:
The possible objects are:
If user1 gives a privilege WITH GRANT OPTION to user2, and user2 gives it to user3 then user1 can revoke this privilege in cascade using the CASCADE keyword. If user1 gives a privilege WITH GRANT OPTION to user2, and user2 gives it to user3 then if user1 try revoke this privilege it fails if he/she specify the RESTRICT keyword. |
||||||||||||||||||||||
With any suggestions or questions please feel free to contact us |