Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple

2021-01-18 Thread Tom Lane
japin 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 improv

Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple

2021-01-18 Thread Bharath Rupireddy
On Mon, Jan 18, 2021 at 1:39 PM japin wrote: > > > On Mon, 18 Jan 2021 at 15:59, Bharath Rupireddy > wrote: > > On Mon, Jan 18, 2021 at 1:16 PM japin wrote: > >> > >> > >> Hi, > >> > >> I find that the outputstr variable in logicalrep_write_tuple() only use in > >> `else` branch, I think we can

Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple

2021-01-18 Thread japin
> with git commit command. > > git apply > /mnt/hgfs/Shared/narrow-the-scope-of-the-variable-in-logicalrep_write_tuple.patch > error: corrupt patch at line 10 > Thanks for reviewing! Attached v2 as you suggested. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd. &g

Re: Narrow the scope of the variable outputstr in logicalrep_write_tuple

2021-01-18 Thread Bharath Rupireddy
On Mon, Jan 18, 2021 at 1:16 PM japin wrote: > > > Hi, > > 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). > > /* > * Send in binary if

Narrow the scope of the variable outputstr in logicalrep_write_tuple

2021-01-17 Thread japin
Hi, 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). /* * Send in binary if requested and type has suitable send function. */