Re: createuser --memeber and PG 16

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: createuser --memeber and PG 16
Date: 2023-05-21 06:00:15
Message-ID: 62eb7c73-3c21-fa5a-09b8-a7971b67eb01@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15.05.23 22:11, Nathan Bossart wrote:
> 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.

Yeah, that's exactly my confusion.

Maybe

createuser --with-members

and

createuser --member-of

would be clearer.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2023-05-21 06:46:04 Re: Naming of gss_accept_deleg
Previous Message Kirk Wolak 2023-05-21 05:58:53 Re: Adding SHOW CREATE TABLE