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: Euler Taveira <euler@eulerto.com>
Cc: "Bossart, Nathan" <bossartn@amazon.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-09-13T03:17:16Z
Lists: pgsql-hackers
On Mon, Sep 13, 2021 at 6:45 AM Euler Taveira <euler@eulerto.com> 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).

The same commit says that the new code can be written in any way.
Having said that, I will leave it to the committer to take a call on
whether or not to remove the extra parenthesis.
   "
    While new code can be written either way, code intended to be
    back-patched will need to use extra parens for awhile yet.
    "

Regards,
Bharath Rupireddy.



Commits

  1. Remove code duplication for permission checks with replication slots

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