From: | Erik Wienhold <ewie(at)ewie(dot)name> |
---|---|
To: | Stuart McGraw <smcg4191(at)mtneva(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Restoring default privileges on objects |
Date: | 2023-08-29 19:04:53 |
Message-ID: | 1550267563.330669.1693335893138@office.mailbox.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> On 29/08/2023 18:43 CEST Stuart McGraw <smcg4191(at)mtneva(dot)com> wrote:
>
> How does one distinguish between (blank)=(default privileges)
> and (blank)=(no privileges)?
>
> 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?
>
> It doesn't seem like a good idea to use the same visual
> representation for two nearly opposite conditions. It confused
> the heck out of me anyway... :-)
Indeed, that's confusing. Command \dp always prints null as empty string [1].
So \pset null '(null)' has no effect.
The docs don't mention that edge case [2] (the second to last paragraph):
"If the “Access privileges” column is empty for a given object, it
means the object has default privileges (that is, its privileges
entry in the relevant system catalog is null)."
[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/psql/describe.c;h=bac94a338cfbc497200f0cf960cbabce2dadaa33;hb=9b581c53418666205938311ef86047aa3c6b741f#l1149
[2] https://www.postgresql.org/docs/14/ddl-priv.html
--
Erik
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-08-29 19:27:18 | Re: Restoring default privileges on objects |
Previous Message | Stuart McGraw | 2023-08-29 16:43:45 | Re: Restoring default privileges on objects |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-08-29 19:27:18 | Re: Restoring default privileges on objects |
Previous Message | Alvaro Herrera | 2023-08-29 18:44:02 | Re: tablecmds.c/MergeAttributes() cleanup |