Re: psql: Add role's membership options to the \du+ command - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: psql: Add role's membership options to the \du+ command
Date
Msg-id CAKFQuwbfNWwd+KF88mA4vfkf2vR1fgCKJCasK0SXwyhsPACxCw@mail.gmail.com
Whole thread Raw
In response to Re: psql: Add role's membership options to the \du+ command  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Apr 4, 2023 at 9:13 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> I've marked this Ready for Committer.

Hmm ... not sure I like the proposed output.  The 'a', 'i', 's'
annotations are short but they don't have much else to recommend them.
On the other hand, there's nearby precedent for single-letter
abbreviations in ACL displays.  Nobody particularly likes those,
though.  Also, if we're modeling this on ACLs then the display
could be further shortened to "(ais)" or the like.

I am on board with removing the comma and space between the specifiers.  My particular issue with the condensed form is readability, especially the lowercase "i".  We aren't so desperate for horizontal space here that compaction seems particularly desirable.

Also, the patch is ignoring i18n issues.

Fair point.
  I suppose if we stick with
said single-letter abbreviations we'd not translate them,

Correct.  I don't see this being a huge issue - the abbreviations are the first letter of the various option "keywords" specified in the syntax.
 
but the
construction "rolename from rolename" ought to be translatable IMO.
Perhaps it'd be enough to allow replacement of "from", but I wonder
if the phrase order would need to be different in some languages?


Leveraging position and some optional symbols for readability, and sticking with the premise that abbreviations down to the first letter of the relevant syntax keyword is OK:

rolename [g: grantor_role] (ais)

I don't have any ideas regarding i18n concerns besides avoiding them by not using words...but I'd much prefer "from" and just hope the equivalent in other languages is just as understandable.

I'd rather have the above than go and fully try to emulate ACL presentation just to avoid i18n issues.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: psql: Add role's membership options to the \du+ command
Next
From: Robert Haas
Date:
Subject: Re: psql: Add role's membership options to the \du+ command