Обсуждение: pgsql: Fix mishandling of whole-row Vars referencing a view or

Поиск
Список
Период
Сортировка

pgsql: Fix mishandling of whole-row Vars referencing a view or

От
tgl@postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Fix mishandling of whole-row Vars referencing a view or sub-select.
If such a Var appeared within a nested sub-select, we failed to translate it
correctly during pullup of the view, because the recursive call to
replace_rte_variables_mutator was looking for the wrong sublevels_up value.
Bug was introduced during the addition of the PlaceHolderVar mechanism.
Per bug #5514 from Marcos Castedo.

Modified Files:
--------------
    pgsql/src/backend/optimizer/prep:
        prepjointree.c (r1.71 -> r1.72)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepjointree.c?r1=1.71&r2=1.72)
    pgsql/src/test/regress/expected:
        subselect.out (r1.22 -> r1.23)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/subselect.out?r1=1.22&r2=1.23)
    pgsql/src/test/regress/sql:
        subselect.sql (r1.14 -> r1.15)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/subselect.sql?r1=1.14&r2=1.15)