doc/user/content/sql/show-privileges.md
SHOW PRIVILEGES lists the privileges granted on all objects via
role-based access control (RBAC).
SHOW PRIVILEGES [ ON <object_type> ] [ FOR <role_name> ];
| Syntax element | Description |
|---|---|
| ON <object_type> | If specified, only show privileges for the specified object type. Accepted object types: <div style="display: flex;"> <ul style="margin-right: 20px;"> <li><strong>CLUSTERS</strong></li> <li><strong>CONNECTION</strong></li> <li><strong>DATABASES</strong></li> <li><strong>SCHEMAS</strong></li> </ul> <ul> <li><strong>SECRETS</strong></li> <li><strong>SYSTEM</strong></li> <li><strong>TABLES</strong></li> <li><strong>TYPES</strong></li> </ul> </div> |
| FOR <role_name> | If specified, only show privileges for the specified role. |
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