Skip to main content
The SHOW DEFAULT PRIVILEGES lists the for the objects created by in the current database.

Synopsis

show_default_privileges syntax diagram

Parameters

ParameterDescription
FOR ROLE name/FOR USER nameList the default privileges on objects created by a specific user/role, or a list of users/roles.
FOR GRANTEE nameShow the default privileges that user name received as a grantee. For more information, see Show default privileges for a grantee.
FOR ALL ROLESList the default privileges on objects created by any user/role.
If you do not specify a FOR... clause, CockroachDB returns the default privileges on objects created by the current user.

Required privileges

To show default privileges, the user/role must have any on the current database.

Examples

Show default privileges for objects created by the current user

Show default privileges for objects created by any user/role

Show default privileges for objects created by a specific user/role

Show default privileges for objects in a specific schema

Show default privileges for a grantee

To show the default that a user received as a grantee, issue the following statement:

See also