Re: Remove redundant assignment of a variable in function AlterPublicationTables - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Remove redundant assignment of a variable in function AlterPublicationTables
Date
Msg-id aKgA5lw4sFe8G9AS@paquier.xyz
Whole thread Raw
In response to Re: Remove redundant assignment of a variable in function AlterPublicationTables  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On Fri, Aug 22, 2025 at 09:55:23AM +1000, Peter Smith wrote:
> To summarise:
> Only ~4 places are redundantly assigning isNull values before calling
> functions that use &isNull.
> But ~400 function calls that are passing &isNull do not pre-assignment
> of that variable.
>
> Choosing to keep this patch would be consistent with 99% of existing examples.

Sure, but I don't quite see what really requires fixing here.  Even if
there's an "inconsistency" with variable manipulation pattern, it
does not present a risk of becoming broken if we begin to manipulate
or refactor this area of the code, nor do we need to force one rule
across the whole source code.  I'd suggest to keep this one for
patches that rework the whole area, if these churns prove to be
annoying.

If somebody else wants to come around and apply this patch, I'm OK
with that, of course, my opinion is just one voice among many others.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Remove unneeded cast in heap_xlog_lock.
Next
From: Kirill Reshke
Date:
Subject: Re: Remove unneeded cast in heap_xlog_lock.