From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Peter J. Holzer <hjp-pgsql@hjp.at>
To: pgsql-hackers@postgresql.org
Subject: Re: Restoring default privileges on objects
Date: Fri, 06 Oct 2023 22:16:28 +0200
Message-ID: <ce729fa858618fbf36453200e7500c3b15c4cbb6.camel@cybertec.at> (raw)
In-Reply-To: <20230830100030.oxnegs7cxbzvjizt@hjp.at>
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>
<20230830100030.oxnegs7cxbzvjizt@hjp.at>
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
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: laurenz.albe@cybertec.at, hjp-pgsql@hjp.at, pgsql-hackers@postgresql.org
Subject: Re: Restoring default privileges on objects
In-Reply-To: <ce729fa858618fbf36453200e7500c3b15c4cbb6.camel@cybertec.at>
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> <20230830100030.oxnegs7cxbzvjizt@hjp.at> <ce729fa858618fbf36453200e7500c3b15c4cbb6.camel@cybertec.at>
* 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