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 1rSeD0-00F1MM-LN for pgsql-docs@arkaria.postgresql.org; Wed, 24 Jan 2024 14:26:31 +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 1rSeCz-005TQM-GM for pgsql-docs@arkaria.postgresql.org; Wed, 24 Jan 2024 14:26:29 +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 1rSeCz-005TQE-9D for pgsql-docs@lists.postgresql.org; Wed, 24 Jan 2024 14:26:29 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rSeCw-0038hG-DC for pgsql-docs@lists.postgresql.org; Wed, 24 Jan 2024 14:26:28 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 7BC062FE6619 for ; Wed, 24 Jan 2024 15:26:23 +0100 (CET) Received: from s934.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 6C54A2E28B97; Wed, 24 Jan 2024 15:26:23 +0100 (CET) Received: from s898.loopia.se (unknown [172.22.191.5]) by s934.loopia.se (Postfix) with ESMTP id 6A3D97CEB05; Wed, 24 Jan 2024 15:26:23 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.01 X-Spam-Level: X-Spam-Status: No, score=-1.01 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=disabled Received: from s980.loopia.se ([172.22.191.5]) by s898.loopia.se (s898.loopia.se [172.22.190.17]) (amavisd-new, port 10024) with UTF8LMTP id d4RGdZoy14ty; Wed, 24 Jan 2024 15:26:22 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from smtpclient.apple (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s980.loopia.se (Postfix) with ESMTPSA id AE4C92201686; Wed, 24 Jan 2024 15:26:22 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: SQL command : ALTER DATABASE OWNER TO From: Daniel Gustafsson In-Reply-To: Date: Wed, 24 Jan 2024 15:26:22 +0100 Cc: gparc@free.fr, pgsql-docs Content-Transfer-Encoding: quoted-printable Message-Id: References: <2023185982.281851219.1646733038464.JavaMail.root@zimbra15-e2.priv.proxad.net> <1712096587.208766558.1706090901073.JavaMail.zimbra@free.fr> To: Laurenz Albe X-Mailer: Apple Mail (2.3696.120.41.1.4) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 24 Jan 2024, at 15:23, Laurenz Albe = wrote: >=20 > On Wed, 2024-01-24 at 11:08 +0100, gparc@free.fr wrote: >> for this "ALTER DATABASE" form, it should be mentioned that after = execution of the command, >> the old database owner loses all his privileges on it (even = connection) although it might >> still owns schemas or objects (tables, index,...) inside it. >>=20 >> Thanks in advance to add this important precision. >=20 > How about this: >=20 > diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml > index 4044f0908f..44042f863c 100644 > --- a/doc/src/sgml/ddl.sgml > +++ b/doc/src/sgml/ddl.sgml > @@ -1891,6 +1891,8 @@ ALTER TABLE = table_name OWNER TO new_owne > Superusers can always do this; ordinary roles can only do it if = they are > both the current owner of the object (or inherit the privileges of = the > owning role) and able to SET ROLE to the new = owning role. > + All object privileges of the old owner are transferred to the new = owner > + along with the ownership. > Doesn't seem unreasonable to me, it won't make the docs harder to read = and use for experienced users while it may make them easier to follow for new = users. -- Daniel Gustafsson