Re: [HACKERS] 0/NULL/NIL assignments in build_*_rel()

2017-02-07 Thread Robert Haas
On Mon, Feb 6, 2017 at 12:04 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> Both build_simple_rel() and build_join_rel() allocate RelOptInfo using >> makeNode(), which returned a zeroed out memory. The functions then >> assign values like

Re: [HACKERS] 0/NULL/NIL assignments in build_*_rel()

2017-02-05 Thread Ashutosh Bapat
On Mon, Feb 6, 2017 at 11:10 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> On Mon, Feb 6, 2017 at 10:34 AM, Tom Lane wrote: >>> I'd vote for not. The general programming style in the backend is to >>> ignore the fact

Re: [HACKERS] 0/NULL/NIL assignments in build_*_rel()

2017-02-05 Thread Tom Lane
Ashutosh Bapat writes: > On Mon, Feb 6, 2017 at 10:34 AM, Tom Lane wrote: >> I'd vote for not. The general programming style in the backend is to >> ignore the fact that makeNode() zeroes the node's storage and initialize >> all the fields

Re: [HACKERS] 0/NULL/NIL assignments in build_*_rel()

2017-02-05 Thread Ashutosh Bapat
On Mon, Feb 6, 2017 at 10:34 AM, Tom Lane wrote: > Ashutosh Bapat writes: >> Both build_simple_rel() and build_join_rel() allocate RelOptInfo using >> makeNode(), which returned a zeroed out memory. The functions then >> assign values like

Re: [HACKERS] 0/NULL/NIL assignments in build_*_rel()

2017-02-05 Thread Tom Lane
Ashutosh Bapat writes: > Both build_simple_rel() and build_join_rel() allocate RelOptInfo using > makeNode(), which returned a zeroed out memory. The functions then > assign values like false, NULL, 0 or NIL which essentially contain > zero valued bytes. This