SHOW DEFAULT PRIVILEGES

SHOW DEFAULT PRIVILEGES lists the default privileges granted on objects in Materialize.

Syntax

SHOW DEFAULT PRIVILEGES [ON <object_type>] [FOR <role_name>]
Option Description
ON <object_type> If specified, only show default privileges for the specified object type. Accepted object types:
  • CLUSTERS
  • CONNECTION
  • DATABASES
  • SCHEMAS
  • SECRETS
  • TABLES
  • TYPES
FOR <role_name> If specified, only show default privileges granted directly or indirectly to the specified role. For available role names, see SHOW ROLES.

Examples

SHOW DEFAULT PRIVILEGES;
 object_owner | database | schema | object_type | grantee | privilege_type
--------------+----------+--------+-------------+---------+----------------
 PUBLIC       |          |        | cluster     | interns | USAGE
 PUBLIC       |          |        | schema      | mike    | CREATE
 PUBLIC       |          |        | type        | PUBLIC  | USAGE
 mike         |          |        | table       | joe     | SELECT
SHOW DEFAULT PRIVILEGES ON SCHEMAS;
 object_owner | database | schema | object_type | grantee | privilege_type
--------------+----------+--------+-------------+---------+----------------
 PUBLIC       |          |        | schema      | mike    | CREATE
SHOW DEFAULT PRIVILEGES FOR joe;
 object_owner | database | schema | object_type | grantee | privilege_type
--------------+----------+--------+-------------+---------+----------------
 PUBLIC       |          |        | cluster     | interns | USAGE
 PUBLIC       |          |        | type        | PUBLIC  | USAGE
 mike         |          |        | table       | joe     | SELECT
Back to top ↑