Andres Freund writes:
> Basically the issue is that in queries with two CTEs we can, at least
> currently, end up with a WorkTable scans on a CTE we've not yet initialized,
> due to the WorkTable scan of one CTE appearing in the other. Thus
> ExecInitRecursiveUnion() hasn't yet set up the param we
Hi,
while looking at fixing [1], I again came across the fact that we don't
initialize the projection etc during ExecInitWorkTableScan(), but do so during
the first call to ExecWorkTableScan().
This is explained with the following comment:
/*
* On the first call, find the ancest