Re: REVOKE FROM warning on grantor

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Étienne BERSAC <etienne(dot)bersac(at)dalibo(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: REVOKE FROM warning on grantor
Date: 2024-03-20 09:25:11
Message-ID: cf37c291-1998-4fc1-9fe7-a5c61ae7401c@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.03.24 22:30, Tom Lane wrote:
> regression=# revoke foo from joe;
> WARNING: role "joe" has not been granted membership in role "foo" by role "postgres"
> REVOKE ROLE
>
> What the OP is on about is that that last case issues WARNING not
> ERROR.

Another point is that granting a role that has already been granted is
not an error. So it makes some sense that revoking a role that has not
been granted is also not an error. Both of these operations are
idempotent in the same way.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2024-03-20 09:30:54 Re: Possibility to disable `ALTER SYSTEM`
Previous Message Alexander Korotkov 2024-03-20 09:11:13 Re: [HACKERS] make async slave to wait for lsn to be replayed