Re: BUG #18422: Assert in expandTupleDesc() fails on row mismatch with additional SRF
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tender Wang <tndrwang@gmail.com>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-04-10T07:58:51Z
Lists: pgsql-bugs
On Wed, Apr 10, 2024 at 11:32 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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. Indeed. I think it would be better to add this same rule to process_function_rte_ref(), or at least write some comments there to explain why it is not necessary to check rtfunc->funccolnames while other places do. Thanks Richard
Commits
-
Fix type-checking of RECORD-returning functions in FROM, redux.
- e0df80828abc 17.0 landed
- e0970862e868 12.19 landed
- cc1eb6a3cccd 16.3 landed
- b6e21cef72f1 13.15 landed
- 78e81e14db79 14.12 landed
- 09989ba84734 15.7 landed