Re: BUG #18422: Assert in expandTupleDesc() fails on row mismatch with additional SRF

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-04-10T03:32:17Z
Lists: pgsql-bugs
Richard Guo <guofenglinux@gmail.com> writes:
> I wonder why the v2 patch does not apply this same rule in
> process_function_rte_ref(), by checking if the 'rtfunc' has a coldeflist
> before it calls get_expr_result_tupdesc.

I guess we could.  It won't matter because the following code will
reject RECORD in any case; but we could save a few cycles by not
calling get_expr_result_tupdesc there.

			regards, tom lane



Commits

  1. Fix type-checking of RECORD-returning functions in FROM, redux.