diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-08-16 02:17:58 +0000 |
commit | e6381966c1886badbc19c94ac1f1ffbc104125ab (patch) | |
tree | 9da3d5d073dcb4cff68bdb69f6118409b5315512 /src/backend/optimizer/path/orindxpath.c | |
parent | 08320bfb22b3ef006885de91f5163ef5fe831889 (diff) |
Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars). This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases. I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
Diffstat (limited to 'src/backend/optimizer/path/orindxpath.c')
-rw-r--r-- | src/backend/optimizer/path/orindxpath.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index 450b8d7b2dc..51699a73d21 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.31 1999/07/27 03:51:02 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.32 1999/08/16 02:17:52 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -66,12 +66,12 @@ create_or_index_paths(Query *root, * saved by create_index_paths(). */ if (restriction_is_or_clause(clausenode) && - clausenode->indexids) + clausenode->subclauseindices) { bool all_indexable = true; List *temp; - foreach(temp, clausenode->indexids) + foreach(temp, clausenode->subclauseindices) { if (lfirst(temp) == NIL) { @@ -94,7 +94,7 @@ create_or_index_paths(Query *root, best_or_subclause_indices(root, rel, clausenode->clause->args, - clausenode->indexids, + clausenode->subclauseindices, &indexquals, &indexids, &cost, @@ -102,20 +102,17 @@ create_or_index_paths(Query *root, pathnode->path.pathtype = T_IndexScan; pathnode->path.parent = rel; - pathnode->path.pathorder = makeNode(PathOrder); - pathnode->path.pathorder->ordtype = SORTOP_ORDER; - /* * This is an IndexScan, but the overall result will consist * of tuples extracted in multiple passes (one for each * subclause of the OR), so the result cannot be claimed * to have any particular ordering. */ - pathnode->path.pathorder->ord.sortop = NULL; pathnode->path.pathkeys = NIL; - pathnode->indexqual = indexquals; pathnode->indexid = indexids; + pathnode->indexqual = indexquals; + pathnode->joinrelids = NIL; /* no join clauses here */ pathnode->path.path_cost = cost; clausenode->selectivity = (Cost) selec; |