Re: Fix output of zero privileges in psql

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

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Mon, Nov 13, 2023 at 12:36 PM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
> wrote:
>> On Mon, 2023-11-13 at 11:27 +0100, Erik Wienhold wrote:
>>> On 2023-11-09 20:19 +0100, Tom Lane wrote:
>>>> So, just to clarify, we're settling on your v4 from [1]?

>>> Yes from my side.

>> +1

> +0.5 for the reasons already stated; but I get and accept the argument for
> NULL.

Patch pushed with minor adjustments, mainly rewriting some comments.

One notable change is that I dropped the newline whitespace printed
by printACLColumn. That was contrary to the policy expressed in the
function's comment, and IMO it made -E output look worse not better.
The problem is that the calling code determines the indentation
that this targetlist item should have, and we don't want to outdent
from that. I think it's better to make it one line, even though
that will run a bit over 80 columns.

I also got rid of the use of a created superuser in the test case.
The test seems pretty duplicative to me anyway, so let's just not
test the object types that need superuser.

> I will reiterate my preference for writing an explicit IS NULL branch in
> the case expression instead of relying upon the strict-ness of
> array_to_string.

Meh. We were relying on that already, and it wasn't a problem.
I might have done it, except that it'd have made the one line
even longer and harder to read (and slower to execute, probably).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-11-13 20:52:40 Re: [PATCHES] Post-special page storage TDE support
Previous Message Andres Freund 2023-11-13 20:44:39 Re: Split index and table statistics into different types of stats