Look into the initPlans attached to lefttree of RemoteSubplan while deciding
authorPavan Deolasee <[email protected]>
Fri, 24 Feb 2017 10:05:24 +0000 (15:35 +0530)
committerPavan Deolasee <[email protected]>
Fri, 24 Feb 2017 10:05:24 +0000 (15:35 +0530)
commit22bcfa3812a25a367ad53862096519d773ff25f1
tree7f3c82f831904247cca9a12b120dd3ce6529c379
parent7e40411483f6f917f8f316b69b26c8c660afc1c0
Look into the initPlans attached to lefttree of RemoteSubplan while deciding
whether correct variables are being referenced

This helps us to fix issue #81. It's not immediately clear if we should handle
this is more elegant manner than what we've done here. In PostgreSQL the
initplans are always attached to the top level plan, but in XL we add a
RemoteSubplan node on top of the top level plan. Unless we take into account
vars generated by the initPlans, we might incorrectly conclude that certain var
is not accessible by the subquery.
src/backend/optimizer/plan/subselect.c