public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pavel Luzanov <[email protected]>
To: David G. Johnston <[email protected]>
To: Tom Lane <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: David Zhang <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: psql: Add role's membership options to the \du+ command
Date: Wed, 5 Apr 2023 10:42:19 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwY0CqZdZL3Wq6kM7WEQX+RfFYeNY6_ON_SCJ1vRRbrO=g@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAKFQuwbkywHVFPL6TrJiHFd0KgEvdH0LZTSFxAdK4wzP-u8m-A@mail.gmail.com>
	<[email protected]>
	<CAKFQuwY9DtC8B-eCpHe39yK+y9LardAyaEz0ccVa_pQ+xBgr2Q@mail.gmail.com>
	<[email protected]>
	<CAKFQuwb6u62n=eq2ZXq6mbVTpqWR2bz_QhmLjWrQ89Kcoi5x+g@mail.gmail.com>
	<CAKFQuwZTK7z=+rJkgbaZE=4H6FPxBJhbXBvKuR7e_vUXbPQEZw@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CA+TgmoatW6D_iyyCqbKcjS6MQt-fBTWzmynruk+x1B8oz22kog@mail.gmail.com>
	<[email protected]>
	<CA+TgmoZgj+zJ4C3To0f5=_M+ZJT2Yxa0pO_31Kr7KBhf8wXr6w@mail.gmail.com>
	<[email protected]>
	<CAKFQuwY0CqZdZL3Wq6kM7WEQX+RfFYeNY6_ON_SCJ1vRRbrO=g@mail.gmail.com>

On 04.04.2023 22:02, David G. Johnston wrote:
> On Tue, Apr 4, 2023 at 10:37 AM Tom Lane <[email protected]> wrote:
>
>     Robert Haas <[email protected]> writes:
>     > On Tue, Apr 4, 2023 at 1:12 PM Tom Lane <[email protected]> wrote:
>     >> I wonder if, while we're here, we should apply the idea of
>     >> joining-with-newlines-not-commas to the attributes column too.
>
>     > That would make the column narrower, which might be good, because it
>     > seems to me that listing the memberships could require quite a
>     lot of
>     > space, both vertical and horizontal.
>
>     Right, that's what I was thinking.
>
>
> So, by way of example:
>
> regress_du_role1 | cannot login | regress_du_role0 granted by 
> regress_du_admin with admin, inherit, set | Description for 
> regress_du_role1

Perhaps more closely to syntax?

regress_du_role0 with admin, inherit, set granted by regress_du_admin

instead of

regress_du_role0 granted by regress_du_admin with admin, inherit, set


> No translations, all words are either identical to syntax or identifiers.
>
> I'm on board with newlines in the attributes field.

+1

> The specific member of column changes are:
>
> from -> granted by
> ( ) -> "with"
> ais -> admin, inherit, set
>
> I'm good with any or all of those selections, either as-is or in the 
> more verbose form.

 From yesterday's discussion, I think two things are important:
- it is advisable to avoid translation,
- there is no sense in the abbreviation (a,i,s), if there are full names 
in the 'attributes' column.

So I agree with such changes and plan to implement them.

And one more question. (I think it's better to have it explicitly 
rejected than to keep silent.)

What if this long output will be available only for \du+, and for \du 
just show distinct (without duplicates)
roles in the current array format? For those, who don't care about these 
new membership options, nothing will change.
Those, who need details will use the + modifier.
?

-- 
Pavel Luzanov
Postgres Professional:https://postgrespro.com


view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: psql: Add role's membership options to the \du+ command
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox