Re: createuser --memeber and PG 16 - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: createuser --memeber and PG 16
Date
Msg-id 20230515201149.GA2980625@nathanxps13
Whole thread Raw
In response to Re: createuser --memeber and PG 16  (Michael Paquier <michael@paquier.xyz>)
Responses Re: createuser --memeber and PG 16
List pgsql-hackers
On Mon, May 15, 2023 at 04:27:04PM +0900, Michael Paquier wrote:
> On Fri, May 12, 2023 at 04:35:34PM +0200, Peter Eisentraut wrote:
>> it's not intuitive whether foo becomes a member of bar or bar becomes a
>> member of foo.  Maybe something more verbose like --member-of would help?
> 
> Indeed, presented like that it could be confusing, and --member-of
> sounds like it could be a good idea instead of --member.

--member specifieѕ an existing role that will be given membership to the
new role (i.e., GRANT newrole TO existingrole).  IMO --member-of sounds
like the new role will be given membership to the specified existing role
(i.e., GRANT existingrole TO newrole).  IOW a command like

    createuser newrole --member-of existingrole

would make existingrole a "member of" newrole according to \du.  Perhaps
--role should be --member-of because it makes the new role a member of the
existing role.

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



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Upgrade of git.postgresql.org
Next
From: Andres Freund
Date:
Subject: Re: issue with meson builds on msys2