PGSQL: listing db/role and user/role relationships - Mailing list pgsql-general

From Felipe Gasper
Subject PGSQL: listing db/role and user/role relationships
Date
Msg-id 5286BA07.5030506@felipegasper.com
Whole thread Raw
Responses Re: PGSQL: listing db/role and user/role relationships
List pgsql-general
Hi all,

    How can I retrieve:


1) each role’s privileges on a given DB

For example, if I do: “GRANT ALL PRIVILEGES ON DATABASE thedb TO
therole”, how can I list this grant among others with access to “thedb”?


2) which users have access to a given role

For example, if I do: “GRANT therole TO theuser”, how can I list all of
the users that can take on “therole”?


3) which roles a given user can access

For example, if I do: “GRANT therole TO theuser”, how can I list all of
the roles that “theuser” can take on?


Thanks!


-Felipe Gasper
Houston, TX, USA


pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Push predicate down in view containing window function
Next
From: Gabriel Sánchez-Martínez
Date:
Subject: Re: Partitioned table question