Re: Fix output of zero privileges in psql

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>, Erik Wienhold <ewie@ewie.name>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-10-17T16:33:09Z
Lists: pgsql-hackers
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Mon, 2023-10-16 at 19:05 -0700, David G. Johnston wrote:
>> Reading both threads I'm not seeing any specific rejection of the
>> solution that we simply represent empty privileges as "(none)".

> Thanks for that summary.  I prefer my version (simply display NULLs
> as NULLs), but I am not wedded to it.  I had the impression that Tom
> would prefer that too, but is woried if the incompatibility introduced
> would outweigh the small benefit (of either patch).

> So it is clear that we don't have a consensus.

FWIW, my druthers are to make the describe.c queries honor \pset null
(not only for privileges, but anywhere else they fail to) and do
nothing beyond that.  I think that'll generally reduce the surprise
factor, while anything else we might opt to do will increase it.

If that fails to garner a consensus, my second choice would be to
do that plus translate empty-but-not-null ACLs to "(none)".

			regards, tom lane



Commits

  1. Improve default and empty privilege outputs in psql.