]> git.ipfire.org Git - thirdparty/postgresql.git/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:41 +0000 (00:14 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Jul 2010 00:14:41 +0000 (00:14 +0000)
commit1cf269cf99b59da9693d95f1c66bccdce11fac4c
tree08d6dbf36821bc318857137220342478ac6ad50d
parent97f29c865f4332d48465735b22a42d9b0deacd12
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