Search Postgresql Archives

Re: Restoring default privileges on objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On 29/08/2023 22:44 CEST Stuart McGraw <smcg4191@xxxxxxxxxx> 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





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux