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
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 narrow the scope, just like variable >> outputbytes >> in `if` br

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