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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: psql: Add role's membership options to the \du+ command
Дата
Msg-id CAKFQuwa7EDaN6wzK4TSym8KrN3oSXJmYNEDyWNGRd5qw1pyUFQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: Add role's membership options to the \du+ command  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
Ответы Re: psql: Add role's membership options to the \du+ command  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Список pgsql-hackers
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 <p.luzanov@postgrespro.ru> 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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Non-superuser subscription owners
Следующее
От: Joe Conway
Дата:
Сообщение: Re: [17] collation provider "builtin"