public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Pavel Luzanov <[email protected]>
Cc: Jonathan S. Katz <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: David Zhang <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: psql: Add role's membership options to the \du+ command
Date: Thu, 15 Jun 2023 11:47:56 -0700
Message-ID: <CAKFQuwa7EDaN6wzK4TSym8KrN3oSXJmYNEDyWNGRd5qw1pyUFQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[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>
	<[email protected]>
	<[email protected]>
	<CAKFQuwanYpV_0quPhRMpVoyUew4-4to0u1E0uXMNY4=ODPZHWQ@mail.gmail.com>
	<[email protected]>
	<CAKFQuwZXQP7ox0jsa+AqKa-4MkTpd2VypJm9dkXsk+6wKEQ2Gg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAKFQuwZiomZFLd5zK=feCjY7Weefvce1MR+k38wyBMbaP2ASsg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>

Robert - can you please comment on what you are willing to commit in order
to close out your open item here.  My take is that the design for this, the
tabular form a couple of emails ago (copied here), is ready-to-commit, just
needing the actual (trivial) code changes to be made to accomplish it.

Tabular form

     rolname      |     memberof     |       options       |
grantor      ------------------+------------------+---------------------+------------------
postgres         |                  |                     |
regress_du_admin | regress_du_role0+| admin, inherit, set+| postgres
     +                  | regress_du_role1+| admin, inherit, set+|
postgres        +                  | regress_du_role2 | admin,
inherit, set | postgres regress_du_role0 |                  |
           |  regress_du_role1 | regress_du_role0+| admin, inherit,
set+| regress_du_admin+                  | regress_du_role0+| inherit
          +| regress_du_role1+                  | regress_du_role0 |
set                 | regress_du_role2 regress_du_role2 |
regress_du_role0+| admin              +| regress_du_admin+
     | regress_du_role0+| inherit, set       +| regress_du_role1+
            | regress_du_role0+| empty              +|
regress_du_role2+                  | regress_du_role1 | admin, set
     | regress_du_admin(5 rows)


On Thu, May 18, 2023 at 6:07 AM Pavel Luzanov <[email protected]>
wrote:

> On 18.05.2023 05:42, Jonathan S. Katz wrote:
>
> That said, from a readability standpoint, it was easier for me to follow
> the tabular form vs. the sentence form.
>
> May be possible to reach a agreement on the sentence form. Similar descriptions used
> for referential constraints in the \d command:
>
> I think we should consider the tabular form with translatable headers to
be the acceptable choice here.  I don't see enough value in the sentence
form to make it worth trying to overcome the i18n objection there.

> As for tabular form it looks more natural to have a separate psql command
> for pg_auth_members system catalog. Something based on this query:But is it worth inventing a new psql command for this?
>
>
IMO, no.  I'd much rather read "admin, inherit, set" than deal with
true/false in columns.  I think the newlines are better compared to
repetition of the rolname as well.

I'm also strongly in favor of explicitly writing out the word "empty"
instead of leaving the column blank for the case that no options are marked
true.  But it isn't a show-stopper for me.

David J.


view thread (15+ 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], [email protected], [email protected], [email protected]
  Subject: Re: psql: Add role's membership options to the \du+ command
  In-Reply-To: <CAKFQuwa7EDaN6wzK4TSym8KrN3oSXJmYNEDyWNGRd5qw1pyUFQ@mail.gmail.com>

* 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