1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-09 06:21:09 +03:00

Cleanup of source files where 'return' or 'var =' is alone on a line.

This commit is contained in:
Bruce Momjian
1999-02-03 21:18:02 +00:00
parent 3982368a4e
commit 9322950aa4
101 changed files with 422 additions and 743 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.10 1999/02/03 20:15:39 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.11 1999/02/03 21:16:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -183,8 +183,7 @@ get_opnos(List *restrictinfo_list)
foreach(i, restrictinfo_list)
{
temp = (RestrictInfo *) lfirst(i);
result =
lappendi(result,
result = lappendi(result,
(((Oper *) temp->clause->oper)->opno));
}
return result;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.27 1999/01/24 00:28:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.28 1999/02/03 21:16:51 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -83,8 +83,7 @@ make_clause(int type, Node *oper, List *args)
bool
is_opclause(Node *clause)
{
return
(clause != NULL &&
return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR);
}
@@ -144,8 +143,7 @@ get_rightop(Expr *clause)
static bool
agg_clause(Node *clause)
{
return
(clause != NULL && nodeTag(clause) == T_Aggref);
return (clause != NULL && nodeTag(clause) == T_Aggref);
}
/*****************************************************************************
@@ -161,8 +159,7 @@ agg_clause(Node *clause)
bool
is_funcclause(Node *clause)
{
return
(clause != NULL &&
return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == FUNC_EXPR);
}
@@ -234,8 +231,7 @@ make_orclause(List *orclauses)
bool
not_clause(Node *clause)
{
return
(clause != NULL &&
return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == NOT_EXPR);
}
@@ -283,8 +279,7 @@ get_notclausearg(Expr *notclause)
bool
and_clause(Node *clause)
{
return
(clause != NULL &&
return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == AND_EXPR);
}
@@ -321,8 +316,7 @@ make_andclause(List *andclauses)
bool
case_clause(Node *clause)
{
return
(clause != NULL &&
return (clause != NULL &&
nodeTag(clause) == T_CaseExpr);
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.8 1998/09/21 02:25:21 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.9 1999/02/03 21:16:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,22 +43,19 @@ equal_path_path_ordering(PathOrder *path_ordering1,
else if (path_ordering1->ordtype == SORTOP_ORDER &&
path_ordering2->ordtype == SORTOP_ORDER)
{
return
(equal_sortops_order(path_ordering1->ord.sortop,
return (equal_sortops_order(path_ordering1->ord.sortop,
path_ordering2->ord.sortop));
}
else if (path_ordering1->ordtype == MERGE_ORDER &&
path_ordering2->ordtype == SORTOP_ORDER)
{
return (path_ordering2->ord.sortop &&
(path_ordering1->ord.merge->left_operator ==
path_ordering2->ord.sortop[0]));
(path_ordering1->ord.merge->left_operator == path_ordering2->ord.sortop[0]));
}
else
{
return (path_ordering1->ord.sortop &&
(path_ordering1->ord.sortop[0] ==
path_ordering2->ord.merge->left_operator));
(path_ordering1->ord.sortop[0] == path_ordering2->ord.merge->left_operator));
}
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.15 1999/02/03 20:15:42 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.16 1999/02/03 21:16:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -212,8 +212,7 @@ create_seqscan_path(RelOptInfo * rel)
* copy restrictinfo list into path for expensive function processing --
* JMH, 7/7/92
*/
pathnode->loc_restrictinfo =
(List *) copyObject((Node *) rel->restrictinfo);
pathnode->loc_restrictinfo = (List *) copyObject((Node *) rel->restrictinfo);
if (rel->relids != NULL)
relid = lfirsti(rel->relids);
@@ -224,8 +223,7 @@ create_seqscan_path(RelOptInfo * rel)
#if 0
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost +=
xfunc_get_path_cost(pathnode);
pathnode->path_cost += xfunc_get_path_cost(pathnode);
}
#endif
return pathnode;
@@ -266,8 +264,7 @@ create_index_path(Query *root,
* copy restrictinfo list into path for expensive function processing --
* JMH, 7/7/92
*/
pathnode->path.loc_restrictinfo =
set_difference((List *) copyObject((Node *) rel->restrictinfo),
pathnode->path.loc_restrictinfo = set_difference((List *) copyObject((Node *) rel->restrictinfo),
(List *) restriction_clauses);
/*
@@ -301,8 +298,7 @@ create_index_path(Query *root,
*/
/* is the statement above really true? what about IndexScan as the
inner of a join? */
pathnode->path.path_cost =
cost_index(lfirsti(index->relids),
pathnode->path.path_cost = cost_index(lfirsti(index->relids),
index->pages,
1.0,
rel->pages,
@@ -314,8 +310,7 @@ create_index_path(Query *root,
#if 0
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost =
(pathnode->path_cost +
pathnode->path_cost = (pathnode->path_cost +
xfunc_get_path_cost((Path *) pathnode));
}
#endif
@@ -366,8 +361,7 @@ create_index_path(Query *root,
/* add in expensive functions cost! -- JMH, 7/7/92 */
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost +=
xfunc_get_path_cost((Path *) pathnode);
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
}
#endif
@@ -418,17 +412,14 @@ create_nestloop_path(RelOptInfo * joinrel,
if (keys)
{
pathnode->path.p_ordering.ordtype =
outer_path->p_ordering.ordtype;
pathnode->path.p_ordering.ordtype = outer_path->p_ordering.ordtype;
if (outer_path->p_ordering.ordtype == SORTOP_ORDER)
{
pathnode->path.p_ordering.ord.sortop =
outer_path->p_ordering.ord.sortop;
pathnode->path.p_ordering.ord.sortop = outer_path->p_ordering.ord.sortop;
}
else
{
pathnode->path.p_ordering.ord.merge =
outer_path->p_ordering.ord.merge;
pathnode->path.p_ordering.ord.merge = outer_path->p_ordering.ord.merge;
}
}
else
@@ -437,8 +428,7 @@ create_nestloop_path(RelOptInfo * joinrel,
pathnode->path.p_ordering.ord.sortop = NULL;
}
pathnode->path.path_cost =
cost_nestloop(outer_path->path_cost,
pathnode->path.path_cost = cost_nestloop(outer_path->path_cost,
inner_path->path_cost,
outer_rel->size,
inner_path->parent->size,
@@ -500,8 +490,7 @@ create_mergejoin_path(RelOptInfo * joinrel,
pathnode->jpath.path.loc_restrictinfo = NIL;
pathnode->outersortkeys = outersortkeys;
pathnode->innersortkeys = innersortkeys;
pathnode->jpath.path.path_cost =
cost_mergejoin(outer_path->path_cost,
pathnode->jpath.path.path_cost = cost_mergejoin(outer_path->path_cost,
inner_path->path_cost,
outersortkeys,
innersortkeys,
@@ -513,8 +502,7 @@ create_mergejoin_path(RelOptInfo * joinrel,
#if 0
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost +=
xfunc_get_path_cost((Path *) pathnode);
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
}
#endif
return pathnode;
@@ -569,8 +557,7 @@ create_hashjoin_path(RelOptInfo * joinrel,
pathnode->path_hashclauses = hashclauses;
pathnode->outerhashkeys = outerkeys;
pathnode->innerhashkeys = innerkeys;
pathnode->jpath.path.path_cost =
cost_hashjoin(outer_path->path_cost,
pathnode->jpath.path.path_cost = cost_hashjoin(outer_path->path_cost,
inner_path->path_cost,
outerkeys,
innerkeys,
@@ -580,8 +567,7 @@ create_hashjoin_path(RelOptInfo * joinrel,
#if 0
if (XfuncMode != XFUNC_OFF)
{
pathnode->path_cost +=
xfunc_get_path_cost((Path *) pathnode);
pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
}
#endif
return pathnode;

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.23 1998/10/08 18:29:30 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.24 1999/02/03 21:16:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -219,8 +219,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
if (!HeapTupleIsValid(amopTuple))
elog(ERROR, "index_info: no amop %d %d %d",
relam, index->indclass[i], amstrategy);
info->orderOprs[i] =
((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr;
info->orderOprs[i] = ((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr;
}
return TRUE;
}

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.22 1999/01/24 00:28:22 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.23 1999/02/03 21:16:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -113,8 +113,7 @@ add_tl_element(RelOptInfo * rel, Var *var)
var->varno,
var->varoattno);
rel->targetlist =
lappend(tlist,
rel->targetlist = lappend(tlist,
create_tl_element(newvar,
length(tlist) + 1));
@@ -462,8 +461,7 @@ flatten_tlistentry(Node *tlistentry, List *flat_tlist)
}
else if (IsA(tlistentry, Iter))
{
((Iter *) tlistentry)->iterexpr =
flatten_tlistentry((Node *) ((Iter *) tlistentry)->iterexpr,
((Iter *) tlistentry)->iterexpr = flatten_tlistentry((Node *) ((Iter *) tlistentry)->iterexpr,
flat_tlist);
return tlistentry;
}