| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> | 
| Cc: | Richard Guo <guofenglinux(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Fix NULL pointer reference in _outPathTarget() | 
| Date: | 2022-04-20 16:53:50 | 
| Message-ID: | 2841407.1650473630@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> 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 think we could put the if (node->fldname) inside the WRITE_INDEX_ARRAY 
> macro.
Yeah, that's another way to do it.  I think though that the unresolved
question is whether or not we want the field name to appear in the output
when the field is null.  I believe that I intentionally made it not appear
originally, so that that case could readily be distinguished.  You could
argue that that would complicate life greatly for a _readPathTarget()
function, which is true, but I don't foresee that we'll need one.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nathan Bossart | 2022-04-20 17:02:24 | Re: using an end-of-recovery record in all cases | 
| Previous Message | Pavel Stehule | 2022-04-20 16:53:33 | Re: Query generates infinite loop |