REVOKE
Attention
This page documents an earlier version. Go to the latest (v2.3) version.Synopsis
Use the REVOKE
statement to remove access privileges.
Syntax
revoke ::= REVOKE privileges ON privilege_target FROM name [ , ... ]
[ CASCADE | RESTRICT ]
revoke
Semantics
Not all REVOKE
options are supported yet in YSQL, but the following REVOKE
option is supported.
REVOKE ALL ON DATABASE name FROM name;
For the list of possible privileges or privilege_target settings, see GRANT
in the PostgreSQL documentation.
REVOKE
Remove privileges on a database object or a membership in a role.
privileges
Specify the privileges.
ALL
Specify all of the available privileges.
privilege_target
name
Specify the name of the role.
CASCADE
RESTRICT
Examples
- Remove John's privileges from the
postgres
database.
postgres=# REVOKE ALL ON DATABASE postgres FROM John;