pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: david.g.johnston@gmail.com
Cc: tgl@sss.pgh.pa.us
Cc: robertmhaas@gmail.com
Cc: david.zhang@highgo.ca
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: psql: Add role's membership options to the \du+ command
Date: Sat, 15 Apr 2023 16:16:26 +0300
Message-ID: <e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru> (raw)
In-Reply-To: <20230414.162829.373160465721252149.horikyota.ntt@gmail.com>
References: <1831161.1680703111@sss.pgh.pa.us>
	<CAKFQuwanYpV_0quPhRMpVoyUew4-4to0u1E0uXMNY4=ODPZHWQ@mail.gmail.com>
	<e9ef999a-7dad-242a-9e71-fdc2901ad245@postgrespro.ru>
	<20230414.162829.373160465721252149.horikyota.ntt@gmail.com>

On 14.04.2023 10:28, Kyotaro Horiguchi wrote:
> 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)"

In this form, it confuses me that 'postgres' and 'inherit, set' look 
like a common list.

> 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 |

It's very tempting to do so. But I don't like this approach. Showing 
membership options as an ACL-like column will be confusing.
Even in your example, my first reaction is that 
pg_execute_server_program is available to public.
(As for the general patterns, we can also consider combining three 
options into one column, like pg_class.reloptions.)

So, yet another way to discuss:

pg_read_all_stats(inherit,set/horiguti)
pg_execute_server_program(empty/postgres)


One more point. Grants without any option probably should be prohibited 
as useless. But this is for a new thread.

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com






view thread (78+ messages)  latest in thread

Message-ID: <e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru>
Permalink:  ../e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru/
Also on:    postgresql.org/message-id/e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: p.luzanov@postgrespro.ru, horikyota.ntt@gmail.com, david.g.johnston@gmail.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, david.zhang@highgo.ca
  Subject: Re: psql: Add role's membership options to the \du+ command
  In-Reply-To: <e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru>
  References: <1831161.1680703111@sss.pgh.pa.us> <CAKFQuwanYpV_0quPhRMpVoyUew4-4to0u1E0uXMNY4=ODPZHWQ@mail.gmail.com> <e9ef999a-7dad-242a-9e71-fdc2901ad245@postgrespro.ru> <20230414.162829.373160465721252149.horikyota.ntt@gmail.com> <e90e6775-63a0-6400-1a46-5e4a11124d50@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox