pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Joe Conway <mail@joeconway.com>
Cc: Joshua Brindle <joshua.brindle@crunchydata.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bossart, Nathan <bossartn@amazon.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH v2] use has_privs_for_role for predefined roles
Date: Wed, 9 Feb 2022 10:13:33 -0800
Message-ID: <20220209181333.GD1627503@nathanxps13> (raw)
In-Reply-To: <CA+TgmoYhx2KtBKX6Na-050RS5x5O_=arTzA96VmJd7=6hGBtag@mail.gmail.com>
References: <730520.1644168290@sss.pgh.pa.us>
	<CA+TgmoYeNB1PxMO-TYv4_Ky7XR3-3Le+fpL87T7QMR=OWc7U1Q@mail.gmail.com>
	<80af9ba7-ec24-9134-8fd9-00bf13f5c494@joeconway.com>
	<CA+TgmoY7Hy2iiJ6SKPKjG9w4D+KiPYtZoXB=PpX2oQkwcK5rUw@mail.gmail.com>
	<18eab9b6-1f77-72b2-83d3-1856c17f3fcb@joeconway.com>
	<CA+Tgmoa-czkhuLM6ZGKsTTxM56k4Ba2=_2Ai5Uo-u+PSkRVNww@mail.gmail.com>
	<CAGB+Vh5h29oiq=paMPoz_f8rAOhF0AFkAup6Wo2+td=JJ+8Brw@mail.gmail.com>
	<CA+TgmoaGoWYcPX-T0uAheAfrwcvnLUw8N2FsC7TvqQku-qvJUQ@mail.gmail.com>
	<0b1b6cfb-d752-28f6-7ccb-993998be0189@joeconway.com>
	<CA+TgmoYhx2KtBKX6Na-050RS5x5O_=arTzA96VmJd7=6hGBtag@mail.gmail.com>

On Tue, Feb 08, 2022 at 10:54:50PM -0500, Robert Haas wrote:
> 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.

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.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





view thread (42+ messages)  latest in thread

Message-ID: <20220209181333.GD1627503@nathanxps13>
Permalink:  ../20220209181333.GD1627503@nathanxps13/
Also on:    postgresql.org/message-id/20220209181333.GD1627503@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, robertmhaas@gmail.com, mail@joeconway.com, joshua.brindle@crunchydata.com, tgl@sss.pgh.pa.us, bossartn@amazon.com, sfrost@snowman.net
  Subject: Re: [PATCH v2] use has_privs_for_role for predefined roles
  In-Reply-To: <20220209181333.GD1627503@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox