]> granicus.if.org Git - postgresql/commit
Refactor planner's pathkeys data structure to create a separate, explicit
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Jan 2007 20:45:41 +0000 (20:45 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 20 Jan 2007 20:45:41 +0000 (20:45 +0000)
commitf41803bb39bc2949db200116a609fd242d0ec221
tree2c81bcf712ab8b46133c2f50bbee34b2b3ea7129
parent2b7334d4877ba445003f96b0bb7eed4e7078a39b
Refactor planner's pathkeys data structure to create a separate, explicit
representation of equivalence classes of variables.  This is an extensive
rewrite, but it brings a number of benefits:
* planner no longer fails in the presence of "incomplete" operator families
that don't offer operators for every possible combination of datatypes.
* avoid generating and then discarding redundant equality clauses.
* remove bogus assumption that derived equalities always use operators
named "=".
* mergejoins can work with a variety of sort orders (e.g., descending) now,
instead of tying each mergejoinable operator to exactly one sort order.
* better recognition of redundant sort columns.
* can make use of equalities appearing underneath an outer join.
35 files changed:
doc/src/sgml/xoper.sgml
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/print.c
src/backend/optimizer/README
src/backend/optimizer/path/Makefile
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/equivclass.c [new file with mode: 0644]
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/joininfo.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/relnode.c
src/backend/optimizer/util/restrictinfo.c
src/backend/parser/parse_agg.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/cache/lsyscache.c
src/include/nodes/nodes.h
src/include/nodes/relation.h
src/include/optimizer/joininfo.h
src/include/optimizer/pathnode.h
src/include/optimizer/paths.h
src/include/optimizer/planmain.h
src/include/optimizer/restrictinfo.h
src/include/utils/lsyscache.h