]> granicus.if.org Git - postgresql/commit
Fix "cannot handle unplanned sub-select" error that can occur when a
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Jul 2010 00:14:10 +0000 (00:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Jul 2010 00:14:10 +0000 (00:14 +0000)
commit1f1d13beaba40d092e4c7a337f6f1e01db2a2606
tree24540e48f73b72cbf442489c673da85aea216444
parent0f0b236b0311fc78f37cfb526685a8a105643f6d
Fix "cannot handle unplanned sub-select" error that can occur when a
sub-select contains a join alias reference that expands into an expression
containing another sub-select.  Per yesterday's report from Merlin Moncure
and subsequent off-list investigation.

Back-patch to 7.4.  Older versions didn't attempt to flatten sub-selects in
ways that would trigger this problem.
src/backend/optimizer/util/var.c
src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql