PGSQL: listing db/role and user/role relationships

From: Felipe Gasper <felipe(at)felipegasper(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PGSQL: listing db/role and user/role relationships
Date: 2013-11-16 00:19:19
Message-ID: 5286BA07.5030506@felipegasper.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-11-16 01:12:20 Re: Add COPY statement inside sql function AND/OR call function within function
Previous Message Merlin Moncure 2013-11-15 16:21:35 Re: Push predicate down in view containing window function