Re: REVOKE FROM warning on grantor - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: REVOKE FROM warning on grantor
Date
Msg-id CAKFQuwZ4F126-Q8LkAocJuhuPSEBX8kA8wNctnkfP5DvcUz5eg@mail.gmail.com
Whole thread Raw
In response to REVOKE FROM warning on grantor  (Étienne BERSAC <etienne.bersac@dalibo.com>)
Responses Re: REVOKE FROM warning on grantor
List pgsql-hackers
On Thursday, March 14, 2024, Étienne BERSAC <etienne.bersac@dalibo.com> wrote:

However, I'd prefer if Postgres fails properly. Because the GRANT is
actually not revoked. This prevent ldap2pg to report an issue in
handling privileges on such roles.

What do you think of make this warning an error ?


The choice of warning is made because after the command ends the grantmin question does not exist.  The revoke was a no-op and the final state is as the user intended.  Historically doing this didn’t give any message at all which was confusing so we added a warning so the semantics of not failing were preserved but there was some indication that something was amiss.  I don’t have a compelling argument to,change the long-standing behavior.  Client code can and probably should look for a show errors reported by the backend.  It is indeed possibly to treat this warning more serverly than the server chooses to.

David J.
 

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Catalog domain not-null constraints
Next
From: Alvaro Herrera
Date:
Subject: Re: MERGE ... RETURNING