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 1pK42w-0002iC-GQ for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jan 2023 21:08:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pK42v-000213-FL for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Jan 2023 21:08:05 +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 1pK42v-00020t-0R for pgsql-hackers@lists.postgresql.org; Mon, 23 Jan 2023 21:08:05 +0000 Received: from mail.postgrespro.ru ([93.174.131.139]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pK42r-0006FD-TT for pgsql-hackers@lists.postgresql.org; Mon, 23 Jan 2023 21:08:04 +0000 Received: from [192.168.0.104] (unknown [62.217.188.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id 1ED4F21C7E60; Tue, 24 Jan 2023 00:07:59 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1674508079; bh=vdX4GZXwaRIzBmtf4qlLJO7lWFuLN6uGBwxkusx1/WY=; h=Date:Subject:To:References:From:In-Reply-To; b=eZ0DlipHChgWmaau0pvbVuPrHmktgGR4S+2smXbt3kk6IDMuiRd17IKF8PuW0RDxU fXklGuCjpEp3QiF137UlGPyLJWROnD0mCkSDkZbJwvPDeRyvyER0V7zHr85crRZy69 Y8kNTH/xbG3kQFBZDZfhdRWZhdm8OiiII9ou11P4= Content-Type: multipart/alternative; boundary="------------Dwuo29ZepovtbNr2mbDuIgHF" Message-ID: Date: Tue, 24 Jan 2023 00:07:58 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: v16 GRANT role TO role needs a multi-option setting capability Content-Language: en-US To: "David G. Johnston" , PostgreSQL Hackers References: From: Pavel Luzanov In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------Dwuo29ZepovtbNr2mbDuIgHF Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 23.01.2023 23:09, David G. Johnston wrote: > GRANT role_name [, ...] TO role_specification [, ...] >     [ WITH { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ] >     [ GRANTED BY role_specification ] > > It would be really nice to complete this new feature of INHERIT/SET > FALSE/TRUE with a multi-specification capability. If I understand properly, the multi-specification capability is supported in the form: GRANT admin1, admin2 TO usr1, usr2 WITH ADMIN OPTION, SET FALSE, INHERIT TRUE; But this doesn't seem to be reflected correctly in the documentation. If I'm not mistaken, the current spec should be like this: GRANT role_name [, ...] TO role_specification [, ...]     [ WITH [ { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ] [, ...] ]     [ GRANTED BY role_specification ] By the way, there is suggestion to add role's membership options to the \du+ command.[1] [1]https://www.postgresql.org/message-id/flat/b9be2d0e-a9bc-0a30-492f-a4f68e4f7740@postgrespro.ru -- Pavel Luzanov --------------Dwuo29ZepovtbNr2mbDuIgHF Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 23.01.2023 23:09, David G. Johnston wrote:
GRANT role_name [, ...] TO role_specification [, ...]
    [ WITH { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ]
    [ GRANTED BY role_specification ]

It would be really nice to complete this new feature of INHERIT/SET FALSE/TRUE with a multi-specification capability.

If I understand properly, the multi-specification capability is supported in the form:

GRANT admin1, admin2 TO usr1, usr2
WITH ADMIN OPTION, SET FALSE, INHERIT TRUE;

But this doesn't seem to be reflected correctly in the documentation.
If I'm not mistaken, the current spec should be like this:

GRANT role_name [, ...] TO role_specification [, ...]
    [ WITH [ { ADMIN | INHERIT | SET } { OPTION | TRUE | FALSE } ] [, ...] ]
    [ GRANTED BY role_specification ]

By the way, there is suggestion to add role's membership options to the \du+ command.[1]

[1]https://www.postgresql.org/message-id/flat/b9be2d0e-a9bc-0a30-492f-a4f68e4f7740@postgrespro.ru
-- 
Pavel Luzanov
--------------Dwuo29ZepovtbNr2mbDuIgHF--