From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | Tender Wang <tndrwang(at)gmail(dot)com>, exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18422: Assert in expandTupleDesc() fails on row mismatch with additional SRF |
Date: | 2024-04-11 14:13:15 |
Message-ID: | 170712.1712844795@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Richard Guo <guofenglinux(at)gmail(dot)com> writes:
> On Wed, Apr 10, 2024 at 10:16 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Wilco. Another thing I was considering, but didn't pull the trigger
>> on in the draft patch, was to introduce a funcapi.c function on the
>> order of
>> get_expr_result_rtfunc(RangeTblFunction *rtfunc, ...)
>> which would encapsulate applying either BuildDescFromLists or
>> get_expr_result_type.
> Do you think we can have a parameter in the new get_expr_result_rtfunc()
> function to indicate whether we want to build an intermediate tupdesc
> when we have a coldeflist? Then we can set it to true in the two places
> that are correct already, and set it to false at the places we need to
> fix. But I'm not sure if including such a new parameter would be an
> improvement or just make it worse.
I did think about that, but it seems mighty weird. The semantics of
the flag would have to be something like "I want a tupdesc when the
result type is COMPOSITE, but not when it's RECORD", which seems
rather arbitrary.
Perhaps it'd be sufficient to add a note to the header comment of
get_expr_result_type warning about when not to use it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-04-11 15:38:43 | Re: FSM Corruption (was: Could not read block at end of the relation) |
Previous Message | Devrim Gündüz | 2024-04-11 11:32:53 | Re: BUG #18427: RPM postgis33_15-3.3.6-3PGDG.rhel9.x86_64.rpm not signed |