Re: pg_has_role's handling of ADMIN OPTION is pretty weird

2022-08-26 Thread Robert Haas
On Fri, Aug 26, 2022 at 11:55 AM Robert Haas wrote: > According to pg_has_role, it's possible to have USAGE WITH ADMIN > OPTION on a role without having USAGE: One more thing about this. The documentation about how this function actually works seems never to have been very good, and I think it's

pg_has_role's handling of ADMIN OPTION is pretty weird

2022-08-26 Thread Robert Haas
According to pg_has_role, it's possible to have USAGE WITH ADMIN OPTION on a role without having USAGE: template1=# create role foo; CREATE ROLE template1=# create role admin; CREATE ROLE template1=# grant foo to admin with inherit false, admin true; GRANT ROLE template1=# select p.priv, pg_has_ro