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: Robert Haas <robertmhaas(at)gmail(dot)com>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, 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 19:02:25
Message-ID: CAKFQuwY0CqZdZL3Wq6kM7WEQX+RfFYeNY6_ON_SCJ1vRRbrO=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Tue, Apr 4, 2023 at 1:12 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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

~140 character width with description

No translations, all words are either identical to syntax or identifiers.

I'm on board with newlines in the attributes field.

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.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2023-04-04 19:11:46 Re: proposal: psql: show current user in prompt
Previous Message Robert Haas 2023-04-04 18:55:36 Re: Minimal logical decoding on standbys