Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb41W-00B3N5-F5 for pgsql-general@arkaria.postgresql.org; Tue, 29 Aug 2023 19:05:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qb41V-00ACa1-08 for pgsql-general@arkaria.postgresql.org; Tue, 29 Aug 2023 19:05:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb41U-00ACZb-D0 for pgsql-general@lists.postgresql.org; Tue, 29 Aug 2023 19:05:08 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb41O-001eOR-GS for pgsql-general@lists.postgresql.org; Tue, 29 Aug 2023 19:05:05 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4RZxgp3wfHz9sQF; Tue, 29 Aug 2023 21:04:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693335894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qyZbabfDrLBSY3NZg4VLy0WL/pbIORiQsXo9/MYJKNU=; b=yj9PywavHmixWaMo3SrZeB9yd2pFQaCzrny4KvjgfbNYw55K04/mHTpKsUaJnps6/GpL4C ocqOsX5UI3baiOd7CgY95lduX4YSIMWP98/uyJbzX07sDgoYqZnyGlVGD3x7zZqNTZpV16 VY6zqxf9t2Nhjwpf4IXr3RN3oBjL8W0PqNbu7oei90AnwHO6roFQ8vDgco+NF8+26pWuJO qJHi5e9ygsy3gOXp4Chgq4rSjpnqcqULNi36rYMdn8gbIsGimTkXX6qY/Eat3CDN7iA+Bm hjw9GuqkZFO0jyx/hkaz2NNGTweiAOxQD0lYJstXkpv3Xv04eqG0M8xPVXgxTg== Date: Tue, 29 Aug 2023 21:04:53 +0200 (CEST) From: Erik Wienhold To: Stuart McGraw , pgsql-general@lists.postgresql.org Cc: Tom Lane Message-ID: <1550267563.330669.1693335893138@office.mailbox.org> In-Reply-To: References: <96d6885a-5e25-9ae8-4a1a-d7e557a5fe9c@mtneva.com> <1166048641.281962.1693308151542@office.mailbox.org> <1006397.1693318485@sss.pgh.pa.us> Subject: Re: Restoring default privileges on objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4RZxgp3wfHz9sQF List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 29/08/2023 18:43 CEST Stuart McGraw wrote: > > How does one distinguish between (blank)=3D(default privileges) > and (blank)=3D(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): =09"If the =E2=80=9CAccess privileges=E2=80=9D column is empty for a given = object, it =09 means the object has default privileges (that is, its privileges =09 entry in the relevant system catalog is null)." [1] https://git.postgresql.org/gitweb/?p=3Dpostgresql.git;a=3Dblob;f=3Dsrc/= bin/psql/describe.c;h=3Dbac94a338cfbc497200f0cf960cbabce2dadaa33;hb=3D9b581= c53418666205938311ef86047aa3c6b741f#l1149 [2] https://www.postgresql.org/docs/14/ddl-priv.html -- Erik