show-default-privileges.md 2.4 KB


title: "SHOW DEFAULT PRIVILEGES" description: "SHOW DEFAULT PRIVILEGES lists the default privileges granted on objects in Materialize." menu: main:

parent: 'commands'

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

Syntax

SHOW DEFAULT PRIVILEGES [ON <object_type>] [FOR <role_name>]

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

Related pages

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