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

From Erik Wienhold
Subject Re: Fix output of zero privileges in psql
Date
Msg-id 4jvjkphxqnkddmafy4ail5vxoh4xi3hcppuvcx2hop3dbmtqfd@6tv33o6hgiqo
Whole thread Raw
In response to Re: Fix output of zero privileges in psql  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-hackers
On 2023-10-09 22:34 +0200, David G. Johnston write:
> On Mon, Oct 9, 2023 at 12:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > 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.
> >
> 
> My position is that the default behavior should be changed such that the
> distinction these reports need to make between empty privileges and default
> privileges is impossible for the user to remove.  I suppose the best direct
> solution given that goal is for the query to simply do away with any
> reliance on NULL being an indicator.  Output an i18n'd "no permissions
> present" line in the rare empty permissions situation and leave the empty
> string for built-in default.

My initial patch does exactly that.

> If the consensus is to not actually fix these views to make them
> environment invariant in their accuracy then so be it.  Having them obey
> \pset null seems like a half-measure but it at least is an improvement over
> the status quo such that users are capable of altering their system to make
> the reports distinguish the two cases if they realize the need.

I agree.

-- 
Erik



pgsql-hackers by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: Fix output of zero privileges in psql
Next
From: Vik Fearing
Date:
Subject: Re: PostgreSQL domains and NOT NULL constraint