summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path')
-rw-r--r--src/backend/optimizer/path/allpaths.c36
-rw-r--r--src/backend/optimizer/path/costsize.c28
-rw-r--r--src/backend/optimizer/path/indxpath.c8
-rw-r--r--src/backend/optimizer/path/joinpath.c4
-rw-r--r--src/backend/optimizer/path/pathkeys.c36
5 files changed, 56 insertions, 56 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index c1ee656b51..7d8d6a6beb 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.87 2002/08/29 16:03:48 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.88 2002/09/04 20:31:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,14 +43,14 @@ static void set_inherited_rel_pathlist(Query *root, RelOptInfo *rel,
static void set_subquery_pathlist(Query *root, RelOptInfo *rel,
Index rti, RangeTblEntry *rte);
static void set_function_pathlist(Query *root, RelOptInfo *rel,
- RangeTblEntry *rte);
+ RangeTblEntry *rte);
static RelOptInfo *make_one_rel_by_joins(Query *root, int levels_needed,
List *initial_rels);
static bool subquery_is_pushdown_safe(Query *subquery, Query *topquery);
static bool recurse_pushdown_safe(Node *setOp, Query *topquery);
static void subquery_push_qual(Query *subquery, Index rti, Node *qual);
static void recurse_push_qual(Node *setOp, Query *topquery,
- Index rti, Node *qual);
+ Index rti, Node *qual);
/*
@@ -304,9 +304,10 @@ set_subquery_pathlist(Query *root, RelOptInfo *rel,
*
* There are several cases where we cannot push down clauses.
* Restrictions involving the subquery are checked by
- * subquery_is_pushdown_safe(). Also, we do not push down clauses that
- * contain subselects, mainly because I'm not sure it will work correctly
- * (the subplan hasn't yet transformed sublinks to subselects).
+ * subquery_is_pushdown_safe(). Also, we do not push down clauses
+ * that contain subselects, mainly because I'm not sure it will work
+ * correctly (the subplan hasn't yet transformed sublinks to
+ * subselects).
*
* Non-pushed-down clauses will get evaluated as qpquals of the
* SubqueryScan node.
@@ -542,7 +543,7 @@ make_one_rel_by_joins(Query *root, int levels_needed, List *initial_rels)
* quals into it, because that would change the results. For subqueries
* using UNION/UNION ALL/INTERSECT/INTERSECT ALL, we can push the quals
* into each component query, so long as all the component queries share
- * identical output types. (That restriction could probably be relaxed,
+ * identical output types. (That restriction could probably be relaxed,
* but it would take much more code to include type coercion code into
* the quals, and I'm also concerned about possible semantic gotchas.)
*/
@@ -633,14 +634,14 @@ subquery_push_qual(Query *subquery, Index rti, Node *qual)
else
{
/*
- * We need to replace Vars in the qual (which must refer
- * to outputs of the subquery) with copies of the
- * subquery's targetlist expressions. Note that at this
- * point, any uplevel Vars in the qual should have been
- * replaced with Params, so they need no work.
+ * We need to replace Vars in the qual (which must refer to
+ * outputs of the subquery) with copies of the subquery's
+ * targetlist expressions. Note that at this point, any uplevel
+ * Vars in the qual should have been replaced with Params, so they
+ * need no work.
*
- * This step also ensures that when we are pushing into a setop
- * tree, each component query gets its own copy of the qual.
+ * This step also ensures that when we are pushing into a setop tree,
+ * each component query gets its own copy of the qual.
*/
qual = ResolveNew(qual, rti, 0,
subquery->targetList,
@@ -649,10 +650,9 @@ subquery_push_qual(Query *subquery, Index rti, Node *qual)
qual);
/*
- * We need not change the subquery's hasAggs or
- * hasSublinks flags, since we can't be pushing down any
- * aggregates that weren't there before, and we don't push
- * down subselects at all.
+ * We need not change the subquery's hasAggs or hasSublinks flags,
+ * since we can't be pushing down any aggregates that weren't
+ * there before, and we don't push down subselects at all.
*/
}
}
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 11e18c3d0b..9f987a4395 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -42,7 +42,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.89 2002/07/04 15:23:56 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.90 2002/09/04 20:31:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -408,8 +408,8 @@ cost_functionscan(Path *path, Query *root, RelOptInfo *baserel)
/*
* For now, estimate function's cost at one operator eval per function
- * call. Someday we should revive the function cost estimate columns in
- * pg_proc...
+ * call. Someday we should revive the function cost estimate columns
+ * in pg_proc...
*/
cpu_per_tuple = cpu_operator_cost;
@@ -607,7 +607,7 @@ cost_mergejoin(Path *path, Query *root,
double outer_rows,
inner_rows;
double ntuples;
- Selectivity outerscansel,
+ Selectivity outerscansel,
innerscansel;
Path sort_path; /* dummy for result of cost_sort */
@@ -617,15 +617,15 @@ cost_mergejoin(Path *path, Query *root,
/*
* A merge join will stop as soon as it exhausts either input stream.
* Estimate fraction of the left and right inputs that will actually
- * need to be scanned. We use only the first (most significant)
- * merge clause for this purpose.
+ * need to be scanned. We use only the first (most significant) merge
+ * clause for this purpose.
*
- * Since this calculation is somewhat expensive, and will be the same
- * for all mergejoin paths associated with the merge clause, we cache
- * the results in the RestrictInfo node.
+ * Since this calculation is somewhat expensive, and will be the same for
+ * all mergejoin paths associated with the merge clause, we cache the
+ * results in the RestrictInfo node.
*/
firstclause = (RestrictInfo *) lfirst(mergeclauses);
- if (firstclause->left_mergescansel < 0) /* not computed yet? */
+ if (firstclause->left_mergescansel < 0) /* not computed yet? */
mergejoinscansel(root, (Node *) firstclause->clause,
&firstclause->left_mergescansel,
&firstclause->right_mergescansel);
@@ -697,10 +697,10 @@ cost_mergejoin(Path *path, Query *root,
/*
* The number of tuple comparisons needed depends drastically on the
* number of equal keys in the two source relations, which we have no
- * good way of estimating. (XXX could the MCV statistics help?)
- * Somewhat arbitrarily, we charge one tuple
- * comparison (one cpu_operator_cost) for each tuple in the two source
- * relations. This is probably a lower bound.
+ * good way of estimating. (XXX could the MCV statistics help?)
+ * Somewhat arbitrarily, we charge one tuple comparison (one
+ * cpu_operator_cost) for each tuple in the two source relations.
+ * This is probably a lower bound.
*/
run_cost += cpu_operator_cost * (outer_rows + inner_rows);
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 3d9ec2eb23..5595e1aec9 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.121 2002/09/02 06:22:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.122 2002/09/04 20:31:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1332,7 +1332,7 @@ pred_test_simple_clause(Expr *predicate, Node *clause)
test_oper = makeOper(test_op, /* opno */
InvalidOid, /* opid */
BOOLOID, /* opresulttype */
- false); /* opretset */
+ false); /* opretset */
replace_opid(test_oper);
test_expr = make_opclause(test_oper,
(Var *) clause_const,
@@ -1712,7 +1712,7 @@ match_special_index_operator(Expr *clause, Oid opclass,
case OID_BYTEA_LIKE_OP:
isIndexable = pattern_fixed_prefix(patt, Pattern_Type_Like,
- &prefix, &rest) != Pattern_Prefix_None;
+ &prefix, &rest) != Pattern_Prefix_None;
break;
case OID_TEXT_ICLIKE_OP:
@@ -1922,7 +1922,7 @@ expand_indexqual_conditions(List *indexquals)
case OID_CIDR_SUBEQ_OP:
resultquals = nconc(resultquals,
network_prefix_quals(leftop, expr_op,
- patt->constvalue));
+ patt->constvalue));
break;
default:
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index f1e2acac81..8e73bd2f41 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.70 2002/09/02 02:47:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.71 2002/09/04 20:31:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -171,7 +171,7 @@ sort_inner_and_outer(Query *root,
default:
elog(ERROR, "sort_inner_and_outer: unexpected join type %d",
(int) jointype);
- useallclauses = false; /* keep compiler quiet */
+ useallclauses = false; /* keep compiler quiet */
break;
}
diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c
index 5e4aff3247..fc33d5296a 100644
--- a/src/backend/optimizer/path/pathkeys.c
+++ b/src/backend/optimizer/path/pathkeys.c
@@ -11,7 +11,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.39 2002/06/20 20:29:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/pathkeys.c,v 1.40 2002/09/04 20:31:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -519,7 +519,7 @@ build_index_pathkeys(Query *root,
funcnode->funcid = index->indproc;
funcnode->funcresulttype = get_func_rettype(index->indproc);
- funcnode->funcretset = false; /* can never be a set */
+ funcnode->funcretset = false; /* can never be a set */
funcnode->func_fcache = NULL;
while (*indexkeys != 0)
@@ -769,22 +769,22 @@ find_mergeclauses_for_pathkeys(Query *root,
/*
* We can match a pathkey against either left or right side of any
- * mergejoin clause. (We examine both sides since we aren't told if
- * the given pathkeys are for inner or outer input path; no confusion
- * is possible.) Furthermore, if there are multiple matching
- * clauses, take them all. In plain inner-join scenarios we expect
- * only one match, because redundant-mergeclause elimination will
- * have removed any redundant mergeclauses from the input list.
- * However, in outer-join scenarios there might be multiple matches.
- * An example is
+ * mergejoin clause. (We examine both sides since we aren't told
+ * if the given pathkeys are for inner or outer input path; no
+ * confusion is possible.) Furthermore, if there are multiple
+ * matching clauses, take them all. In plain inner-join scenarios
+ * we expect only one match, because redundant-mergeclause
+ * elimination will have removed any redundant mergeclauses from
+ * the input list. However, in outer-join scenarios there might be
+ * multiple matches. An example is
*
- * select * from a full join b on
- * a.v1 = b.v1 and a.v2 = b.v2 and a.v1 = b.v2;
+ * select * from a full join b on a.v1 = b.v1 and a.v2 = b.v2 and
+ * a.v1 = b.v2;
*
- * Given the pathkeys ((a.v1), (a.v2)) it is okay to return all
- * three clauses (in the order a.v1=b.v1, a.v1=b.v2, a.v2=b.v2)
- * and indeed we *must* do so or we will be unable to form a
- * valid plan.
+ * Given the pathkeys ((a.v1), (a.v2)) it is okay to return all three
+ * clauses (in the order a.v1=b.v1, a.v1=b.v2, a.v2=b.v2) and
+ * indeed we *must* do so or we will be unable to form a valid
+ * plan.
*/
foreach(j, restrictinfos)
{
@@ -812,8 +812,8 @@ find_mergeclauses_for_pathkeys(Query *root,
break;
/*
- * If we did find usable mergeclause(s) for this sort-key position,
- * add them to result list.
+ * If we did find usable mergeclause(s) for this sort-key
+ * position, add them to result list.
*/
mergeclauses = nconc(mergeclauses, matched_restrictinfos);
}