Re: Why is_admin_of_role() use ROLERECURSE_MEMBERS rather than ROLERECURSE_PRIVS?

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: cca5507 <cca5507@qq.com>, Robert Haas <robertmhaas@gmail.com>, preTham <prezza672@gmail.com>, Chao Li <li.evan.chao@gmail.com>, pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-05-06T18:56:35Z
Lists: 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