Re: Q: GRANT ... WITH ADMIN on PG 17 - Mailing list pgsql-general

From Dominique Devienne
Subject Re: Q: GRANT ... WITH ADMIN on PG 17
Date
Msg-id CAFCRh-__JJ8uOL=GPzuZ8khC6rg2Q7+SxOe6YcyBVSfv25RmRQ@mail.gmail.com
Whole thread Raw
In response to Re: Q: GRANT ... WITH ADMIN on PG 17  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
On Thu, Aug 21, 2025 at 6:37 PM Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
> Am Thu, Aug 21, 2025 at 06:29:36PM +0200 schrieb Dominique Devienne:
> > > Thanks, I did, but did not find the answer to: Is there a
> > > way for a role that can manage membership in a group role to
> > > not itself be a member of that group role ?
> >
> > Yes and no. Depends what you mean by MEMBER...
> ...
> > So I didn't spend time studying your specific use case. That's your job :).
> > But given my painful experience of the past year, I'd answer yes to your
> > question, on logical grounds. If you see what I mean. --DD
>
> I followed your posts back then when you worked out your use
> case so I did have _some_ idea where to look ;-)

Glad it helped someone, maybe.

> I just wanted to confirm my understanding in relation to my
> current usage. David kindly provided the needed affirmation.

Well, I disagree with David that you're a MEMBER with just ADMIN.
pg_has_role(..., 'MEMBER') says yes. But pg_has_role(..., 'SET') says no.
If you can't endorse the role's privileges, you're not a member in my book.
That was kinda my point. --DD



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Q: GRANT ... WITH ADMIN on PG 17
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug