Re: Fix output of zero privileges in psql

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Shubham Khanna <khannashubham1197(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix output of zero privileges in psql
Date: 2023-11-09 02:40:24
Message-ID: ya5pb2ebeiuuc2bqqm2562ulwdkny72s6m3u2xdgvmy2ilrefe@f2uw5jevh473
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-11-08 13:23 +0100, Laurenz Albe wrote:
> I wonder how to proceed with this patch. The main disagreement is
> whether default privileges should be displayed as NULL (less invasive,
> but more confusing for beginners) or "(default)" (more invasive,
> but nicer for beginners).

Are there any reports from beginners being confused about default
privileges being NULL or being displayed as a blank string in psql?
This is usually resolved with a pointer to the docs if it comes up in
discussions or the user makes the mental leap and checks the docs
himself. Both patches add some details to the docs to explain psql's
output.

> David is for "(default)", Tom and me are for NULL, and I guess Erik
> would also prefer "(default)", since that was how his original
> patch did it, IIRC. I think I could live with both solutions.
>
> Kind of a stalemate. Who wants to tip the scales?

Yes I had a slight preference for my patch but I'd go with yours (\pset
null) now. I followed the discussion after my last mail but had nothing
more to add that wasn't already said. Tom then wrote that NULL is the
catalog's representation for the default privileges and obscuring that
fact in psql is not doing any service to the users. This convinced me
because users may have to deal with aclitem[] being NULL anyway at some
point if they need to check privileges in more detail. So it makes
absolutely sense that psql is transparent about that.

--
Erik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-11-09 02:41:53 Re: Synchronizing slots from primary to standby
Previous Message Melanie Plageman 2023-11-09 02:23:01 Re: Eager page freeze criteria clarification