SHOW PRIVILEGES
SHOW PRIVILEGES lists the privileges granted on all objects via
role-based access control (RBAC).
Syntax
SHOW PRIVILEGES [ ON <object_type> ] [ FOR <role_name> ]
| Option | Description |
|---|---|
| ON <object_type> | If specified, only show privileges for the specified object type. Accepted object types:
|
| FOR <role_name> | If specified, only show privileges for the specified role. |
Examples
SHOW PRIVILEGES;
grantor | grantee | database | schema | name | object_type | privilege_type
-----------+-------------+-------------+--------+-------------+-------------+----------------
mz_system | PUBLIC | materialize | | public | schema | USAGE
mz_system | PUBLIC | | | quickstart | cluster | USAGE
mz_system | PUBLIC | | | materialize | database | USAGE
mz_system | materialize | materialize | | public | schema | CREATE
mz_system | materialize | materialize | | public | schema | USAGE
mz_system | materialize | | | quickstart | cluster | CREATE
mz_system | materialize | | | quickstart | cluster | USAGE
mz_system | materialize | | | materialize | database | CREATE
mz_system | materialize | | | materialize | database | USAGE
mz_system | materialize | | | | system | CREATECLUSTER
mz_system | materialize | | | | system | CREATEDB
mz_system | materialize | | | | system | CREATEROLE
SHOW PRIVILEGES ON SCHEMAS;
grantor | grantee | database | schema | name | object_type | privilege_type
-----------+-------------+-------------+--------+--------+-------------+----------------
mz_system | PUBLIC | materialize | | public | schema | USAGE
mz_system | materialize | materialize | | public | schema | CREATE
mz_system | materialize | materialize | | public | schema | USAGE
SHOW PRIVILEGES FOR materialize;
grantor | grantee | database | schema | name | object_type | privilege_type
-----------+-------------+-------------+--------+-------------+-------------+----------------
mz_system | materialize | materialize | | public | schema | CREATE
mz_system | materialize | materialize | | public | schema | USAGE
mz_system | materialize | | | quickstart | cluster | CREATE
mz_system | materialize | | | quickstart | cluster | USAGE
mz_system | materialize | | | materialize | database | CREATE
mz_system | materialize | | | materialize | database | USAGE
mz_system | materialize | | | | system | CREATECLUSTER
mz_system | materialize | | | | system | CREATEDB
mz_system | materialize | | | | system | CREATEROLE