]> granicus.if.org Git - postgresql/commit
The 8.1 planner removes WHERE quals from the plan when the quals are
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Apr 2006 16:54:26 +0000 (16:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Apr 2006 16:54:26 +0000 (16:54 +0000)
commit4454eead14a9c96321bde15d0de7615d7c659dad
tree5efba4ddbcfaaf7ca8b491bf1a3af13851709f5c
parent2c4abf11e1c28d908eca1ab2006641a472ba6664
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.
src/backend/optimizer/plan/createplan.c