Re: PGSQL: listing db/role and user/role relationships

From: Luca Ferrari <fluca1978(at)infinito(dot)it>
To: Felipe Gasper <felipe(at)felipegasper(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: PGSQL: listing db/role and user/role relationships
Date: 2013-11-17 08:56:58
Message-ID: CAKoxK+56cdPME_ofQvMX0_xqGch=ysqMxF9voG7W9xmHvptXzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Nov 16, 2013 at 1:19 AM, Felipe Gasper <felipe(at)felipegasper(dot)com> wrote:
> Hi all,
>
> How can I retrieve:
>
>
> 1) each role’s privileges on a given DB
>

Do you mean pg_database.datacl?
http://www.postgresql.org/docs/current/static/catalog-pg-database.html

> 2) which users have access to a given role
> 3) which roles a given user can access

I guess playing with pg_roles and pg_auth_member will provide you all
the information.

Hope this helps.
Luca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message oka 2013-11-17 10:53:32 N prefix and ::bpchar
Previous Message Raymond O'Donnell 2013-11-16 16:39:33 Re: Visibility of table aliases in CTEs