]> granicus.if.org Git - postgresql/commit
Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)' and related
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Jul 2005 17:09:26 +0000 (17:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Jul 2005 17:09:26 +0000 (17:09 +0000)
commit0182951bc86e3ce6f8386c24829c0a5931d5124b
treec5e26fba7c6baf91469e3ed3584b522edf07a210
parentaa1110624c08298393dfce996f7b21809d98d3fd
Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)' and related
cases: we can't just consider whether the subquery's output is unique on its
own terms, we have to check whether the set of output columns we are going to
use will be unique.  Per complaint from Luca Pireddu and test case from
Michael Fuhr.
src/backend/optimizer/util/pathnode.c
src/test/regress/expected/subselect.out
src/test/regress/sql/subselect.sql