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

2021-09-14 Thread Michael Paquier
On Tue, Sep 14, 2021 at 12:57:47PM -0300, Alvaro Herrera wrote: > The parentheses that commit e3a87b4991cc removed the requirement for are > those that the committed code still has, starting at the errcode() line. > The ones in errmsg() were redundant and have never been necessary. Indeed,

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

2021-09-14 Thread Alvaro Herrera
On 2021-Sep-14, Michael Paquier wrote: > On Mon, Sep 13, 2021 at 08:51:18AM +0530, Bharath Rupireddy wrote: > > On Mon, Sep 13, 2021 at 8:07 AM Michael Paquier 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

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

2021-09-13 Thread Michael Paquier
On Mon, Sep 13, 2021 at 08:51:18AM +0530, Bharath Rupireddy wrote: > On Mon, Sep 13, 2021 at 8:07 AM Michael Paquier 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

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

2021-09-12 Thread Bharath Rupireddy
On Mon, Sep 13, 2021 at 8:07 AM Michael Paquier 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

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

2021-09-12 Thread Bharath Rupireddy
On Mon, Sep 13, 2021 at 6:45 AM 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

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

2021-09-12 Thread Michael Paquier
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

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

2021-09-12 Thread Euler Taveira
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). -- Euler

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

2021-09-12 Thread Bossart, Nathan
On 9/11/21, 1:31 AM, "Bharath Rupireddy" wrote: > We have two static check_permissions functions (one in slotfuncs.c > another in logicalfuncs.c) with the same name and same code for > checking the privileges for using replication slots. Why can't we have > a single function

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

2021-09-12 Thread Euler Taveira
On Sat, Sep 11, 2021, at 5:28 AM, Bharath Rupireddy wrote: > We have two static check_permissions functions (one in slotfuncs.c > another in logicalfuncs.c) with the same name and same code for > checking the privileges for using replication slots. Why can't we have > a single function

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

2021-09-11 Thread Bharath Rupireddy
Hi, We have two static check_permissions functions (one in slotfuncs.c another in logicalfuncs.c) with the same name and same code for checking the privileges for using replication slots. Why can't we have a single function CheckReplicationSlotPermissions in slot.c? This way, we can get rid of