pgsql: Fix handling of changed-Param signaling for CteScan plan nodes.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix handling of changed-Param signaling for CteScan plan nodes.
Date: 2009-07-06 02:16:14
Message-ID: 20090706021614.7F7BC75331E@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix handling of changed-Param signaling for CteScan plan nodes. We were using
the "cteParam" as a proxy for the possibility that the underlying CTE plan
depends on outer-level variables or Params, but that doesn't work very well
because it sometimes causes calling subqueries to be treated as SubPlans when
they could be InitPlans. This is inefficient and also causes the outright
failure exhibited in bug #4902. Instead, leave the cteParam out of it and
copy the underlying CTE plan's extParams directly. Per bug #4902 from
Marko Tiikkaja.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
pgsql/src/backend/optimizer/plan:
subselect.c (r1.150 -> r1.150.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/subselect.c?r1=1.150&r2=1.150.2.1)
pgsql/src/test/regress/expected:
with.out (r1.10 -> r1.10.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/with.out?r1=1.10&r2=1.10.2.1)
pgsql/src/test/regress/sql:
with.sql (r1.9 -> r1.9.2.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/with.sql?r1=1.9&r2=1.9.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-07-06 02:58:40 pgsql: Per SQL spec (in particular, the grammar in SQL:2008 7.13) we
Previous Message Tom Lane 2009-07-06 02:16:04 pgsql: Fix handling of changed-Param signaling for CteScan plan nodes.