| From: | Erik Wienhold <ewie(at)ewie(dot)name> | 
|---|---|
| To: | Manmeet Singh <manmeetsdba(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Role Permission issue | 
| Date: | 2023-02-10 11:04:49 | 
| Message-ID: | 880018050.326226.1676027089991@office.mailbox.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-admin | 
> On 10/02/2023 09:14 CET Manmeet Singh <manmeetsdba(at)gmail(dot)com> wrote:
>
> We have created one role and assign the permission to that role for example:
> Select on all tables.
>
> Now i want to find out, what permissions we do have in this role..
The ACL is spread over multiple tables, depending on the object type:
https://www.postgresql.org/docs/15/ddl-priv.html#PRIVILEGES-SUMMARY-TABLE
You can search for specific roles using aclexplode and filtering on grantee:
	select relnamespace::regnamespace, relname, acl.*
	from pg_class, aclexplode(relacl) acl
	where acl.grantee = 'alice'::regrole
But you have to query each object type (pg_class, pg_proc, etc.) separately.
--
Erik
| From | Date | Subject | |
|---|---|---|---|
| Next Message | JP Pozzi | 2023-02-10 14:14:00 | Re: Proxy pgadmin connection issue | 
| Previous Message | Manmeet Singh | 2023-02-10 08:14:25 | Role Permission issue |