List user who have access to schema - Mailing list pgsql-general

From Suresh Raja
Subject List user who have access to schema
Date
Msg-id CAJP7dtAWGcS9qHFWnFZhyunheGHVnWU-3O=GetD9DNdpSCHqZQ@mail.gmail.com
Whole thread Raw
Responses Re: List user who have access to schema
Re: List user who have access to schema
Re: List user who have access to schema
List pgsql-general
Hi All:

I'm looking for query which can list all users who have access to a particular schema.  
The user may be granted role, which is turn may have access to the schema.
If the schema name is sch1,

grant select on table sch1.tab1 to role_ro;
grant ALL on table sch1.tab1 to role_rw;

grant  role_ro to user1;
grant  role_rw to user2;

I'm looking for report like


Schema          |     Role             |    Username
------------------------------------------------------------------------
sch1                role_ro                  user1, user3
                       role_rw                  user2, user4
                      
 
Thanks in advance,
-SR



pgsql-general by date:

Previous
From: rihad
Date:
Subject: Re: ERROR: found xmin 54230249 from before relfrozenxid 61349053
Next
From: Tom Lane
Date:
Subject: Re: List user who have access to schema