]> 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:50 +0000 (17:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Jul 2005 17:09:50 +0000 (17:09 +0000)
commit1e31942a3317b1a31c90c5e6ab6ef3b8760f1063
tree52ca41a1d86b07e5b8480528cc7a390cad2a0719
parent35a0fc32f537bf6dbbdf53a8523ead01704ec8b4
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