pgsql: The 8.1 planner removes WHERE quals from the plan when the quals - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: The 8.1 planner removes WHERE quals from the plan when the quals
Date
Msg-id 20060425165427.18A7711F609A@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
The 8.1 planner removes WHERE quals from the plan when the quals are
implied by the predicate of a partial index being used to scan a table.
However, this optimization is unsafe in an UPDATE, DELETE, or SELECT FOR
UPDATE query, because the quals need to be rechecked by EvalPlanQual if
there's an update conflict.  Per example from Jean-Samuel Reynaud.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/plan:
        createplan.c (r1.202.2.2 -> r1.202.2.3)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/plan/createplan.c.diff?r1=1.202.2.2&r2=1.202.2.3)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: The 8.1 planner removes WHERE quals from the plan when the quals
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Back out the rest of the RESET CONNECTION patch.