Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peFPN-000758-5B for pgsql-general@arkaria.postgresql.org; Mon, 20 Mar 2023 13:18:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1peFPM-0007wd-2P for pgsql-general@arkaria.postgresql.org; Mon, 20 Mar 2023 13:18:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peFPL-0007vy-OA for pgsql-general@lists.postgresql.org; Mon, 20 Mar 2023 13:18:39 +0000 Received: from mout-u-107.mailbox.org ([2001:67c:2050:101:465::107]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1peFPJ-0001wX-6B for pgsql-general@postgresql.org; Mon, 20 Mar 2023 13:18:38 +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 4PgFfv2zSyz9sqd; Mon, 20 Mar 2023 14:18:31 +0100 (CET) Date: Mon, 20 Mar 2023 14:18:30 +0100 (CET) From: Erik Wienhold To: Dominique Devienne Cc: pgsql-general@postgresql.org Message-ID: <1479824139.962974.1679318310954@office.mailbox.org> In-Reply-To: References: <1626848226.954543.1679314736718@office.mailbox.org> Subject: Re: NULL pg_database.datacl 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: 4PgFfv2zSyz9sqd List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 20/03/2023 13:50 CET Dominique Devienne wrote: > > On Mon, Mar 20, 2023 at 1:18=E2=80=AFPM Erik Wienhold wr= ote: > > > On 20/03/2023 11:52 CET Dominique Devienne wrot= e: > > > What does a NULL AclItem[] mean exactly? > > > > It means that the object has default privileges (before any GRANT or R= EVOKE > > is executed). For databases this means full privileges for the databas= e owner > > and the CONNECT and TEMPORARY privileges for PUBLIC. So any user can c= onnect > > if allowed by pg_hba.conf. > > > > https://www.postgresql.org/docs/current/ddl-priv.html > > Thanks Erik. But then, how come aclexplode() is not showing these > default/implicit privileges? > > Is there a SQL function returning those per-type default provileges? > That I could then coalesce() datacl with? Use acldefault. Pass in ownerId=3D0 to get the privileges for PUBLIC. https://www.postgresql.org/docs/current/functions-info.html#FUNCTIONS-ACLIT= EM-FN-TABLE -- Erik