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

Поиск
Список
Период
Сортировка
От Jonathan S. Katz
Тема Re: psql: Add role's membership options to the \du+ command
Дата
Msg-id 6b64c59a-fe41-bb07-d0cd-856896412b00@postgresql.org
обсуждение исходный текст
Ответ на 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  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
Список pgsql-hackers
On 5/7/23 3:14 PM, Pavel Luzanov wrote:
> On 05.05.2023 19:51, David G. Johnston wrote:
>> 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.
> 
> Just to visualize this approach. Below are the output for the tabular 
> form and the sentence form from last patch version (sql script attached):
> 
> 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)Sentence form from patch v7     rolname     
|                          memberof
------------------+-------------------------------------------------------------- postgres        |  regress_du_admin |
regress_du_role0from postgres (admin, inherit, set)        +                  | regress_du_role1 from postgres (admin,
inherit,set)        +                  | regress_du_role2 from postgres (admin, inherit, set) regress_du_role0 |
 regress_du_role1| regress_du_role0 from regress_du_admin (admin, inherit, set)+                  | regress_du_role0
fromregress_du_role1 (inherit)            +                  | regress_du_role0 from regress_du_role2
(set) regress_du_role2| regress_du_role0 from regress_du_admin (admin)              +                  |
regress_du_role0from regress_du_role1 (inherit, set)       +                  | regress_du_role0 from regress_du_role2
(empty)             +                  | regress_du_role1 from regress_du_admin (admin, set)(5 rows)  
 
> 
> The tabular form solves the latest patch translation problems mentioned by Kyotaro.
> But it requires mapping elements between 3 array-like columns.
> 
> To move forward, needs more opinions?

[RMT Hat]

Nudging this along, as it's an open item. It'd be good to get this 
resolved before Beta 1, but that may be tough at this point.

[Personal hat]

I'm probably not the target user for this feature, so I'm not sure how 
much you should weigh my opinion (e.g. I still don't agree with 
explicitly showing "empty", but as mentioned, I'm not the target user).

That said, from a readability standpoint, it was easier for me to follow 
the tabular form vs. the sentence form.

Thanks,

Jonathan


Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: issue with meson builds on msys2
Следующее
От: reid.thompson@crunchydata.com
Дата:
Сообщение: Re: Add the ability to limit the amount of memory that can be allocated to backends.