From: Erik Wienhold <ewie@ewie.name>
To: Stuart McGraw <smcg4191@mtneva.com>
To: pgsql-general@lists.postgresql.org
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Restoring default privileges on objects
Date: Wed, 30 Aug 2023 02:59:14 +0200 (CEST)
Message-ID: <1200260311.340593.1693357154329@office.mailbox.org> (raw)
In-Reply-To: <e7387e04-0a17-3a77-8e0c-da6794625a30@mtneva.com>
References: <96d6885a-5e25-9ae8-4a1a-d7e557a5fe9c@mtneva.com>
<1166048641.281962.1693308151542@office.mailbox.org>
<1006397.1693318485@sss.pgh.pa.us>
<efdd465d-a795-6188-7f71-7cdb4b2be031@mtneva.com>
<1550267563.330669.1693335893138@office.mailbox.org>
<31246.1693337238@sss.pgh.pa.us>
<e7387e04-0a17-3a77-8e0c-da6794625a30@mtneva.com>
> On 29/08/2023 22:44 CEST Stuart McGraw <smcg4191@mtneva.com> wrote:
>
> That change would still require someone using \dp to realize that
> the "Access privileges" value could be either '' or NULL (I guess
> that could be pointed out more obviously in the psql doc), and then
> do a '\pset null' before doing \dp? That seems a little inconvenient.
Right.
> As a possible alternative, in the query that \dp sends, what about
> replacing the line:
>
> select ...,
> pg_catalog.array_to_string(c.relacl, E'\n') as "Access privileges"
> ...
>
> with something like:
>
> CASE array_length(c.relacl,1) WHEN 0 THEN '(none)' ELSE pg_catalog.array_to_string(c.relacl, E'\n') END as "Access privileges"
>
> I realize that removes the ability to control with pset what is
> displayed, but maybe a little more foolproof for naive users like
> myself?
I think hardcoding '(none)' is what Tom meant (at least how I read it). Also
'(none)' should probably be localizable like the table header.
The \pset change would be separate.
--
Erik
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-general@postgresql.org
Cc: ewie@ewie.name, smcg4191@mtneva.com, tgl@sss.pgh.pa.us
Subject: Re: Restoring default privileges on objects
In-Reply-To: <1200260311.340593.1693357154329@office.mailbox.org>
References: <96d6885a-5e25-9ae8-4a1a-d7e557a5fe9c@mtneva.com> <1166048641.281962.1693308151542@office.mailbox.org> <1006397.1693318485@sss.pgh.pa.us> <efdd465d-a795-6188-7f71-7cdb4b2be031@mtneva.com> <1550267563.330669.1693335893138@office.mailbox.org> <31246.1693337238@sss.pgh.pa.us> <e7387e04-0a17-3a77-8e0c-da6794625a30@mtneva.com> <1200260311.340593.1693357154329@office.mailbox.org>
* 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