Re: Role Permission issue - Mailing list pgsql-admin

From Erik Wienhold
Subject Re: Role Permission issue
Date
Msg-id 880018050.326226.1676027089991@office.mailbox.org
Whole thread Raw
In response to Role Permission issue  (Manmeet Singh <manmeetsdba@gmail.com>)
List pgsql-admin
> On 10/02/2023 09:14 CET Manmeet Singh <manmeetsdba@gmail.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



pgsql-admin by date:

Previous
From: Manmeet Singh
Date:
Subject: Role Permission issue
Next
From: JP Pozzi
Date:
Subject: Re: Proxy pgadmin connection issue