Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple
Date
Msg-id 411768.1611003515@sss.pgh.pa.us
Whole thread Raw
In response to Narrow the scope of the variable outputstr in logicalrep_write_tuple  (japin <japinli@hotmail.com>)
List pgsql-hackers
japin <japinli@hotmail.com> writes:
> I find that the outputstr variable in logicalrep_write_tuple() only use in
> `else` branch, I think we can narrow the scope, just like variable outputbytes
> in `if` branch (for more readable).

Agreed, done.

For context, I'm not usually in favor of making one-off stylistic
improvements: the benefit seldom outweighs the risk of creating
merge hazards for future back-patching.  But in this case, the
code involved is mostly new in v14, so improving it now doesn't
cost anything in that way.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Joel Jacobson"
Date:
Subject: Re: Add primary keys to system catalogs
Next
From: Zhihong Yu
Date:
Subject: Re: search_plan_tree(): handling of non-leaf CustomScanState nodes causes segfault