Skip to main content
The information_schema.object_default_privileges view provides information about default privileges that are automatically applied to future objects created by specific roles. To access this information, you must have one of the following:
  • MANAGE GRANTS privilege
  • Be assigned with the default privileges shown in the view
  • Be an account administrator

Columns

Column nameData typeDescription
grantorTEXTThe role that granted the default privilege
granteeTEXTThe role that is assigned with the default privilege
object_nameTEXTName of the schema where the default privilege applies. May be NULL for account-wide defaults
object_typeTEXTThe type of object: ACCOUNT
privilege_typeTEXTThe privilege granted: USAGE, CREATE, or ALL
granted_onTEXTThe type of objects the default privilege is granted on: SCHEMAS
createdTIMESTAMPWhen the default privilege was created

Example

The following example shows how to query default privileges for a specific role:
SELECT 
  grantor,
  grantee,
  object_name,
  object_type,
  privilege_type,
  created
FROM information_schema.object_default_privileges
WHERE grantee = 'reader_role'
ORDER BY created DESC;
Returns:
grantorgranteeobject_nameobject_typeprivilege_typecreated
account_adminreader_roleNULLSCHEMAUSAGE2023-11-15 10:30:00
account_adminreader_roleanalyticsSCHEMACREATE2023-11-15 10:31:00

Usage notes

  • Default privileges apply to objects created after the ALTER DEFAULT PRIVILEGES command is executed. Existing objects are not affected.
  • Defaults are account-wide and apply to future schemas when databases (and their schemas) are created.
I