Tom Lane wrote:
> So, the attached patch just bites the bullet and adds explicit output
> tlist information to struct Path. I did set things up so that the cost
> is only one pointer in each Path in the typical case where Paths emit
> the set of Vars needed from their relation; in that case, they just
> point to a default PathTarget struct embedded in the parent RelOptInfo.
> A Path emitting something else will need its own PathTarget struct.
Hmm, I wonder if this can be used to attack the problem here in a more
sensible manner:
https://github.com/2ndQuadrant/postgres/commit/e7c5df6b614b542d55588a483dd2ddba3892a0f6
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services