pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)' - Mailing list pgsql-committers

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)'
Date
Msg-id 20050715170927.45D6A528DD@svr1.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        pathnode.c (r1.122 -> r1.123)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c.diff?r1=1.122&r2=1.123)
    pgsql/src/test/regress/expected:
        subselect.out (r1.12 -> r1.13)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/subselect.out.diff?r1=1.12&r2=1.13)
    pgsql/src/test/regress/sql:
        subselect.sql (r1.7 -> r1.8)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/subselect.sql.diff?r1=1.7&r2=1.8)

pgsql-committers by date:

Previous
From: jwp@pgfoundry.org (James William Pye)
Date:
Subject: python - be: Add Python warnings.showwarning overload.
Next
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)'