pgsql: While doing the final setrefs.c pass over a plan tree, try to

Поиск
Список
Период
Сортировка
От tgl@postgresql.org (Tom Lane)
Тема pgsql: While doing the final setrefs.c pass over a plan tree, try to
Дата
Msg-id 20091116180447.A1E1F753FB7@cvs.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
While doing the final setrefs.c pass over a plan tree, try to match up
non-Var sort/group expressions using ressortgroupref labels instead of
depending entirely on equal()-ity of the upper node's tlist expressions
to the lower node's.  This avoids emitting the wrong outputs in cases
where there are textually identical volatile sort/group expressions,
as for example
    select distinct random(),random() from generate_series(1,10);
Per report from Andrew Gierth.

Backpatch to 8.4.  Arguably this is wrong all the way back, but the only known
case where there's an observable problem is when using hash aggregation to
implement DISTINCT, which is new as of 8.4.  So for the moment I'll refrain
from backpatching further.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        setrefs.c (r1.150 -> r1.150.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/setrefs.c?r1=1.150&r2=1.150.2.1)

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

Предыдущее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: While doing the final setrefs.c pass over a plan tree, try to
Следующее
От: tgl@postgresql.org (Tom Lane)
Дата:
Сообщение: pgsql: Provide a parenthesized-options syntax for VACUUM, analogous to