Re: [PATCH v2] use has_privs_for_role for predefined roles - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH v2] use has_privs_for_role for predefined roles
Date
Msg-id CA+TgmoYhx2KtBKX6Na-050RS5x5O_=arTzA96VmJd7=6hGBtag@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH v2] use has_privs_for_role for predefined roles  (Joe Conway <mail@joeconway.com>)
Responses Re: [PATCH v2] use has_privs_for_role for predefined roles  (Nathan Bossart <nathandbossart@gmail.com>)
List pgsql-hackers
On Tue, Feb 8, 2022 at 7:38 PM Joe Conway <mail@joeconway.com> wrote:
> If we were to start all over again with this feature my vote would be to
> do things differently than we have done. I would not have called them
> predefined roles, and I would have used attributes of roles (e.g. make
> rolsuper into a bitmap rather than a boolean) rather than role
> membership to implement them. But I didn't find time to participate in
> the original discussion or review/write the code, so I have little room
> to complain.

Yep, fair. I kind of like the predefined role concept myself. I find
it sort of elegant, mostly because I think it scales better than a
bitmask, which can run out of bits surprisingly rapidly. But opinions
can vary, of course.

> However since we did call these things predefined roles, and used role
> membership to implement them, I think they ought to behave both
> self-consistently as a group, and like other real roles.
>
> That is what this patch does unless I am missing something.

Yes, I see that.

> I guess an alternative is to discuss a "proper fix", but it seems to me
> that would be a version 16 thing given how late we are in this
> development cycle and how invasive it is likely to be. And doing nothing
> for pg15 is not a very satisfying proposition :-/

True. The fact that we don't have consistency among existing
predefined roles is IMHO the best argument for this patch. That surely
can't be right.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: [PATCH] Add min() and max() aggregate functions for xid8
Next
From: Robert Haas
Date:
Subject: Re: make MaxBackends available in _PG_init