Re: BUG #17606: There is still some glitch in 3f7323cbb fixing failure of MULTIEXPR_SUBLINK
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: 857348270@qq.com,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-09-05T16:18:04Z
Lists: pgsql-bugs
I wrote: > No, that'll malfunction if there's a mix of initplan and subplan > MULTIEXPRs. I think we're going to have to bite the bullet and find a way > to discover the SubLinkIds of the non-initplan MULTIEXPRs, so that the > second loop can identify which Params to change and which not to. > AFAIR that info's no longer available by the time we get here, so > I imagine that a fix will require recording some more data during > SubLink-to-SubPlan conversion. After contemplating that for awhile, by far the least painful way seems to be to add the subLinkId to struct SubPlan. We can get away with that in the back branches as long as we add it at the end, since SubPlans don't get recorded in the catalogs. regards, tom lane
Commits
-
Further fixes for MULTIEXPR_SUBLINK fix.
- ccbb54c72990 13.9 landed
- 9bcf6fb281de 11.18 landed
- 4d7c0fe51d6b 12.13 landed
- 174c929e3ba0 10.23 landed