Querying#
- pg_grant.query.get_all_table_acls(conn: Connection | Session, schema: str | None = None) List[SchemaRelationInfo][source]#
Get privileges for all tables, views, materialized views, and foreign tables.
Specify schema to limit the results to that schema.
- Returns:
List of
SchemaRelationInfoobjects.
- pg_grant.query.get_table_acl(conn: Connection | Session, name: str, schema: str | None = None) SchemaRelationInfo[source]#
Get privileges for the table, view, materialized view, or foreign table specified by name.
If schema is not given, the table or view must be visible in the search path.
- Returns:
- pg_grant.query.get_all_column_acls(conn: Connection | Session, schema: str | None = None) List[ColumnInfo][source]#
Get privileges for all table, view, materialized view, and foreign table columns.
Specify schema to limit the results to that schema.
- Returns:
List of
ColumnInfoobjects.
- pg_grant.query.get_column_acls(conn: Connection | Session, table_name: str, schema: str | None = None) List[ColumnInfo][source]#
Get column privileges for the table, view, materialized view, or foreign table specified by name.
If schema is not given, the table or view must be visible in the search path.
- Returns:
List of
ColumnInfoobjects.
- pg_grant.query.get_all_sequence_acls(conn: Connection | Session, schema: str | None = None) List[SchemaRelationInfo][source]#
Unless schema is given, returns all sequences from all schemas.
- Returns:
List of
SchemaRelationInfoobjects.
- pg_grant.query.get_sequence_acl(conn: Connection | Session, sequence: str, schema: str | None = None) SchemaRelationInfo[source]#
If schema is not given, the sequence must be visible in the search path.
- Returns:
- pg_grant.query.get_all_function_acls(conn: Connection | Session, schema: str | None = None) List[FunctionInfo][source]#
Unless schema is given, returns all functions from all schemas.
- Returns:
List of
FunctionInfoobjects.
- pg_grant.query.get_function_acl(conn: Connection | Session, function_name: str, arg_types: List[str] | Tuple[str, ...], schema: str | None = None) FunctionInfo[source]#
If schema is not given, the function must be visible in the search path.
- Returns:
- pg_grant.query.get_all_language_acls(conn: Connection | Session) List[RelationInfo][source]#
- Returns:
List of
RelationInfoobjects.
- pg_grant.query.get_language_acl(conn: Connection | Session, language: str) RelationInfo[source]#
- Returns:
- pg_grant.query.get_all_schema_acls(conn: Connection | Session) List[RelationInfo][source]#
- Returns:
List of
RelationInfoobjects.
- pg_grant.query.get_schema_acl(conn: Connection | Session, schema: str) RelationInfo[source]#
- Returns:
- pg_grant.query.get_all_database_acls(conn: Connection | Session) List[RelationInfo][source]#
- Returns:
List of
RelationInfoobjects.
- pg_grant.query.get_database_acl(conn: Connection | Session, database: str) RelationInfo[source]#
- Returns:
- pg_grant.query.get_all_tablespace_acls(conn: Connection | Session) List[RelationInfo][source]#
- Returns:
List of
RelationInfoobjects.
- pg_grant.query.get_tablespace_acl(conn: Connection | Session, tablespace: str) RelationInfo[source]#
- Returns:
- pg_grant.query.get_all_type_acls(conn: Connection | Session, schema: str | None = None) List[SchemaRelationInfo][source]#
Unless schema is given, returns all types from all schemas.
- Returns:
List of
SchemaRelationInfoobjects.
- pg_grant.query.get_type_acl(conn: Connection | Session, type_name: str, schema: str | None = None) SchemaRelationInfo[source]#
If schema is not given, the type must be visible in the search path.
- Returns:
- pg_grant.query.get_all_parameter_acls(conn: Connection | Session) List[ParameterInfo][source]#
Return all parameters which have non-default ACLs.
- Returns:
List of
ParameterInfoobjects
- pg_grant.query.get_parameter_acl(conn: Connection | Session, parameter: str) ParameterInfo | None[source]#
Return information of the given parameter.
- Returns:
ParameterInfoif the parameter exists and has non-default privileges, otherwiseNone.