Re: Fix output of zero privileges in psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fix output of zero privileges in psql
Date
Msg-id 180911.1696878794@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fix output of zero privileges in psql  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Fix output of zero privileges in psql
Re: Fix output of zero privileges in psql
List pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Mon, 2023-10-09 at 09:30 -0700, David G. Johnston wrote:
>> My point with the second paragraph is that we could, instead of documenting the
>> caveat about null printing as empty strings is to instead issue an implicit
>> "\pset null '<null>'" as part of these commands, and a "\pset null" afterward,
>> conditioned upon it not already being set to a non-empty value.  IOW, the
>> special-casing we do today but actually do it in a way that distinguishes the
>> two cases instead of forcing them to be indistinguishable.

> -1

> The whole point of this patch is to make psql behave consistently with respect to
> NULLs in meta-commands.  Your suggestion would subvert that idea.

Yeah.  There is a lot of attraction in having \pset null affect these
displays just like all other ones.  The fact that they act differently
now is a wart, not something we should replace with a different special
case behavior.

Also, I'm fairly concerned about not changing the default behavior here.
The fact that this behavior has stood for a couple dozen years without
many complaints indicates that there's not all that big a problem to be
solved.  I doubt that a new default behavior will be well received,
even if it's arguably better.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Request for comment on setting binary format output per session
Next
From: Nathan Bossart
Date:
Subject: Re: should frontend tools use syncfs() ?