Re: Fix output of zero privileges in psql

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Erik Wienhold <ewie(at)ewie(dot)name>
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 07:38:43
Message-ID: 90cf768f17bd9afc2cf60a0d89153859db207d40.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2023-11-09 at 03:40 +0100, Erik Wienhold wrote:
> 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.

Right.

> > 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.

Thanks for the feedback. I'll set the patch to "ready for committer" then.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2023-11-09 07:42:54 Re: A recent message added to pg_upgade
Previous Message Crisp Lee 2023-11-09 07:32:42 Re: make pg_ctl more friendly