Re: Remove duplicate static function check_permissions in slotfuncs.c and logicalfuncs.c

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Euler Taveira <euler@eulerto.com>, "Bossart, Nathan" <bossartn@amazon.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-13T03:21:18Z
Lists: pgsql-hackers
On Mon, Sep 13, 2021 at 8:07 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Sun, Sep 12, 2021 at 10:14:36PM -0300, Euler Taveira wrote:
> > On Sun, Sep 12, 2021, at 8:02 PM, Bossart, Nathan wrote:
> >> nitpick: It looks like there's an extra set of parentheses around
> >> errmsg().
> >
> > Indeed. Even the requirement for extra parenthesis around auxiliary function
> > calls was removed in v12 (e3a87b4991cc2d00b7a3082abb54c5f12baedfd1).
>
> Yes.  The patch makes sense.  I am not seeing any other places that
> could be grouped, so that looks fine as-is.

Thanks all for taking a look at the patch. Here's the CF entry -
https://commitfest.postgresql.org/35/3319/

Regards,
Bharath Rupireddy.



Commits

  1. Remove code duplication for permission checks with replication slots

  2. Re-implement the ereport() macro using __VA_ARGS__.