Re: v16 GRANT role TO role needs a multi-option setting capability

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: v16 GRANT role TO role needs a multi-option setting capability
Date: 2023-01-23 21:07:58
Message-ID: c4152e51-6af8-3ca0-5834-4f3fcc4342cd@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)postgrespro(dot)ru

--
Pavel Luzanov

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-01-23 21:11:50 Re: run pgindent on a regular basis / scripted manner
Previous Message James Coleman 2023-01-23 21:07:03 Re: Fix incorrect comment reference