From: Bruce Momjian Date: Mon, 10 Aug 1998 04:49:39 +0000 (+0000) Subject: Cleanups of optimizer. X-Git-Tag: REL6_4_2~682 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=956b91a9440ad6656e2ef30db8e22628b12b9aa5;p=postgresql Cleanups of optimizer. --- diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 9e71ef402d..7344709037 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.20 1998/08/10 02:26:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.21 1998/08/10 04:49:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -117,12 +117,11 @@ find_rel_paths(Query *root, List *rels) sequential_scan_list = lcons(create_seqscan_path(rel), NIL); - rel_index_scan_list = - find_index_paths(root, - rel, - find_relation_indices(root, rel), - rel->clauseinfo, - rel->joininfo); + rel_index_scan_list = find_index_paths(root, + rel, + find_relation_indices(root, rel), + rel->clauseinfo, + rel->joininfo); or_index_scan_list = create_or_index_paths(root, rel, rel->clauseinfo); diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index e7a2e3c1a2..d62c92e283 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.26 1998/08/10 02:26:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.27 1998/08/10 04:49:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -602,7 +602,6 @@ match_clause_to_indexkey(RelOptInfo *rel, */ if (!join) { - /* * Check for standard s-argable clause */ @@ -610,12 +609,11 @@ match_clause_to_indexkey(RelOptInfo *rel, (rightop && IsA(rightop, Param))) { restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno; - isIndexable = - (op_class(restrict_op, xclass, index->relam) && - IndexScanableOperand(leftop, - indexkey, - rel, - index)); + isIndexable = (op_class(restrict_op, xclass, index->relam) && + IndexScanableOperand(leftop, + indexkey, + rel, + index)); } /* diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 91946cc509..7cbd1879e5 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.25 1998/08/10 02:26:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.26 1998/08/10 04:49:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -276,6 +276,7 @@ subplanner(Query *root, * the exhaustive path search. */ init_join_info(root->base_rel_list); + final_rel_list = find_paths(root, root->base_rel_list); if (final_rel_list)