]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix mishandling of whole-row Vars referencing a view or sub-select.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jun 2010 00:14:54 +0000 (00:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 21 Jun 2010 00:14:54 +0000 (00:14 +0000)
commitc4ac2ff765d9b68a3ff2a3461804489721770d06
treefe33b973981b0382f56cbd3479422b75ecf3aa65
parent5238a5ad45f021ce76b350c9d14da57518e9bafe
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.
src/backend/optimizer/prep/prepjointree.c
src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql