Re: Fix NULL pointer reference in _outPathTarget() - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fix NULL pointer reference in _outPathTarget()
Date
Msg-id 29996e3b-0bae-96df-b8f7-201ee578299c@enterprisedb.com
Whole thread Raw
In response to Re: Fix NULL pointer reference in _outPathTarget()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fix NULL pointer reference in _outPathTarget()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 18.04.22 20:53, Tom Lane wrote:
> A semantics-preserving conversion would have looked something like
> 
>      if (node->sortgrouprefs)
>          WRITE_INDEX_ARRAY(sortgrouprefs, list_length(node->exprs));
> 
> I suppose that Peter was trying to remove special cases from the
> outfuncs.c code, but do we want to put this one back?  Richard's
> proposal would not accurately reflect the contents of the data
> structure, so I'm not too thrilled with it.

I think we could put the if (node->fldname) inside the WRITE_INDEX_ARRAY 
macro.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Fix NULL pointer reference in _outPathTarget()
Next
From: Alvaro Herrera
Date:
Subject: Re: generalized conveyor belt storage