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 CAKFQuwZiomZFLd5zK=feCjY7Weefvce1MR+k38wyBMbaP2ASsg@mail.gmail.com
Whole thread Raw
In response to Re: psql: Add role's membership options to the \du+ command  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Responses Re: psql: Add role's membership options to the \du+ command
List pgsql-hackers
On Wed, May 3, 2023 at 9:30 AM Jonathan S. Katz <jkatz@postgresql.org> wrote:
[Personal hat]

Looking at Pavel's latest patch, I do find the output easy to
understand, though do we need to explicitly list "empty" if there are no
membership permissions?


Yes.  I dislike having the equivalent of null embedded within the output here.  I would rather label it for what it is.  As a membership without any attributes has no real purpose I don't see how the choice matters and at least empty both stands out visually and can be grepped.

The SQL language uses the words "by" and "from" in its syntax; I'm against avoiding them in our presentation here without a clearly superior alternative that doesn't require a majority of people to have to translate the symbol " / " back into the word " by " in order to read the output.

But if it is really a blocker then maybe we should produce 3 separate newline separated columns, one for the member of role, one for the list of attributes, and one with the grantor.  The column headers can be translated more easily as single nouns.  The readability quite probably would end up being equivalent (maybe even better) in tabular form instead of sentence form.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: First draft of back-branch release notes is done
Next
From: MARK CALLAGHAN
Date:
Subject: benchmark results comparing versions 15.2 and 16