Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS? - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS?
Date
Msg-id CAOYmi+kKVPKXcR3WRswu1JES6pte92THaE-2CQG=_fhmf9RZ0w@mail.gmail.com
Whole thread
In response to Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS?  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS?
List pgsql-hackers
On Wed, May 6, 2026 at 9:48 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
> I don't have any better ideas for how to solve it, but I also fear for the
> day when I have to explain these subtle differences in behavior to a casual
> user...

(spitballing)

Would it help to name the functions according to what they intend to
let the caller do? is_admin_of_role() -> can_administer_role();
inherits_admin_privs_of_role() -> is_administering_role()?

Alternatively, we have the is_member_* vs has_privs_* division
already, so has_admin_privs_over_role(), or something?

--Jacob



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Randomize B-Tree page split location to avoid oscillating patterns
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: [PATCH] pg_surgery: Fix WAL corruption from concurrent heap_force_kill