Fix mishandling of whole-row Vars referencing a view or sub-select.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f685cbbac849064a170375e41fc36ad517f6210c
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-06-21T00:14:48Z
Releases: 9.0.0
Fix mishandling of whole-row Vars referencing a view or sub-select.
If such a Var appeared within a nested sub-select, we failed to translate it
correctly during pullup of the view, because the recursive call to
replace_rte_variables_mutator was looking for the wrong sublevels_up value.
Bug was introduced during the addition of the PlaceHolderVar mechanism.
Per bug #5514 from Marcos Castedo.

Files