Hi,
On 2023-02-25 14:45:33 -0500, Tom Lane wrote:
> Done like that.
Thanks!
Your commit message referenced commit 3f7323cbb, which contains:
That technique is borrowed from the far older code that supports
initplans, and it works okay in that case because the cloned SubPlan nodes
are essentially identical. So it doesn't matter which one of the clones
the shared ParamExecData.execPlan field might point to.
Out of curiosity: Are there cases where we actually overwrite execPlan for
initplans? I couldn't find any with a quick assertion. ISTM that that largely
should be prevented by initplans being initialized once, in ExecInitNode(). Do
we have cases where the same initplan (with the same paramids, obviously), is
used by multiple nodes?
Greetings,
Andres Freund