INHERITED_PRIVILEGES

Provides summary information about privileges inherited by objects from GRANT statements on parent schemas, excluding inherited grant options.

Provides summary information about privileges inherited by objects from GRANT statements on parent schemas, excluding inherited grant options.

For information about explicitly granted permissions, see system table GRANTS.

Column Name Data Type Description
OBJECT_ID INTEGER Catalog-assigned integer value that uniquely identifies theobject inheriting the privileges.
SCHEMA_ID INTEGER Catalog-assigned integer value that uniquely identifies theparent schema.
OBJECT_SCHEMA VARCHAR Name of the parent schema of a table or view.
OBJECT_NAME VARCHAR Name of the table or view.
OBJECT_TYPE VARCHAR

The object type, one of the following:

  • Table

  • View

  • Model

PRIVILEGES_DESCRIPTION VARCHAR Lists the privileges inherited on an object. An asterisk (*) appended to a privilege indicates that the user can grant the privilege to other users by granting the privilege on the parent schema.
PRINCIPAL VARCHAR Name of the role or user inheriting the privileges in the row.
PRINCIPAL_ID INTEGER Catalog-assigned integer value that uniquely identifies theuser inheriting the privileges.
GRANTOR VARCHAR User that granted the privileges on the parent schema to the principal.
GRANTOR_ID INTEGER Catalog-assigned integer value that uniquely identifies theuser who performed the grant operation.
GRANT_ID INTEGER Catalog-assigned integer value that uniquely identifies thegrant operation.

Examples

The following query returns the privileges that the tables and views inherit from their parent schema, customers.

=> SELECT object_schema,object_name,object_type,privileges_description,principal,grantor FROM inherited_privileges WHERE object_schema='customers';
 object_schema |  object_name    | object_type |                          privileges_description                           | principal | grantor
 --------------+-----------------+-------------+---------------------------------------------------------------------------+-----------+---------
 customers     | cust_info       | Table       | INSERT, SELECT, UPDATE, DELETE, ALTER, REFERENCES, DROP, TRUNCATE         | dbadmin   | dbadmin
 customers     | shipping_info   | Table       | INSERT, SELECT, UPDATE, DELETE, ALTER, REFERENCES, DROP, TRUNCATE         | dbadmin   | dbadmin
 customers     | cust_set        | View        | SELECT, ALTER, DROP                                                       | dbadmin   | dbadmin
 customers     | cust_info       | Table       | SELECT                                                                    | Val       | dbadmin
 customers     | shipping_info   | Table       | SELECT                                                                    | Val       | dbadmin
 customers     | cust_set        | View        | SELECT                                                                    | Val       | dbadmin
 customers     | sales_model     | Model       | USAGE, ALTER, DROP                                                        | Pooja     | dbadmin
 customers     | shipping_info   | Table       | INSERT                                                                    | Pooja     | dbadmin
 (8 rows)

See also