SHOW PRIVILEGES
SHOW PRIVILEGES
lists the privileges granted on all objects via
role-based access control (RBAC).
Syntax
Field | Use |
---|---|
object_name | Only shows privileges for a specific object type. |
role_name | Only shows privileges granted directly or indirectly to role_name. |
Examples
SHOW PRIVILEGES;
grantor | grantee | database | schema | name | object_type | privilege_type
-----------+-------------+-------------+--------+-------------+-------------+----------------
mz_system | PUBLIC | materialize | | public | schema | USAGE
mz_system | PUBLIC | | | default | 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 | | | default | cluster | CREATE
mz_system | materialize | | | default | 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 | | | default | cluster | CREATE
mz_system | materialize | | | default | 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