diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-23 00:43:13 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-12-23 00:43:13 +0000 |
commit | a78fcfb5124379532ce35f3076679f04bd987d60 (patch) | |
tree | 345204410d4f015a9d20ff55ecc38de3d371c459 /src/backend/optimizer/util/pathnode.c | |
parent | d31ccb6c3e73901c44865bfce3f5dd20774f7a89 (diff) |
Restructure operator classes to allow improved handling of cross-data-type
cases. Operator classes now exist within "operator families". While most
families are equivalent to a single class, related classes can be grouped
into one family to represent the fact that they are semantically compatible.
Cross-type operators are now naturally adjunct parts of a family, without
having to wedge them into a particular opclass as we had done originally.
This commit restructures the catalogs and cleans up enough of the fallout so
that everything still works at least as well as before, but most of the work
needed to actually improve the planner's behavior will come later. Also,
there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way
to create a new family right now is to allow CREATE OPERATOR CLASS to make
one by default. I owe some more documentation work, too. But that can all
be done in smaller pieces once this infrastructure is in place.
Diffstat (limited to 'src/backend/optimizer/util/pathnode.c')
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 01f3151bee8..5042a3ff563 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.133 2006/10/04 00:29:55 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.134 2006/12/23 00:43:11 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1152,6 +1152,10 @@ create_nestloop_path(PlannerInfo *root, * 'pathkeys' are the path keys of the new join path * 'mergeclauses' are the RestrictInfo nodes to use as merge clauses * (this should be a subset of the restrict_clauses list) + * 'mergefamilies' are the btree opfamily OIDs identifying the merge + * ordering for each merge clause + * 'mergestrategies' are the btree operator strategies identifying the merge + * ordering for each merge clause * 'outersortkeys' are the sort varkeys for the outer relation * 'innersortkeys' are the sort varkeys for the inner relation */ @@ -1164,6 +1168,8 @@ create_mergejoin_path(PlannerInfo *root, List *restrict_clauses, List *pathkeys, List *mergeclauses, + List *mergefamilies, + List *mergestrategies, List *outersortkeys, List *innersortkeys) { @@ -1204,6 +1210,8 @@ create_mergejoin_path(PlannerInfo *root, pathnode->jpath.joinrestrictinfo = restrict_clauses; pathnode->jpath.path.pathkeys = pathkeys; pathnode->path_mergeclauses = mergeclauses; + pathnode->path_mergefamilies = mergefamilies; + pathnode->path_mergestrategies = mergestrategies; pathnode->outersortkeys = outersortkeys; pathnode->innersortkeys = innersortkeys; |