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

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix mishandling of whole-row Vars referencing a view or
Date: 2010-06-21 00:14:54
Message-ID: 20100621001454.D8A847541D4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
pgsql/src/backend/optimizer/prep:
prepjointree.c (r1.66.2.1 -> r1.66.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/prep/prepjointree.c?r1=1.66.2.1&r2=1.66.2.2)
pgsql/src/test/regress/expected:
subselect.out (r1.22 -> r1.22.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/subselect.out?r1=1.22&r2=1.22.2.1)
pgsql/src/test/regress/sql:
subselect.sql (r1.14 -> r1.14.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/subselect.sql?r1=1.14&r2=1.14.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-06-21 09:47:29 pgsql: In a PL/pgSQL "FOR cursor" statement, the statements executed in
Previous Message Tom Lane 2010-06-21 00:14:48 pgsql: Fix mishandling of whole-row Vars referencing a view or