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:09 +0000 (16:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 25 Apr 2006 16:54:09 +0000 (16:54 +0000)
commit1e3593ce1666d9eedd0272ae26cd43810810d305
tree533e57e17803f10ed84e2041504d906b0719a3d7
parentff49a020caef4100719807ae641ed29b85968a93
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