Обсуждение: Re: Restoring default privileges on objects

Поиск
Список
Период
Сортировка

Re: Restoring default privileges on objects

От
Laurenz Albe
Дата:
On Wed, 2023-08-30 at 12:00 +0200, Peter J. Holzer wrote:
> On 2023-08-29 14:44:48 -0600, Stuart McGraw wrote:
> > On 8/29/23 13:27, Tom Lane wrote:
> > > Fixing \dp to honor "\pset null" for this might be a reasonable
> > > thing to do too.  I'm actually a bit surprised that that doesn't
> > > work already.
> >
> > 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.
>
> Or just always do a \pset null. For me printing NULL the same as an
> empty string is just as confusing in normal tables, so that's the first
> line in my ~/.psqlrc. YMMV, of course.
>
> But I guess the point is that people who do \pset null expect to be able
> to distinguish '' and NULL visually and might be surprised if that
> doesn't work everywhere, while people who don't \pset null know that ''
> and NULL are visually indistinguishable and that they may need some
> other way to distinguish them if the difference matters.
>
> So +1 for me fixing \dp to honor "\pset null".

+1

Here is a patch that does away with the special handling of NULL values
in psql backslash commands.

Yours,
Laurenz Albe



Re: Restoring default privileges on objects

От
Laurenz Albe
Дата:
On Fri, 2023-10-06 at 22:16 +0200, Laurenz Albe wrote:
> Here is a patch that does away with the special handling of NULL values
> in psql backslash commands.

Erm, I forgot to attach the patch.

Yours,
Laurenz Albe

Вложения

Re: Restoring default privileges on objects

От
Laurenz Albe
Дата:
On Fri, 2023-10-06 at 22:18 +0200, Laurenz Albe wrote:
> On Fri, 2023-10-06 at 22:16 +0200, Laurenz Albe wrote:
> > Here is a patch that does away with the special handling of NULL values
> > in psql backslash commands.
>
> Erm, I forgot to attach the patch.

I just realize that there is a conflicting proposal.  I'll reply to that thread.
Sorry for the noise.

Yours,
Laurenz Albe



Re: Restoring default privileges on objects

От
"David G. Johnston"
Дата:
On Fri, Oct 6, 2023 at 1:29 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2023-10-06 at 22:18 +0200, Laurenz Albe wrote:
> On Fri, 2023-10-06 at 22:16 +0200, Laurenz Albe wrote:
> > Here is a patch that does away with the special handling of NULL values
> > in psql backslash commands.
>
> Erm, I forgot to attach the patch.

I just realize that there is a conflicting proposal.  I'll reply to that thread.
Sorry for the noise.


This thread seems officially closed and the discussion moved to [1].

Over there, after reading both threads, I am seeing enough agreement that changing these queries to always print "(none)" (translating the word none) where today they output null, and thus plan to move forward with the v1 patch on that thread proposing to do just that.  Please chime in over there on this specific option - whether you wish to support or reject it.  Should it be rejected the plan is to have these queries respect the user's preference in \pset null.  Please make it clear if you would rather maintain the status quo against either of those two options.

Thanks!

David J.