From: | Erik Wienhold <ewie(at)ewie(dot)name> |
---|---|
To: | Stuart McGraw <smcg4191(at)mtneva(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Restoring default privileges on objects |
Date: | 2023-08-30 00:59:14 |
Message-ID: | 1200260311.340593.1693357154329@office.mailbox.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> On 29/08/2023 22:44 CEST Stuart McGraw <smcg4191(at)mtneva(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2023-08-30 01:21:12 | Re: createuser unexpectedly creates superuser with createdb and createrole |
Previous Message | Erik Wienhold | 2023-08-30 00:44:18 | createuser unexpectedly creates superuser with createdb and createrole |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2023-08-30 01:11:10 | Re: pgbench: allow to exit immediately when any client is aborted |
Previous Message | Michael Paquier | 2023-08-30 00:51:23 | Re: Remove IndexInfo.ii_OpclassOptions field |