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 1qb9YK-00BF1e-RA for pgsql-general@arkaria.postgresql.org; Wed, 30 Aug 2023 00:59:25 +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 1qb9YJ-00DBVk-7h for pgsql-general@arkaria.postgresql.org; Wed, 30 Aug 2023 00:59:23 +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 1qb9YI-00DBVT-R9 for pgsql-general@lists.postgresql.org; Wed, 30 Aug 2023 00:59:22 +0000 Received: from mout-u-204.mailbox.org ([2001:67c:2050:101:465::204]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qb9YF-001hDs-Bh for pgsql-general@lists.postgresql.org; Wed, 30 Aug 2023 00:59:21 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-204.mailbox.org (Postfix) with ESMTPS id 4Rb5Xg0PP9z9sWd; Wed, 30 Aug 2023 02:59:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ewie.name; s=MBO0001; t=1693357155; 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=guclJo2SYEfJ5SpJunxmf9B7YRvV/WIA/woXoUSzOVI=; b=Cg/uV4xfaq0gYcZ94qwbFum+Qqx141NmY67CXHo1Q5YW8++AbYAzjJIPN5WMRZMEiu0YL6 phAWCynpGyE0b/+RhnOj2mK2rvmes9WSakgUtJcdvaG7RlHObZio35G+I6uVf2LV6/XXE5 NThPKjB0iso6l85cJKKy3vi++3XRXqDLAoFuhF1e7hC795OpFACAE0Et/lX5HjW2PyHQTz EnqDD9Yk1pPphbM/WHgtSxhBHmTOg+wbeyzt2AcKjCKeP2/xdEbtxBkb4dlr2/onaEFeur jl44S4WYgRTvRLxnG1PPIEr5vkX8pnzz6iOdg7v4KJyLnY+2BQwPxCqeAbr5fA== Date: Wed, 30 Aug 2023 02:59:14 +0200 (CEST) From: Erik Wienhold To: Stuart McGraw , pgsql-general@lists.postgresql.org Cc: Tom Lane Message-ID: <1200260311.340593.1693357154329@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> <1550267563.330669.1693335893138@office.mailbox.org> <31246.1693337238@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: 7bit X-Priority: 3 Importance: Normal X-Rspamd-Queue-Id: 4Rb5Xg0PP9z9sWd List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 29/08/2023 22:44 CEST Stuart McGraw wrote: > > That change would still require someone using \dp to realize that > the "Access privileges" value could be either '' or NULL (I guess > that could be pointed out more obviously in the psql doc), and then > do a '\pset null' before doing \dp? That seems a little inconvenient. Right. > As a possible alternative, in the query that \dp sends, what about > replacing the line: > > select ..., > pg_catalog.array_to_string(c.relacl, E'\n') as "Access privileges" > ... > > with something like: > > CASE array_length(c.relacl,1) WHEN 0 THEN '(none)' ELSE pg_catalog.array_to_string(c.relacl, E'\n') END as "Access privileges" > > I realize that removes the ability to control with pset what is > displayed, but maybe a little more foolproof for naive users like > myself? I think hardcoding '(none)' is what Tom meant (at least how I read it). Also '(none)' should probably be localizable like the table header. The \pset change would be separate. -- Erik