Re: [PATCH] Simplify permission checking logic in user.c

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Paul Martinez <paulmtz(at)google(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Simplify permission checking logic in user.c
Date: 2020-12-30 15:26:28
Message-ID: 20201230152628.GA27507@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greetings,

* Paul Martinez (paulmtz(at)google(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2020-12-30 15:39:22 Re: [PATCH] Simplify permission checking logic in user.c
Previous Message Simon Riggs 2020-12-30 15:04:12 Re: Multi Inserts in CREATE TABLE AS - revived patch