Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Peter Geoghegan
On Thu, Dec 19, 2019 at 7:55 AM Tom Lane wrote: > I don't think this is actually a good idea. What it is is a foot-gun, > because if anyone adds code there that wants to access the special area > of that particular page, it'll do the wrong thing, unless they remember > to put back the assignment

RE: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Ranier Vilela
De: Bruce Momjian Enviado: quinta-feira, 19 de dezembro de 2019 16:19 >Oh, I was not aware that was boilerplate code. I agree it should be >consistent, so patch reverted. Sorry. I apologize to you, Bruce. It is difficult to define where a "boilerplate" exists. I agree that decent compiler, will

Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Bruce Momjian
On Thu, Dec 19, 2019 at 10:55:42AM -0500, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Nov 26, 2019 at 01:45:10PM +, Ranier Vilela wrote: > >> Same case on nbtpage.c at line 1637, with var opaque. > >> make check, passed all 195 tests here with all commits. > > > You were right about b

Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Tom Lane
Bruce Momjian writes: > On Tue, Nov 26, 2019 at 01:45:10PM +, Ranier Vilela wrote: >> Same case on nbtpage.c at line 1637, with var opaque. >> make check, passed all 195 tests here with all commits. > You were right about both of these, so removed in master. I am > surprised no one else saw

Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-12-19 Thread Bruce Momjian
On Tue, Nov 26, 2019 at 01:45:10PM +, Ranier Vilela wrote: > Same case on nbtpage.c at line 1637, with var opaque. > make check, passed all 195 tests here with all commits. > > Ranier Vilela You were right about both of these, so removed in master. I am surprised no one else saw this before.

RE: [PATCH] Remove twice assignment with var pageop (nbtree.c).

2019-11-26 Thread Ranier Vilela
Same case on nbtpage.c at line 1637, with var opaque. make check, passed all 195 tests here with all commits. Ranier Vileladiff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 268f869a36..144fefccad 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/