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

From Peter Eisentraut
Subject Re: createuser --memeber and PG 16
Date
Msg-id 62eb7c73-3c21-fa5a-09b8-a7971b67eb01@enterprisedb.com
Whole thread Raw
In response to Re: createuser --memeber and PG 16  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: createuser --memeber and PG 16
List 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.




pgsql-hackers by date:

Previous
From: Kirk Wolak
Date:
Subject: Re: Adding SHOW CREATE TABLE
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: Naming of gss_accept_deleg