Re: BUG #17606: There is still some glitch in 3f7323cbb fixing failure of MULTIEXPR_SUBLINK
Andre Lin <857348270@qq.com>
From: Andre Lin <857348270@qq.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>, guofenglinux <guofenglinux@gmail.com>
Date: 2022-09-05T16:50:19Z
Lists: pgsql-bugs
> 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. But let's assume that we manage to verify initplan/subplan by adding subLinkId to SubPlan, we still have problem. In short, the exact subqueryid of the new MULTIEXPR Param will be pain in the ass... Consider the UPDATE sql containing sublinks by order like (subplan, initplan, subplan, ...) The existing code "offset = list_length(root->multiexpr_params)" will count initplan into "offset", which is correct when first time here, but it gives wrong subqueryid after...(when the place of initplan should be "skipped")
Commits
-
Further fixes for MULTIEXPR_SUBLINK fix.
- ccbb54c72990 13.9 landed
- 9bcf6fb281de 11.18 landed
- 4d7c0fe51d6b 12.13 landed
- 174c929e3ba0 10.23 landed