Skip to main content
The SHOW SYSTEM GRANTS lists the to .

Syntax

Use the following syntax to show the granted to users:
SHOW SYSTEM GRANTS [FOR <users...>]

Parameters

ParameterDescription
usersThe , or comma-separated list of users, whose system privileges you want to show.

Response

Privilege grants

The SHOW SYSTEM GRANTS statement returns the following fields:
FieldDescription
granteeThe name of the user.
privilege_typeThe name of the granted to the user.
is_grantablet (true) if the user has the grant option on the object; f (false) if not.

Required privileges

  • No are required to use SHOW SYSTEM GRANTS.

Examples

Show all system grants

To list all system grants for all users and roles:
> SHOW SYSTEM GRANTS;
  grantee |    privilege_type    | is_grantable
----------+----------------------+---------------
  max     | VIEWACTIVITY         |      t
  max     | VIEWCLUSTERMETADATA  |      t
  max     | VIEWDEBUG            |      t
  alice   | VIEWACTIVITYREDACTED |      f
  alice   | NOSQLLOGIN           |      f
(5 rows)

Show a specific user or role’s grants

To list all system grants for a specific user or role:
> CREATE USER max;
> GRANT SYSTEM ALL TO max WITH GRANT OPTION;
> SHOW SYSTEM GRANTS FOR max;
  grantee | privilege_type | is_grantable
----------+----------------+---------------
  max     | ALL            |      t
(1 row)

See also