diff options
Diffstat (limited to 'src/backend/optimizer/util')
-rw-r--r-- | src/backend/optimizer/util/clauses.c | 64 | ||||
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 4 | ||||
-rw-r--r-- | src/backend/optimizer/util/predtest.c | 12 | ||||
-rw-r--r-- | src/backend/optimizer/util/relnode.c | 8 | ||||
-rw-r--r-- | src/backend/optimizer/util/restrictinfo.c | 10 |
5 files changed, 49 insertions, 49 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 91bdb3537e7..cb1735725a7 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.285 2010/02/14 18:42:15 rhaas Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/clauses.c,v 1.286 2010/02/26 02:00:46 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -106,7 +106,7 @@ static List *add_function_defaults(List *args, Oid result_type, eval_const_expressions_context *context); static List *fetch_function_defaults(HeapTuple func_tuple); static void recheck_cast_function_args(List *args, Oid result_type, - HeapTuple func_tuple); + HeapTuple func_tuple); static Expr *evaluate_function(Oid funcid, Oid result_type, int32 result_typmod, List *args, HeapTuple func_tuple, @@ -2127,14 +2127,14 @@ eval_const_expressions_mutator(Node *node, ListCell *lc; /* - * Reduce constants in the FuncExpr's arguments, and check to see - * if there are any named args. + * Reduce constants in the FuncExpr's arguments, and check to see if + * there are any named args. */ args = NIL; has_named_args = false; foreach(lc, expr->args) { - Node *arg = (Node *) lfirst(lc); + Node *arg = (Node *) lfirst(lc); arg = eval_const_expressions_mutator(arg, context); if (IsA(arg, NamedArgExpr)) @@ -2158,8 +2158,8 @@ eval_const_expressions_mutator(Node *node, /* * The expression cannot be simplified any further, so build and * return a replacement FuncExpr node using the possibly-simplified - * arguments. Note that we have also converted the argument list - * to positional notation. + * arguments. Note that we have also converted the argument list to + * positional notation. */ newexpr = makeNode(FuncExpr); newexpr->funcid = expr->funcid; @@ -3219,16 +3219,16 @@ simplify_boolean_equality(Oid opno, List *args) if (opno == BooleanEqualOperator) { if (DatumGetBool(((Const *) leftop)->constvalue)) - return rightop; /* true = foo */ + return rightop; /* true = foo */ else - return make_notclause(rightop); /* false = foo */ + return make_notclause(rightop); /* false = foo */ } else { if (DatumGetBool(((Const *) leftop)->constvalue)) - return make_notclause(rightop); /* true <> foo */ + return make_notclause(rightop); /* true <> foo */ else - return rightop; /* false <> foo */ + return rightop; /* false <> foo */ } } if (rightop && IsA(rightop, Const)) @@ -3237,16 +3237,16 @@ simplify_boolean_equality(Oid opno, List *args) if (opno == BooleanEqualOperator) { if (DatumGetBool(((Const *) rightop)->constvalue)) - return leftop; /* foo = true */ + return leftop; /* foo = true */ else - return make_notclause(leftop); /* foo = false */ + return make_notclause(leftop); /* foo = false */ } else { if (DatumGetBool(((Const *) rightop)->constvalue)) - return make_notclause(leftop); /* foo <> true */ + return make_notclause(leftop); /* foo <> true */ else - return leftop; /* foo <> false */ + return leftop; /* foo <> false */ } } return NULL; @@ -3340,7 +3340,7 @@ reorder_function_arguments(List *args, Oid result_type, HeapTuple func_tuple, i = 0; foreach(lc, args) { - Node *arg = (Node *) lfirst(lc); + Node *arg = (Node *) lfirst(lc); if (!IsA(arg, NamedArgExpr)) { @@ -3358,13 +3358,13 @@ reorder_function_arguments(List *args, Oid result_type, HeapTuple func_tuple, } /* - * Fetch default expressions, if needed, and insert into array at - * proper locations (they aren't necessarily consecutive or all used) + * Fetch default expressions, if needed, and insert into array at proper + * locations (they aren't necessarily consecutive or all used) */ defargnumbers = NULL; if (nargsprovided < pronargs) { - List *defaults = fetch_function_defaults(func_tuple); + List *defaults = fetch_function_defaults(func_tuple); i = pronargs - funcform->pronargdefaults; foreach(lc, defaults) @@ -3390,10 +3390,10 @@ reorder_function_arguments(List *args, Oid result_type, HeapTuple func_tuple, recheck_cast_function_args(args, result_type, func_tuple); /* - * Lastly, we have to recursively simplify the defaults we just added - * (but don't recurse on the args passed in, as we already did those). - * This isn't merely an optimization, it's *necessary* since there could - * be functions with named or defaulted arguments down in there. + * Lastly, we have to recursively simplify the defaults we just added (but + * don't recurse on the args passed in, as we already did those). This + * isn't merely an optimization, it's *necessary* since there could be + * functions with named or defaulted arguments down in there. * * Note that we do this last in hopes of simplifying any typecasts that * were added by recheck_cast_function_args --- there shouldn't be any new @@ -3448,10 +3448,10 @@ add_function_defaults(List *args, Oid result_type, HeapTuple func_tuple, recheck_cast_function_args(args, result_type, func_tuple); /* - * Lastly, we have to recursively simplify the defaults we just added - * (but don't recurse on the args passed in, as we already did those). - * This isn't merely an optimization, it's *necessary* since there could - * be functions with named or defaulted arguments down in there. + * Lastly, we have to recursively simplify the defaults we just added (but + * don't recurse on the args passed in, as we already did those). This + * isn't merely an optimization, it's *necessary* since there could be + * functions with named or defaulted arguments down in there. * * Note that we do this last in hopes of simplifying any typecasts that * were added by recheck_cast_function_args --- there shouldn't be any new @@ -4191,11 +4191,11 @@ inline_set_returning_function(PlannerInfo *root, RangeTblEntry *rte) oldcxt = MemoryContextSwitchTo(mycxt); /* - * Run eval_const_expressions on the function call. This is necessary - * to ensure that named-argument notation is converted to positional - * notation and any default arguments are inserted. It's a bit of - * overkill for the arguments, since they'll get processed again later, - * but no harm will be done. + * Run eval_const_expressions on the function call. This is necessary to + * ensure that named-argument notation is converted to positional notation + * and any default arguments are inserted. It's a bit of overkill for the + * arguments, since they'll get processed again later, but no harm will be + * done. */ fexpr = (FuncExpr *) eval_const_expressions(root, (Node *) fexpr); diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 3f6aec023da..a2ebe0d8ed3 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.156 2010/01/02 16:57:48 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.157 2010/02/26 02:00:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1224,7 +1224,7 @@ create_noop_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath) { NoOpPath *pathnode = makeNode(NoOpPath); - pathnode->path.pathtype = T_Join; /* by convention */ + pathnode->path.pathtype = T_Join; /* by convention */ pathnode->path.parent = rel; pathnode->path.startup_cost = subpath->startup_cost; pathnode->path.total_cost = subpath->total_cost; diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index 97d7e94f326..66d3a7498fe 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/predtest.c,v 1.32 2010/02/25 20:59:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/predtest.c,v 1.33 2010/02/26 02:00:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -657,10 +657,10 @@ predicate_refuted_by_recurse(Node *clause, Node *predicate) /* * If A is a strong NOT-clause, A R=> B if B equals A's arg * - * We cannot make the stronger conclusion that B is refuted if - * B implies A's arg; that would only prove that B is not-TRUE, - * not that it's not NULL either. Hence use equal() rather than - * predicate_implied_by_recurse(). We could do the latter if we + * We cannot make the stronger conclusion that B is refuted if B + * implies A's arg; that would only prove that B is not-TRUE, not + * that it's not NULL either. Hence use equal() rather than + * predicate_implied_by_recurse(). We could do the latter if we * ever had a need for the weak form of refutation. */ not_arg = extract_strong_not_arg(clause); @@ -1678,7 +1678,7 @@ get_btree_test_op(Oid pred_op, Oid clause_op, bool refute_it) else if (OidIsValid(clause_op_negator)) { clause_tuple = SearchSysCache2(AMOPOPID, - ObjectIdGetDatum(clause_op_negator), + ObjectIdGetDatum(clause_op_negator), ObjectIdGetDatum(opfamily_id)); if (HeapTupleIsValid(clause_tuple)) { diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c index ea27058766f..f99d0ad1fb1 100644 --- a/src/backend/optimizer/util/relnode.c +++ b/src/backend/optimizer/util/relnode.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.97 2010/01/02 16:57:48 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/relnode.c,v 1.98 2010/02/26 02:00:47 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -404,9 +404,9 @@ build_join_rel(PlannerInfo *root, /* * Also, if dynamic-programming join search is active, add the new joinrel - * to the appropriate sublist. Note: you might think the Assert on - * number of members should be for equality, but some of the level 1 - * rels might have been joinrels already, so we can only assert <=. + * to the appropriate sublist. Note: you might think the Assert on number + * of members should be for equality, but some of the level 1 rels might + * have been joinrels already, so we can only assert <=. */ if (root->join_rel_level) { diff --git a/src/backend/optimizer/util/restrictinfo.c b/src/backend/optimizer/util/restrictinfo.c index 16504d90111..caa3cd77c0d 100644 --- a/src/backend/optimizer/util/restrictinfo.c +++ b/src/backend/optimizer/util/restrictinfo.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.62 2010/01/02 16:57:48 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/util/restrictinfo.c,v 1.63 2010/02/26 02:00:49 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -292,15 +292,15 @@ make_restrictinfos_from_actual_clauses(PlannerInfo *root, foreach(l, clause_list) { - Expr *clause = (Expr *) lfirst(l); - bool pseudoconstant; + Expr *clause = (Expr *) lfirst(l); + bool pseudoconstant; RestrictInfo *rinfo; /* * It's pseudoconstant if it contains no Vars and no volatile * functions. We probably can't see any sublinks here, so - * contain_var_clause() would likely be enough, but for safety - * use contain_vars_of_level() instead. + * contain_var_clause() would likely be enough, but for safety use + * contain_vars_of_level() instead. */ pseudoconstant = !contain_vars_of_level((Node *) clause, 0) && |