BUG #18137: PG16 release note doc bug in "Allow GRANT group_name TO user_name ..."

Started by PG Bug reporting formover 2 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 18137
Logged by: TAKATSUKA Haruka
Email address: harukat@sraoss.co.jp
PostgreSQL version: 16.0
Operating system: any
Description:

In the following release note item, it seems that "GRANT group_name TO
user_name"
should be "ALTER GROUP group_name ADD USER user_name".
As far as I have tested and confirmed, ALTER GROUP is the one that
has been allowed since version 16.

test steps:
db1=# CREATE ROLE usr1 LOGIN;
db1=# CREATE ROLE usr2 LOGIN;
db1=# CREATE ROLE usr3 LOGIN;
db1=# CREATE ROLE grp1;
db1=# GRANT grp1 TO usr1 WITH ADMIN OPTION;
db1=# \c db1 usr1
db1=> ALTER GROUP grp1 ADD USER usr2;
15.x: ERROR: permission denied
16.0: GRANT successfully
db1=> GRANT grp1 TO usr3;
15.x: GRANT successfully
16.0: GRANT successfully

release note item (release-16.sgml 963) :
<!--
Author: Robert Haas <rhaas@postgresql.org>
2022-08-22 [ce6b672e4] Make role grant system more consistent with other
privil
-->

<listitem>
<para>
Allow <link linkend="sql-grant"><literal>GRANT group_name TO
user_name</literal></link> to be performed with <literal>ADMIN
OPTION</literal> (Robert Haas)
</para>

<para>
Previously <literal>CREATEROLE</literal> permission was required.
</para>
</listitem>

#2Bruce Momjian
bruce@momjian.us
In reply to: PG Bug reporting form (#1)
Re: BUG #18137: PG16 release note doc bug in "Allow GRANT group_name TO user_name ..."

On Thu, Sep 28, 2023 at 07:24:35AM +0000, PG Bug reporting form wrote:

The following bug has been logged on the website:

Bug reference: 18137
Logged by: TAKATSUKA Haruka
Email address: harukat@sraoss.co.jp
PostgreSQL version: 16.0
Operating system: any
Description:

In the following release note item, it seems that "GRANT group_name TO
user_name"
should be "ALTER GROUP group_name ADD USER user_name".
As far as I have tested and confirmed, ALTER GROUP is the one that
has been allowed since version 16.

Yes, you are correct. Attached patch applied.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

Attachments:

REL_16_STABLE.difftext/x-diff; charset=us-asciiDownload+2-2
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: BUG #18137: PG16 release note doc bug in "Allow GRANT group_name TO user_name ..."

Bruce Momjian <bruce@momjian.us> writes:

On Thu, Sep 28, 2023 at 07:24:35AM +0000, PG Bug reporting form wrote:

In the following release note item, it seems that "GRANT group_name TO
user_name"
should be "ALTER GROUP group_name ADD USER user_name".
As far as I have tested and confirmed, ALTER GROUP is the one that
has been allowed since version 16.

Yes, you are correct. Attached patch applied.

Should probably change the <link> target too?

regards, tom lane

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#3)
Re: BUG #18137: PG16 release note doc bug in "Allow GRANT group_name TO user_name ..."

On Fri, Sep 29, 2023 at 02:17:20PM -0400, Tom Lane wrote:

Bruce Momjian <bruce@momjian.us> writes:

On Thu, Sep 28, 2023 at 07:24:35AM +0000, PG Bug reporting form wrote:

In the following release note item, it seems that "GRANT group_name TO
user_name"
should be "ALTER GROUP group_name ADD USER user_name".
As far as I have tested and confirmed, ALTER GROUP is the one that
has been allowed since version 16.

Yes, you are correct. Attached patch applied.

Should probably change the <link> target too?

Ah, good point, done.

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.