Subject: Re: Q: GRANT ... WITH ADMIN on PG 17

From: "David G. Johnston" <[email-masked]>
Date: Thu, 21 Aug 2025 09:11:57 -0700

On Thursday, August 21, 2025, Karsten Hilbert <[email-masked]>
wrote:

> Am Thu, Aug 21, 2025 at 08:46:00AM -0700 schrieb Adrian Klaver:
>
> > >PG 17 documentation says that using "WITH ADMIN" allows the
> > >role being added to another group role to grant/revoke
> > >membership in said group to other roles.
> >
> > I would start by reading this:
> >
> > https://rhaas.blogspot.com/2023/01/surviving-without-
> superuser-coming-to.html
>
> 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 ?
>

A superuser can do this.  Otherwise, no.  In order to be made admin of a
role on must be a member of said role - i.e., “with admin” is only part of
the “grant” command.  You won’t find docs talking about alternatives
because they don’t exist.

David J.

---

From: Karsten Hilbert <[email-masked]>
Date: Thu, 21 Aug 2025 18:17:28 +0200

Am Thu, Aug 21, 2025 at 09:11:57AM -0700 schrieb David G. Johnston:

> role on must be a member of said role

Thanks, fine, that makes it clear to me.

Regards,
Karsten
-- 
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B