public inbox for [email protected]  
help / color / mirror / Atom feed
From: Erik Wienhold <[email protected]>
To: Stuart McGraw <[email protected]>
To: [email protected]
Cc: Tom Lane <[email protected]>
Subject: Re: Restoring default privileges on objects
Date: Tue, 29 Aug 2023 21:04:53 +0200 (CEST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

> On 29/08/2023 18:43 CEST Stuart McGraw <[email protected]> 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=bac94a338cfbc...
[2] https://www.postgresql.org/docs/14/ddl-priv.html

--
Erik






view thread (13+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Restoring default privileges on objects
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox