1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

pgindent run on all C files. Java run to follow. initdb/regression

tests pass.
This commit is contained in:
Bruce Momjian
2001-10-25 05:50:21 +00:00
parent 59da2105d8
commit b81844b173
818 changed files with 21684 additions and 20491 deletions

View File

@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.158 2001/10/18 17:30:14 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.159 2001/10/25 05:49:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -782,7 +782,6 @@ _copyConst(Const *from)
if (from->constbyval || from->constisnull)
{
/*
* passed by value so just copy the datum. Also, don't try to copy
* struct when value is null!
@@ -792,7 +791,6 @@ _copyConst(Const *from)
}
else
{
/*
* not passed by value. datum contains a pointer.
*/
@@ -1024,7 +1022,7 @@ _copyCaseWhen(CaseWhen *from)
static NullTest *
_copyNullTest(NullTest *from)
{
NullTest *newnode = makeNode(NullTest);
NullTest *newnode = makeNode(NullTest);
/*
* copy remainder of node
@@ -1180,7 +1178,6 @@ _copyIndexOptInfo(IndexOptInfo *from)
static void
CopyPathFields(Path *from, Path *newnode)
{
/*
* Modify the next line, since it causes the copying to cycle (i.e.
* the parent points right back here! -- JMH, 7/7/92. Old version:
@@ -1780,8 +1777,8 @@ _copyQuery(Query *from)
/*
* We do not copy the planner internal fields: base_rel_list,
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys.
* Not entirely clear if this is right?
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys. Not
* entirely clear if this is right?
*/
return newnode;
@@ -1892,7 +1889,7 @@ _copyAlterTableStmt(AlterTableStmt *from)
static GrantStmt *
_copyGrantStmt(GrantStmt *from)
{
GrantStmt *newnode = makeNode(GrantStmt);
GrantStmt *newnode = makeNode(GrantStmt);
newnode->is_grant = from->is_grant;
Node_Copy(from, newnode, relnames);
@@ -2426,7 +2423,7 @@ _copyLockStmt(LockStmt *from)
LockStmt *newnode = makeNode(LockStmt);
Node_Copy(from, newnode, rellist);
newnode->mode = from->mode;
return newnode;
@@ -2536,7 +2533,6 @@ copyObject(void *from)
switch (nodeTag(from))
{
/*
* PLAN NODES
*/

View File

@@ -20,7 +20,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.106 2001/10/18 17:30:14 thomas Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.107 2001/10/25 05:49:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -87,7 +87,6 @@ _equalFjoin(Fjoin *a, Fjoin *b)
static bool
_equalExpr(Expr *a, Expr *b)
{
/*
* We do not examine typeOid, since the optimizer often doesn't bother
* to set it in created nodes, and it is logically a derivative of the
@@ -351,7 +350,6 @@ _equalJoinExpr(JoinExpr *a, JoinExpr *b)
static bool
_equalRelOptInfo(RelOptInfo *a, RelOptInfo *b)
{
/*
* We treat RelOptInfos as equal if they refer to the same base rels
* joined in the same order. Is this appropriate/sufficient?
@@ -362,7 +360,6 @@ _equalRelOptInfo(RelOptInfo *a, RelOptInfo *b)
static bool
_equalIndexOptInfo(IndexOptInfo *a, IndexOptInfo *b)
{
/*
* We treat IndexOptInfos as equal if they refer to the same index. Is
* this sufficient?
@@ -515,11 +512,12 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
return false;
if (a->ispusheddown != b->ispusheddown)
return false;
/*
* We ignore eval_cost, this_selec, left/right_pathkey, and
* left/right_bucketsize, since they may not be set yet, and should be
* derivable from the clause anyway. Probably it's not really necessary
* to compare any of these remaining fields ...
* derivable from the clause anyway. Probably it's not really
* necessary to compare any of these remaining fields ...
*/
if (!equal(a->subclauseindices, b->subclauseindices))
return false;
@@ -622,9 +620,9 @@ _equalQuery(Query *a, Query *b)
/*
* We do not check the internal-to-the-planner fields: base_rel_list,
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys.
* They might not be set yet, and in any case they should be derivable
* from the other fields.
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys. They
* might not be set yet, and in any case they should be derivable from
* the other fields.
*/
return true;
}
@@ -773,7 +771,7 @@ _equalPrivGrantee(PrivGrantee *a, PrivGrantee *b)
{
return equalstr(a->username, b->username)
&& equalstr(a->groupname, b->groupname);
}
}
static bool
_equalClosePortalStmt(ClosePortalStmt *a, ClosePortalStmt *b)

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.14 2001/03/22 03:59:32 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.15 2001/10/25 05:49:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,7 +70,7 @@ bool
var_is_rel(Var *var)
{
return (bool)
!(var_is_inner(var) || var_is_outer(var));
!(var_is_inner(var) || var_is_outer(var));
}
/*****************************************************************************
@@ -114,5 +114,4 @@ non_null(Expr *c)
else
return false;
}
#endif

View File

@@ -5,7 +5,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.145 2001/08/21 16:36:02 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.146 2001/10/25 05:49:31 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -218,7 +218,6 @@ _outQuery(StringInfo str, Query *node)
if (node->utilityStmt)
{
/*
* Hack to make up for lack of outfuncs for utility-stmt nodes
*/
@@ -1271,7 +1270,7 @@ _outValue(StringInfo str, Value *value)
{
switch (value->type)
{
case T_Integer:
case T_Integer:
appendStringInfo(str, " %ld ", value->val.ival);
break;
case T_Float:

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.48 2001/10/18 16:11:41 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.49 2001/10/25 05:49:31 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -215,7 +215,7 @@ print_expr(Node *expr, List *rtable)
outputstr = DatumGetCString(OidFunctionCall3(typoutput,
c->constvalue,
ObjectIdGetDatum(typelem),
ObjectIdGetDatum(typelem),
Int32GetDatum(-1)));
printf("%s", outputstr);
pfree(outputstr);
@@ -322,7 +322,7 @@ plannode_type(Plan *p)
{
switch (nodeTag(p))
{
case T_Plan:
case T_Plan:
return "PLAN";
case T_Result:
return "RESULT";

View File

@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.30 2001/03/22 17:41:47 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.31 2001/10/25 05:49:31 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -220,17 +220,17 @@ nodeTokenType(char *token, int length)
* us. We know the token will end at a character that strtol will
* stop at, so we do not need to modify the string.
*/
long val;
char *endptr;
long val;
char *endptr;
errno = 0;
val = strtol(token, &endptr, 10);
if (endptr != token + length || errno == ERANGE
#ifdef HAVE_LONG_INT_64
/* if long > 32 bits, check for overflow of int4 */
/* if long > 32 bits, check for overflow of int4 */
|| val != (long) ((int32) val)
#endif
)
)
return T_Float;
return T_Integer;
}

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.112 2001/07/03 16:52:48 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.113 2001/10/25 05:49:31 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -129,7 +129,6 @@ _readQuery(void)
local_node->utilityStmt = NULL;
else
{
/*
* Hack to make up for lack of readfuncs for utility-stmt nodes
*
@@ -868,8 +867,8 @@ _readCaseWhen(void)
static NullTest *
_readNullTest(void)
{
NullTest *local_node;
char *token;
NullTest *local_node;
char *token;
int length;
local_node = makeNode(NullTest);
@@ -893,8 +892,8 @@ _readNullTest(void)
static BooleanTest *
_readBooleanTest(void)
{
BooleanTest *local_node;
char *token;
BooleanTest *local_node;
char *token;
int length;
local_node = makeNode(BooleanTest);