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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: p(dot)luzanov(at)postgrespro(dot)ru
Cc: david(dot)g(dot)johnston(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, robertmhaas(at)gmail(dot)com, david(dot)zhang(at)highgo(dot)ca, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: psql: Add role's membership options to the \du+ command
Date: 2023-04-14 07:28:29
Message-ID: 20230414.162829.373160465721252149.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for joining in late..

At Thu, 13 Apr 2023 15:44:20 +0300, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru> wrote in
> After playing with the \du command, I found that we can't avoid
> translation.
> All attributes are translatable. Also, two of nine attributes shows in
> new line separated format (connection limit and password valid until).

Going a bit off-topic here, but I'd like the "infinity" to be
translatable...

As David-G appears to express concern in upthread, I don't think a
direct Japanese translation from "rolename from rolename" works well,
as the "from" needs accompanying verb. I, as a Japanese speaker, I
prefer a more non-sentence-like notation, similar to David's
suggestion but with slight differences:

"pg_read_all_stats (grantor: postgres, inherit, set)"

This is easily translated into Japanese.

"pg_read_all_stats (付与者: postgres、継承、設定)"

Come to think of this, I recalled a past discussion in which we
concluded that translating punctuation marks appearing between a
variable number of items within list expressions should be avoided...

Thus, I'd like to propose to use an ACL-like notation, which doesn't
need translation.

..| Mamber of |
..| pg_read_server_files=ais/horiguti,pg_execute_server_program=/postgres |

If we'd like, but not likely, we might want to provide a parallel
function to aclexplode for this notation.

=# select memberofexplode('pg_read_server_files=ais/horiguti,pg_execute_server_program=/postgres');
privilege | grantor | admin | inherit | set
---------------------------+----------+-------+---------+-------
pg_read_server_files | horiguti | true | true | true
pg_execute_server_programs | postgres | false | false | false

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2023-04-14 07:36:54 Re: Support logical replication of DDLs
Previous Message Peter Eisentraut 2023-04-14 07:20:41 Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode