Re: [PATCH v2] use has_privs_for_role for predefined roles

From: Joshua Brindle <joshua(dot)brindle(at)crunchydata(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH v2] use has_privs_for_role for predefined roles
Date: 2022-02-09 21:51:18
Message-ID: CAGB+Vh4Potn7UQhziej9a6SW=6RR0gPA0xx9GGbSmmbOp1=vOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 9, 2022 at 3:58 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Wed, Feb 9, 2022 at 1:13 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> > I do wonder if users find the differences between predefined roles and role
> > attributes confusing. INHERIT doesn't govern role attributes, but it will
> > govern predefined roles when this patch is applied. Maybe the role
> > attribute system should eventually be deprecated in favor of using
> > predefined roles for everything. Or perhaps the predefined roles should be
> > converted to role attributes.
>
> I couldn't agree more. Apparently it's even confusing to developers,
> because otherwise (1) we wouldn't have the problem the patch proposes
> to fix in the first place and (2) I would have immediately been
> convinced of the value of the patch once it showed up. Since those
> things didn't happen, this is apparently confusing to (1) whoever
> wrote the code that this patch fixes and (2) me.
>

My original patch removed is_member_of to address #1 above, but that
was rejected[1]. There is now a warning in the header beside it to
hopefully dissuade improper usage going forward.

1. https://www.postgresql.org/message-id/254275.1635357633%40sss.pgh.pa.us

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-09 22:00:04 wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:
Previous Message Robert Haas 2022-02-09 21:40:59 Re: decoupling table and index vacuum