Re: Fix NULL pointer reference in _outPathTarget()

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix NULL pointer reference in _outPathTarget()
Date: 2022-04-20 16:04:00
Message-ID: 29996e3b-0bae-96df-b8f7-201ee578299c@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-04-20 16:07:55 Re: generalized conveyor belt storage
Previous Message Peter Eisentraut 2022-04-20 16:02:47 Re: Fix NULL pointer reference in _outPathTarget()