]> granicus.if.org Git - postgresql/commit
Change the planner-to-executor API so that the planner tells the executor
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 Jan 2007 18:06:05 +0000 (18:06 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 Jan 2007 18:06:05 +0000 (18:06 +0000)
commita191a169d6d0b9558da4519e66510c4540204a51
treecd32b62bc013145015f4932fef1f7687737205b3
parent5f6d735356c9090d87e184c9322bfe37a165a014
Change the planner-to-executor API so that the planner tells the executor
which comparison operators to use for plan nodes involving tuple comparison
(Agg, Group, Unique, SetOp).  Formerly the executor looked up the default
equality operator for the datatype, which was really pretty shaky, since it's
possible that the data being fed to the node is sorted according to some
nondefault operator class that could have an incompatible idea of equality.
The planner knows what it has sorted by and therefore can provide the right
equality operator to use.  Also, this change moves a couple of catalog lookups
out of the executor and into the planner, which should help startup time for
pre-planned queries by some small amount.  Modify the planner to remove some
other cavalier assumptions about always being able to use the default
operators.  Also add "nulls first/last" info to the Plan node for a mergejoin
--- neither the executor nor the planner can cope yet, but at least the API is
in place.
25 files changed:
src/backend/executor/execGrouping.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeGroup.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeUnique.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/pathnode.c
src/backend/parser/parse_clause.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/sort/tuplesort.c
src/include/executor/executor.h
src/include/nodes/plannodes.h
src/include/nodes/relation.h
src/include/optimizer/pathnode.h
src/include/optimizer/planmain.h
src/include/utils/lsyscache.h