Re: [PATCH] Simplify permission checking logic in user.c - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: [PATCH] Simplify permission checking logic in user.c
Date
Msg-id 20201230152628.GA27507@tamriel.snowman.net
Whole thread Raw
In response to [PATCH] Simplify permission checking logic in user.c  (Paul Martinez <paulmtz@google.com>)
Responses Re: [PATCH] Simplify permission checking logic in user.c
List pgsql-hackers
Greetings,

* Paul Martinez (paulmtz@google.com) wrote:
> This small patch simply modifies the code to replace the if/else-if chain with
> separate if statements, and always checks whether the user has the CREATEROLE
> privilege. (The have_createrole_privilege function includes another superuser
> check.) Given the current checks in each branch, this code is equivalent, but
> easier to modify in the future.

While I do appreciate that it'd be nice if we made all of the code in
the backend easier for folks to maintain their own patch sets against
core, it'd also mean that we're now being asked to provide some level of
commitment that we aren't going to change these things later because
then we'd break $whomever's patches.  That's certainly not something
that is really reasonable for us to agree to.

I'd strongly suggest that, instead, you consider proposing changes which
would address the actual use cases you have and work with the community
to have those included in core, which would further have the added
property that everyone would then benefit from those improvements.

Thanks,

Stephen

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Multi Inserts in CREATE TABLE AS - revived patch
Next
From: Stephen Frost
Date:
Subject: Re: [PATCH] Simplify permission checking logic in user.c