Re: List user who have access to schema

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Suresh Raja <suresh(dot)rajaabc(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: List user who have access to schema
Date: 2018-08-02 17:58:37
Message-ID: 30052.1533232717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Suresh Raja <suresh(dot)rajaabc(at)gmail(dot)com> writes:
> I'm looking for query which can list all users who have access to a
> particular schema.

Something involving

SELECT ... FROM pg_user
WHERE has_schema_privilege(usename, 'schema-of-interest', 'usage');

would probably be what you want.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Suresh Raja 2018-08-02 18:23:48 Re: List user who have access to schema
Previous Message Suresh Raja 2018-08-02 17:49:00 List user who have access to schema

Browse pgsql-sql by date

  From Date Subject
Next Message Suresh Raja 2018-08-02 18:23:48 Re: List user who have access to schema
Previous Message Suresh Raja 2018-08-02 17:49:00 List user who have access to schema