pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)'

Поиск
Список
Период
Сортировка
От tgl@svr1.postgresql.org (Tom Lane)
Тема pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)'
Дата
Msg-id 20050715170950.9DE0652D0F@svr1.postgresql.org
обсуждение исходный текст
Список 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.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/util:
        pathnode.c (r1.111 -> r1.111.4.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/util/pathnode.c.diff?r1=1.111&r2=1.111.4.1)
    pgsql/src/test/regress/expected:
        subselect.out (r1.10.4.2 -> r1.10.4.3)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/subselect.out.diff?r1=1.10.4.2&r2=1.10.4.3)
    pgsql/src/test/regress/sql:
        subselect.sql (r1.7 -> r1.7.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/subselect.sql.diff?r1=1.7&r2=1.7.4.1)

В списке pgsql-committers по дате отправления:

Предыдущее
От: tgl@svr1.postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Fix overenthusiastic optimization of 'x IN (SELECT DISTINCT ...)'
Следующее
От: tgl@svr1.postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Check for out-of-range varoattno in deparse_context_for_subplan.