Re: psql: Add role's membership options to the \du+ command

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, David Zhang <david(dot)zhang(at)highgo(dot)ca>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql: Add role's membership options to the \du+ command
Date: 2023-04-04 16:38:04
Message-ID: CAKFQuwbfNWwd+KF88mA4vfkf2vR1fgCKJCasK0SXwyhsPACxCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 4, 2023 at 9:13 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> "David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-04-04 16:39:43 Re: psql: Add role's membership options to the \du+ command
Previous Message Tom Lane 2023-04-04 16:13:10 Re: psql: Add role's membership options to the \du+ command