Re: Restoring default privileges on objects

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: Stuart McGraw <smcg4191(at)mtneva(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Restoring default privileges on objects
Date: 2023-08-29 19:27:18
Message-ID: 31246.1693337238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Erik Wienhold <ewie(at)ewie(dot)name> writes:
> On 29/08/2023 18:43 CEST Stuart McGraw <smcg4191(at)mtneva(dot)com> wrote:
>> Shouldn't psql put *something* (like "(default)" or "-") in the
>> "Access privileges" column to indicate that? Or conversely,
>> something (like "(none)"?) in the revoked case?

> Indeed, that's confusing. Command \dp always prints null as empty string [1].
> So \pset null '(null)' has no effect.

Yeah, perhaps. The reason it so seldom comes up is that a state of
zero privileges is extremely rare (because it's useless in practice).

That being the case, if we were to do something about this, I'd vote
for changing the display of zero-privileges to "(none)" or something
along that line, rather than changing the display of NULL, which
people are accustomed to.

Fixing \dp to honor "\pset null" for this might be a reasonable
thing to do too. I'm actually a bit surprised that that doesn't
work already.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Wienhold 2023-08-29 19:50:30 Re: Restoring default privileges on objects
Previous Message Erik Wienhold 2023-08-29 19:04:53 Re: Restoring default privileges on objects

Browse pgsql-hackers by date

  From Date Subject
Next Message Erik Wienhold 2023-08-29 19:50:30 Re: Restoring default privileges on objects
Previous Message Erik Wienhold 2023-08-29 19:04:53 Re: Restoring default privileges on objects