Adjust indexscan planning logic to keep RestrictInfo nodes associated
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Jan 2004 23:39:54 +0000 (23:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 5 Jan 2004 23:39:54 +0000 (23:39 +0000)
commitfa559a86eec2ae90fd63fd7e6563e42f7dc619e0
treea43de4df13060be5df59c38d7b3b9a5e47069e05
parent5d472f64647346a44af6ab2ab9ca70cadf9fe788
Adjust indexscan planning logic to keep RestrictInfo nodes associated
with index qual clauses in the Path representation.  This saves a little
work during createplan and (probably more importantly) allows reuse of
cached selectivity estimates during indexscan planning.  Also fix latent
bug: wrong plan would have been generated for a 'special operator' used
in a nestloop-inner-indexscan join qual, because the special operator
would not have gotten into the list of quals to recheck.  This bug is
only latent because at present the special-operator code could never
trigger on a join qual, but sooner or later someone will want to do it.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/orindxpath.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/restrictinfo.c
src/backend/utils/adt/selfuncs.c
src/include/nodes/relation.h
src/include/optimizer/paths.h
src/include/optimizer/restrictinfo.h