Module pglift.privileges exposes the following API to manipulate access privileges:

async pglift.privileges.get(instance: PostgreSQLInstance, *, databases: Sequence[str] = (), roles: Sequence[str] = (), defaults: bool = False) list[DefaultPrivilege] | list[Privilege]

List access privileges for databases of an instance.

  • databases – list of databases to inspect (all will be inspected if unspecified).

  • roles – list of roles to restrict inspection on.

  • defaults – if True, get default privileges.


ValueError – if an element of databases or roles does not exist.