diff options
Diffstat (limited to 'src/backend/nodes')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 30 | ||||
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 318 | ||||
-rw-r--r-- | src/backend/nodes/list.c | 54 | ||||
-rw-r--r-- | src/backend/nodes/nodeFuncs.c | 16 | ||||
-rw-r--r-- | src/backend/nodes/nodes.c | 4 | ||||
-rw-r--r-- | src/backend/nodes/outfuncs.c | 18 | ||||
-rw-r--r-- | src/backend/nodes/read.c | 16 | ||||
-rw-r--r-- | src/backend/nodes/readfuncs.c | 130 |
8 files changed, 293 insertions, 293 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index ac88763601e..d7dc535812a 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.46 1998/08/04 16:43:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.47 1998/09/01 03:22:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -765,7 +765,7 @@ _copyConst(Const *from) if (!from->constisnull && cached_type != from->consttype) { HeapTuple typeTuple; - TypeTupleForm typeStruct; + Form_pg_type typeStruct; /* ---------------- * get the type tuple corresponding to the paramList->type, @@ -784,7 +784,7 @@ _copyConst(Const *from) */ Assert(PointerIsValid(typeTuple)); - typeStruct = (TypeTupleForm) GETSTRUCT(typeTuple); + typeStruct = (Form_pg_type) GETSTRUCT(typeTuple); cached_typbyval = (typeStruct)->typbyval ? true : false; cached_type = from->consttype; } @@ -1316,13 +1316,13 @@ _copyMergeOrder(MergeOrder *from) } /* ---------------- - * _copyCInfo + * _copyClauseInfo * ---------------- */ -static CInfo * -_copyCInfo(CInfo *from) +static ClauseInfo * +_copyClauseInfo(ClauseInfo *from) { - CInfo *newnode = makeNode(CInfo); + ClauseInfo *newnode = makeNode(ClauseInfo); /* ---------------- * copy remainder of node @@ -1409,13 +1409,13 @@ _copyMInfo(MInfo *from) } /* ---------------- - * _copyJInfo + * _copyJoinInfo * ---------------- */ -static JInfo * -_copyJInfo(JInfo *from) +static JoinInfo * +_copyJoinInfo(JoinInfo *from) { - JInfo *newnode = makeNode(JInfo); + JoinInfo *newnode = makeNode(JoinInfo); /* ---------------- * copy remainder of node @@ -1761,8 +1761,8 @@ copyObject(void *from) case T_MergeOrder: retval = _copyMergeOrder(from); break; - case T_CInfo: - retval = _copyCInfo(from); + case T_ClauseInfo: + retval = _copyClauseInfo(from); break; case T_JoinMethod: retval = _copyJoinMethod(from); @@ -1773,8 +1773,8 @@ copyObject(void *from) case T_MInfo: retval = _copyMInfo(from); break; - case T_JInfo: - retval = _copyJInfo(from); + case T_JoinInfo: + retval = _copyJoinInfo(from); break; case T_Iter: retval = _copyIter(from); diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 4c2f3410145..5e9be73256f 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.18 1998/08/04 16:43:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.19 1998/09/01 03:22:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,19 +39,19 @@ static bool _equalResdom(Resdom *a, Resdom *b) { if (a->resno != b->resno) - return (false); + return false; if (a->restype != b->restype) - return (false); + return false; if (a->restypmod != b->restypmod) - return (false); + return false; if (strcmp(a->resname, b->resname) != 0) - return (false); + return false; if (a->reskey != b->reskey) - return (false); + return false; if (a->reskeyop != b->reskeyop) - return (false); + return false; - return (true); + return true; } static bool @@ -60,19 +60,19 @@ _equalFjoin(Fjoin *a, Fjoin *b) int nNodes; if (a->fj_initialized != b->fj_initialized) - return (false); + return false; if (a->fj_nNodes != b->fj_nNodes) - return (false); + return false; if (!equal(a->fj_innerNode, b->fj_innerNode)) - return (false); + return false; nNodes = a->fj_nNodes; if (memcmp(a->fj_results, b->fj_results, nNodes * sizeof(Datum)) != 0) - return (false); + return false; if (memcmp(a->fj_alwaysDone, b->fj_alwaysDone, nNodes * sizeof(bool)) != 0) - return (false); + return false; - return (true); + return true; } /* @@ -82,39 +82,39 @@ static bool _equalExpr(Expr *a, Expr *b) { if (a->opType != b->opType) - return (false); + return false; if (!equal(a->oper, b->oper)) - return (false); + return false; if (!equal(a->args, b->args)) - return (false); + return false; - return (true); + return true; } static bool _equalIter(Iter *a, Iter *b) { - return (equal(a->iterexpr, b->iterexpr)); + return equal(a->iterexpr, b->iterexpr); } static bool _equalStream(Stream *a, Stream *b) { if (a->clausetype != b->clausetype) - return (false); + return false; if (a->groupup != b->groupup) - return (false); + return false; if (a->groupcost != b->groupcost) - return (false); + return false; if (a->groupsel != b->groupsel) - return (false); + return false; if (!equal(a->pathptr, b->pathptr)) - return (false); + return false; if (!equal(a->cinfo, b->cinfo)) - return (false); + return false; if (!equal(a->upstream, b->upstream)) - return (false); - return (equal(a->downstream, b->downstream)); + return false; + return equal(a->downstream, b->downstream); } /* @@ -124,57 +124,57 @@ static bool _equalVar(Var *a, Var *b) { if (a->varno != b->varno) - return (false); + return false; if (a->varattno != b->varattno) - return (false); + return false; if (a->vartype != b->vartype) - return (false); + return false; if (a->vartypmod != b->vartypmod) - return (false); + return false; if (a->varlevelsup != b->varlevelsup) - return (false); + return false; if (a->varnoold != b->varnoold) - return (false); + return false; if (a->varoattno != b->varoattno) - return (false); + return false; - return (true); + return true; } static bool _equalArray(Array *a, Array *b) { if (a->arrayelemtype != b->arrayelemtype) - return (false); + return false; if (a->arrayndim != b->arrayndim) - return (false); + return false; if (a->arraylow.indx[0] != b->arraylow.indx[0]) - return (false); + return false; if (a->arrayhigh.indx[0] != b->arrayhigh.indx[0]) - return (false); + return false; if (a->arraylen != b->arraylen) - return (false); - return (TRUE); + return false; + return TRUE; } static bool _equalArrayRef(ArrayRef *a, ArrayRef *b) { if (a->refelemtype != b->refelemtype) - return (false); + return false; if (a->refattrlength != b->refattrlength) - return (false); + return false; if (a->refelemlength != b->refelemlength) - return (false); + return false; if (a->refelembyval != b->refelembyval) - return (false); + return false; if (!equal(a->refupperindexpr, b->refupperindexpr)) - return (false); + return false; if (!equal(a->reflowerindexpr, b->reflowerindexpr)) - return (false); + return false; if (!equal(a->refexpr, b->refexpr)) - return (false); - return (equal(a->refassgnexpr, b->refassgnexpr)); + return false; + return equal(a->refassgnexpr, b->refassgnexpr); } /* @@ -184,11 +184,11 @@ static bool _equalOper(Oper *a, Oper *b) { if (a->opno != b->opno) - return (false); + return false; if (a->opresulttype != b->opresulttype) - return (false); + return false; - return (true); + return true; } /* @@ -203,13 +203,13 @@ _equalConst(Const *a, Const *b) * ridiculous. -- JMH, 7/11/92 */ if (a->consttype != b->consttype) - return (false); + return false; if (a->constlen != b->constlen) - return (false); + return false; if (a->constisnull != b->constisnull) - return (false); + return false; if (a->constbyval != b->constbyval) - return (false); + return false; return (datumIsEqual(a->constvalue, b->constvalue, a->consttype, a->constbyval, a->constlen)); } @@ -221,11 +221,11 @@ static bool _equalParam(Param *a, Param *b) { if (a->paramkind != b->paramkind) - return (false); + return false; if (a->paramtype != b->paramtype) - return (false); + return false; if (!equal(a->param_tlist, b->param_tlist)) - return (false); + return false; switch (a->paramkind) { @@ -233,26 +233,26 @@ _equalParam(Param *a, Param *b) case PARAM_NEW: case PARAM_OLD: if (strcmp(a->paramname, b->paramname) != 0) - return (false); + return false; break; case PARAM_NUM: case PARAM_EXEC: if (a->paramid != b->paramid) - return (false); + return false; break; case PARAM_INVALID: /* * XXX: Hmmm... What are we supposed to return in this case ?? */ - return (true); + return true; break; default: elog(ERROR, "_equalParam: Invalid paramkind value: %d", a->paramkind); } - return (true); + return true; } /* @@ -262,42 +262,42 @@ static bool _equalFunc(Func *a, Func *b) { if (a->funcid != b->funcid) - return (false); + return false; if (a->functype != b->functype) - return (false); + return false; if (a->funcisindex != b->funcisindex) - return (false); + return false; if (a->funcsize != b->funcsize) - return (false); + return false; if (!equal(a->func_tlist, b->func_tlist)) - return (false); + return false; if (!equal(a->func_planlist, b->func_planlist)) - return (false); + return false; - return (true); + return true; } /* - * CInfo is a subclass of Node. + * ClauseInfo is a subclass of Node. */ static bool -_equalCInfo(CInfo *a, CInfo *b) +_equalClauseInfo(ClauseInfo *a, ClauseInfo *b) { - Assert(IsA(a, CInfo)); - Assert(IsA(b, CInfo)); + Assert(IsA(a, ClauseInfo)); + Assert(IsA(b, ClauseInfo)); if (!equal(a->clause, b->clause)) - return (false); + return false; if (a->selectivity != b->selectivity) - return (false); + return false; if (a->notclause != b->notclause) - return (false); + return false; #ifdef EqualMergeOrderExists if (!EqualMergeOrder(a->mergejoinorder, b->mergejoinorder)) - return (false); + return false; #endif if (a->hashjoinoperator != b->hashjoinoperator) - return (false); + return false; return (equal((a->indexids), (b->indexids))); } @@ -323,20 +323,20 @@ _equalJoinMethod(JoinMethod *a, JoinMethod *b) if (!equal((a->jmkeys), (b->jmkeys))) - return (false); + return false; if (!equal((a->clauses), (b->clauses))) - return (false); - return (true); + return false; + return true; } static bool _equalPath(Path *a, Path *b) { if (a->pathtype != b->pathtype) - return (false); + return false; if (a->parent != b->parent) - return (false); + return false; /* * if (a->path_cost != b->path_cost) return(false); @@ -370,31 +370,31 @@ _equalPath(Path *a, Path *b) { if (!equal((a->p_ordering.ord.merge), (b->p_ordering.ord.merge))) - return (false); + return false; } if (!equal((a->keys), (b->keys))) - return (false); + return false; /* * if (a->outerjoincost != b->outerjoincost) return(false); */ if (!equali((a->joinid), (b->joinid))) - return (false); - return (true); + return false; + return true; } static bool _equalIndexPath(IndexPath *a, IndexPath *b) { if (!_equalPath((Path *) a, (Path *) b)) - return (false); + return false; if (!equali((a->indexid), (b->indexid))) - return (false); + return false; if (!equal((a->indexqual), (b->indexqual))) - return (false); - return (true); + return false; + return true; } static bool @@ -404,14 +404,14 @@ _equalJoinPath(JoinPath *a, JoinPath *b) Assert(IsA_JoinPath(b)); if (!_equalPath((Path *) a, (Path *) b)) - return (false); + return false; if (!equal((a->pathclauseinfo), (b->pathclauseinfo))) - return (false); + return false; if (!equal((a->outerjoinpath), (b->outerjoinpath))) - return (false); + return false; if (!equal((a->innerjoinpath), (b->innerjoinpath))) - return (false); - return (true); + return false; + return true; } static bool @@ -421,14 +421,14 @@ _equalMergePath(MergePath *a, MergePath *b) Assert(IsA(b, MergePath)); if (!_equalJoinPath((JoinPath *) a, (JoinPath *) b)) - return (false); + return false; if (!equal((a->path_mergeclauses), (b->path_mergeclauses))) - return (false); + return false; if (!equal((a->outersortkeys), (b->outersortkeys))) - return (false); + return false; if (!equal((a->innersortkeys), (b->innersortkeys))) - return (false); - return (true); + return false; + return true; } static bool @@ -438,14 +438,14 @@ _equalHashPath(HashPath *a, HashPath *b) Assert(IsA(b, HashPath)); if (!_equalJoinPath((JoinPath *) a, (JoinPath *) b)) - return (false); + return false; if (!equal((a->path_hashclauses), (b->path_hashclauses))) - return (false); + return false; if (!equal((a->outerhashkeys), (b->outerhashkeys))) - return (false); + return false; if (!equal((a->innerhashkeys), (b->innerhashkeys))) - return (false); - return (true); + return false; + return true; } static bool @@ -455,31 +455,31 @@ _equalJoinKey(JoinKey *a, JoinKey *b) Assert(IsA(b, JoinKey)); if (!equal((a->outer), (b->outer))) - return (false); + return false; if (!equal((a->inner), (b->inner))) - return (false); - return (true); + return false; + return true; } static bool _equalMergeOrder(MergeOrder *a, MergeOrder *b) { if (a == (MergeOrder *) NULL && b == (MergeOrder *) NULL) - return (true); + return true; Assert(IsA(a, MergeOrder)); Assert(IsA(b, MergeOrder)); if (a->join_operator != b->join_operator) - return (false); + return false; if (a->left_operator != b->left_operator) - return (false); + return false; if (a->right_operator != b->right_operator) - return (false); + return false; if (a->left_type != b->left_type) - return (false); + return false; if (a->right_type != b->right_type) - return (false); - return (true); + return false; + return true; } static bool @@ -489,8 +489,8 @@ _equalHInfo(HInfo *a, HInfo *b) Assert(IsA(b, HInfo)); if (a->hashop != b->hashop) - return (false); - return (true); + return false; + return true; } /* XXX This equality function is a quick hack, should be @@ -507,42 +507,42 @@ _equalIndexScan(IndexScan *a, IndexScan *b) */ if (!equal((a->indxqual), (b->indxqual))) - return (false); + return false; if (a->scan.scanrelid != b->scan.scanrelid) - return (false); + return false; if (!equali((a->indxid), (b->indxid))) - return (false); - return (true); + return false; + return true; } static bool _equalSubPlan(SubPlan *a, SubPlan *b) { if (a->plan_id != b->plan_id) - return (false); + return false; if (!equal((a->sublink->oper), (b->sublink->oper))) - return (false); + return false; - return (true); + return true; } static bool -_equalJInfo(JInfo *a, JInfo *b) +_equalJoinInfo(JoinInfo *a, JoinInfo *b) { - Assert(IsA(a, JInfo)); - Assert(IsA(b, JInfo)); + Assert(IsA(a, JoinInfo)); + Assert(IsA(b, JoinInfo)); if (!equal((a->otherrels), (b->otherrels))) - return (false); + return false; if (!equal((a->jinfoclauseinfo), (b->jinfoclauseinfo))) - return (false); + return false; if (a->mergejoinable != b->mergejoinable) - return (false); + return false; if (a->hashjoinable != b->hashjoinable) - return (false); - return (true); + return false; + return true; } /* @@ -556,28 +556,28 @@ static bool _equalEState(EState *a, EState *b) { if (a->es_direction != b->es_direction) - return (false); + return false; if (!equal(a->es_range_table, b->es_range_table)) - return (false); + return false; if (a->es_result_relation_info != b->es_result_relation_info) - return (false); + return false; - return (true); + return true; } static bool _equalTargetEntry(TargetEntry *a, TargetEntry *b) { if (!equal(a->resdom, b->resdom)) - return (false); + return false; if (!equal(a->fjoin, b->fjoin)) - return (false); + return false; if (!equal(a->expr, b->expr)) - return (false); + return false; - return (true); + return true; } @@ -591,21 +591,21 @@ static bool _equalValue(Value *a, Value *b) { if (a->type != b->type) - return (false); + return false; switch (a->type) { case T_String: return strcmp(a->val.str, b->val.str); case T_Integer: - return (a->val.ival == b->val.ival); + return a->val.ival == b->val.ival; case T_Float: - return (a->val.dval == b->val.dval); + return a->val.dval == b->val.dval; default: break; } - return (true); + return true; } /* @@ -618,19 +618,19 @@ equal(void *a, void *b) bool retval = false; if (a == b) - return (true); + return true; /* * note that a!=b, so only one of them can be NULL */ if (a == NULL || b == NULL) - return (false); + return false; /* * are they the same type of nodes? */ if (nodeTag(a) != nodeTag(b)) - return (false); + return false; switch (nodeTag(a)) { @@ -673,8 +673,8 @@ equal(void *a, void *b) case T_Func: retval = _equalFunc(a, b); break; - case T_CInfo: - retval = _equalCInfo(a, b); + case T_ClauseInfo: + retval = _equalClauseInfo(a, b); break; case T_RelOptInfo: retval = _equalRelOptInfo(a, b); @@ -712,8 +712,8 @@ equal(void *a, void *b) case T_SubPlan: retval = _equalSubPlan(a, b); break; - case T_JInfo: - retval = _equalJInfo(a, b); + case T_JoinInfo: + retval = _equalJoinInfo(a, b); break; case T_EState: retval = _equalEState(a, b); @@ -730,13 +730,13 @@ equal(void *a, void *b) List *l; if (a == NULL && b == NULL) - return (true); + return true; if (length(a) != length(b)) - return (false); + return false; foreach(l, la) { if (!equal(lfirst(l), lfirst(lb))) - return (false); + return false; lb = lnext(lb); } retval = true; @@ -765,13 +765,13 @@ equali(List *a, List *b) List *l; if (a == NULL && b == NULL) - return (true); + return true; if (length(a) != length(b)) - return (false); + return false; foreach(l, la) { if (lfirsti(l) != lfirsti(lb)) - return (false); + return false; lb = lnext(lb); } return true; diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c index 2b826cdc9f4..c19a85ac507 100644 --- a/src/backend/nodes/list.c +++ b/src/backend/nodes/list.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.13 1998/06/15 19:28:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.14 1998/09/01 03:22:56 momjian Exp $ * * NOTES * XXX a few of the following functions are duplicated to handle @@ -54,7 +54,7 @@ makeList(void *elem,...) va_end(args); - return (retval); + return retval; } List * @@ -105,7 +105,7 @@ nconc(List *l1, List *l2) ; lnext(temp) = l2; - return (l1); /* list1 is now list1[]list2 */ + return l1; /* list1 is now list1+list2 */ } @@ -116,17 +116,17 @@ nreverse(List *list) List *p = NIL; if (list == NULL) - return (NIL); + return NIL; if (length(list) == 1) - return (list); + return list; for (p = list; p != NULL; p = lnext(p)) rlist = lcons(lfirst(p), rlist); lfirst(list) = lfirst(rlist); lnext(list) = lnext(rlist); - return (list); + return list; } Value * @@ -281,19 +281,19 @@ same(List *l1, List *l2) List *temp = NIL; if (l1 == NULL) - return (l2 == NULL); + return l2 == NULL; if (l2 == NULL) - return (l1 == NULL); + return l1 == NULL; if (length(l1) == length(l2)) { foreach(temp, l1) { if (!intMember(lfirsti(temp), l2)) - return (false); + return false; } - return (true); + return true; } - return (false); + return false; } @@ -305,10 +305,10 @@ LispUnion(List *l1, List *l2) List *j = NIL; if (l1 == NIL) - return (l2); /* XXX - should be copy of l2 */ + return l2; /* XXX - should be copy of l2 */ if (l2 == NIL) - return (l1); /* XXX - should be copy of l1 */ + return l1; /* XXX - should be copy of l1 */ foreach(i, l1) { @@ -324,7 +324,7 @@ LispUnion(List *l1, List *l2) foreach(i, l2) retval = lappend(retval, lfirst(i)); - return (retval); + return retval; } List * @@ -335,10 +335,10 @@ LispUnioni(List *l1, List *l2) List *j = NIL; if (l1 == NIL) - return (l2); /* XXX - should be copy of l2 */ + return l2; /* XXX - should be copy of l2 */ if (l2 == NIL) - return (l1); /* XXX - should be copy of l1 */ + return l1; /* XXX - should be copy of l1 */ foreach(i, l1) { @@ -354,7 +354,7 @@ LispUnioni(List *l1, List *l2) foreach(i, l2) retval = lappendi(retval, lfirsti(i)); - return (retval); + return retval; } /* @@ -369,8 +369,8 @@ member(void *l1, List *l2) foreach(i, l2) if (equal((Node *) (lfirst(i)), (Node *) l1)) - return (true); - return (false); + return true; + return false; } bool @@ -380,8 +380,8 @@ intMember(int l1, List *l2) foreach(i, l2) if (l1 == lfirsti(i)) - return (true); - return (false); + return true; + return false; } /* @@ -432,7 +432,7 @@ LispRemove(void *elem, List *list) temp = lnext(temp); prev = lnext(prev); } - return (list); + return list; } #ifdef NOT_USED @@ -457,7 +457,7 @@ intLispRemove(int elem, List *list) temp = lnext(temp); prev = lnext(prev); } - return (list); + return list; } #endif @@ -469,14 +469,14 @@ set_difference(List *l1, List *l2) List *result = NIL; if (l2 == NIL) - return (l1); + return l1; foreach(temp1, l1) { if (!member(lfirst(temp1), l2)) result = lappend(result, lfirst(temp1)); } - return (result); + return result; } List * @@ -486,12 +486,12 @@ set_differencei(List *l1, List *l2) List *result = NIL; if (l2 == NIL) - return (l1); + return l1; foreach(temp1, l1) { if (!intMember(lfirsti(temp1), l2)) result = lappendi(result, lfirsti(temp1)); } - return (result); + return result; } diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 6ea35a3af79..ba6430471c2 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.7 1998/02/26 04:32:09 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.8 1998/09/01 03:22:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,9 +33,9 @@ bool single_node(Node *node) { if (IsA(node, Ident) ||IsA(node, Const) ||IsA(node, Var) ||IsA(node, Param)) - return (true); + return true; else - return (false); + return false; } /***************************************************************************** @@ -60,13 +60,13 @@ single_node(Node *node) bool var_is_outer(Var *var) { - return ((bool) (var->varno == OUTER)); + return (bool) (var->varno == OUTER); } static bool var_is_inner(Var *var) { - return ((bool) (var->varno == INNER)); + return (bool) (var->varno == INNER); } bool @@ -94,7 +94,7 @@ replace_opid(Oper *oper) { oper->opid = get_opcode(oper->opno); oper->op_fcache = NULL; - return (oper); + return oper; } /***************************************************************************** @@ -112,7 +112,7 @@ non_null(Expr *c) { if (IsA(c, Const) &&!((Const *) c)->constisnull) - return (true); + return true; else - return (false); + return false; } diff --git a/src/backend/nodes/nodes.c b/src/backend/nodes/nodes.c index c11928f8cdc..5926da81830 100644 --- a/src/backend/nodes/nodes.c +++ b/src/backend/nodes/nodes.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.5 1998/02/26 04:32:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.6 1998/09/01 03:22:58 momjian Exp $ * * HISTORY * Andrew Yu Oct 20, 1994 file creation @@ -41,5 +41,5 @@ newNode(Size size, NodeTag tag) newNode = (Node *) palloc(size); MemSet((char *) newNode, 0, size); newNode->type = tag; - return (newNode); + return newNode; } diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index fba8ba71084..c515bde33bf 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.44 1998/08/26 05:22:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.45 1998/09/01 03:22:59 momjian Exp $ * * NOTES * Every (plan) node in POSTGRES has an associated "out" routine which @@ -1353,10 +1353,10 @@ _outMergeOrder(StringInfo str, MergeOrder *node) } /* - * CInfo is a subclass of Node. + * ClauseInfo is a subclass of Node. */ static void -_outCInfo(StringInfo str, CInfo *node) +_outClauseInfo(StringInfo str, ClauseInfo *node) { char buf[500]; @@ -1421,10 +1421,10 @@ _outHInfo(StringInfo str, HInfo *node) } /* - * JInfo is a subclass of Node. + * JoinInfo is a subclass of Node. */ static void -_outJInfo(StringInfo str, JInfo *node) +_outJoinInfo(StringInfo str, JoinInfo *node) { appendStringInfo(str, " JINFO "); @@ -1820,8 +1820,8 @@ _outNode(StringInfo str, void *obj) case T_MergeOrder: _outMergeOrder(str, obj); break; - case T_CInfo: - _outCInfo(str, obj); + case T_ClauseInfo: + _outClauseInfo(str, obj); break; case T_JoinMethod: _outJoinMethod(str, obj); @@ -1829,8 +1829,8 @@ _outNode(StringInfo str, void *obj) case T_HInfo: _outHInfo(str, obj); break; - case T_JInfo: - _outJInfo(str, obj); + case T_JoinInfo: + _outJoinInfo(str, obj); break; case T_Iter: _outIter(str, obj); diff --git a/src/backend/nodes/read.c b/src/backend/nodes/read.c index 47938774c4b..1a7004fc08a 100644 --- a/src/backend/nodes/read.c +++ b/src/backend/nodes/read.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.12 1998/06/15 19:28:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.13 1998/09/01 03:23:01 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -105,7 +105,7 @@ nodeTokenType(char *token, int length) retval = T_String; else if (*token == '{') retval = PLAN_SYM; - return (retval); + return retval; } /* @@ -125,7 +125,7 @@ lsptok(char *string, int *length) { local_str = string; if (length == NULL) - return (NULL); + return NULL; } for (; *local_str == ' ' @@ -137,7 +137,7 @@ lsptok(char *string, int *length) */ ret_string = local_str; if (*local_str == '\0') - return (NULL); + return NULL; *length = 1; if (*local_str == '"') @@ -167,7 +167,7 @@ lsptok(char *string, int *length) && *local_str != ')'; local_str++, (*length)++); (*length)--; } - return (ret_string); + return ret_string; } /* @@ -190,7 +190,7 @@ nodeRead(bool read_car_only) token = lsptok(NULL, &tok_len); if (token == NULL) - return (NULL); + return NULL; type = nodeTokenType(token, tok_len); @@ -200,7 +200,7 @@ nodeRead(bool read_car_only) this_value = parsePlanString(); token = lsptok(NULL, &tok_len); if (token[0] != '}') - return (NULL); + return NULL; if (!read_car_only) make_dotted_pair_cell = true; @@ -288,5 +288,5 @@ nodeRead(bool read_car_only) } else return_value = this_value; - return (return_value); + return return_value; } diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 69f90fb126b..804942800f4 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.35 1998/08/04 16:44:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.36 1998/09/01 03:23:03 momjian Exp $ * * NOTES * Most of the read functions for plan nodes are tested. (In fact, they @@ -163,7 +163,7 @@ _readQuery() token = lsptok(NULL, &length); /* skip :unionClause */ local_node->unionClause = nodeRead(true); - return (local_node); + return local_node; } /* ---------------- @@ -186,7 +186,7 @@ _readSortClause() token = lsptok(NULL, &length); /* get opoid */ local_node->opoid = strtoul(token, NULL, 10); - return (local_node); + return local_node; } /* ---------------- @@ -209,7 +209,7 @@ _readGroupClause() token = lsptok(NULL, &length); /* get grpOpoid */ local_node->grpOpoid = strtoul(token, NULL, 10); - return (local_node); + return local_node; } /* ---------------- @@ -277,7 +277,7 @@ _readPlan() _getPlan(local_node); - return (local_node); + return local_node; } /* ---------------- @@ -301,7 +301,7 @@ _readResult() token = lsptok(NULL, &length); /* eat :resconstantqual */ local_node->resconstantqual = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -335,7 +335,7 @@ _readAppend() token = lsptok(NULL, &length); /* eat :inheritrtable */ local_node->inheritrtable = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -366,7 +366,7 @@ _readJoin() _getJoin(local_node); - return (local_node); + return local_node; } /* ---------------- @@ -385,7 +385,7 @@ _readNestLoop() _getJoin((Join *) local_node); - return (local_node); + return local_node; } /* ---------------- @@ -411,7 +411,7 @@ _readMergeJoin() token = lsptok(NULL, &length); /* get mergejoinop */ local_node->mergejoinop = atol(token); - return (local_node); + return local_node; } /* ---------------- @@ -454,7 +454,7 @@ _readHashJoin() token = lsptok(NULL, &length); /* eat hashdone */ local_node->hashdone = false; - return (local_node); + return local_node; } /* ---------------- @@ -495,7 +495,7 @@ _readScan() _getScan(local_node); - return (local_node); + return local_node; } /* ---------------- @@ -513,7 +513,7 @@ _readSeqScan() _getScan((Scan *) local_node); - return (local_node); + return local_node; } /* ---------------- @@ -540,7 +540,7 @@ _readIndexScan() token = lsptok(NULL, &length); /* eat :indxqual */ local_node->indxqual = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -568,7 +568,7 @@ _readTemp() token = lsptok(NULL, &length); /* get keycount */ local_node->keycount = atoi(token); - return (local_node); + return local_node; } /* ---------------- @@ -596,7 +596,7 @@ _readSort() token = lsptok(NULL, &length); /* get keycount */ local_node->keycount = atoi(token); - return (local_node); + return local_node; } static Agg * @@ -612,7 +612,7 @@ _readAgg() token = lsptok(NULL, &length); /* eat :agg */ local_node->aggs = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -639,7 +639,7 @@ _readUnique() token = lsptok(NULL, &length); /* get :keycount */ local_node->keycount = atoi(token); - return (local_node); + return local_node; } /* ---------------- @@ -674,7 +674,7 @@ _readHash() token = lsptok(NULL, &length); /* get hashtablesize */ local_node->hashtablesize = 0; - return (local_node); + return local_node; } /* @@ -731,7 +731,7 @@ _readResdom() token = lsptok(NULL, &length); /* get resjunk */ local_node->resjunk = atoi(token); - return (local_node); + return local_node; } /* ---------------- @@ -774,7 +774,7 @@ _readExpr() token = lsptok(NULL, &length); /* eat :args */ local_node->args = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -820,7 +820,7 @@ _readVar() token = lsptok(NULL, &length); /* eat :varoattno */ local_node->varoattno = (int) atol(token); - return (local_node); + return local_node; } /* ---------------- @@ -862,7 +862,7 @@ _readArray() token = lsptok(NULL, &length); /* get arraylen */ local_node->arraylen = atoi(token); - return (local_node); + return local_node; } /* ---------------- @@ -908,7 +908,7 @@ _readArrayRef() token = lsptok(NULL, &length); /* eat :refassgnexpr */ local_node->refassgnexpr = nodeRead(true); - return (local_node); + return local_node; } /* ---------------- @@ -967,7 +967,7 @@ _readConst() else local_node->constbyval = false; - return (local_node); + return local_node; } /* ---------------- @@ -1017,7 +1017,7 @@ _readFunc() token = lsptok(NULL, &length); /* get :func_planlist */ local_node->func_planlist = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1053,7 +1053,7 @@ _readOper() */ local_node->op_fcache = (FunctionCache *) NULL; - return (local_node); + return local_node; } /* ---------------- @@ -1096,7 +1096,7 @@ _readParam() token = lsptok(NULL, &length); /* get :param_tlist */ local_node->param_tlist = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1138,7 +1138,7 @@ _readAggreg() token = lsptok(NULL, &length); /* get usenulls */ local_node->usenulls = (token[0] == 't') ? true : false; - return (local_node); + return local_node; } /* ---------------- @@ -1173,7 +1173,7 @@ _readSubLink() token = lsptok(NULL, &length); /* eat :subselect */ local_node->subselect = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* @@ -1210,7 +1210,7 @@ _readEState() sscanf(token, "%x", (unsigned int *) &local_node->es_result_relation_info); - return (local_node); + return local_node; } /* @@ -1292,7 +1292,7 @@ _readRelOptInfo() token = lsptok(NULL, &length); /* get :innerjoin */ local_node->innerjoin = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1314,7 +1314,7 @@ _readTargetEntry() token = lsptok(NULL, &length); /* get :expr */ local_node->expr = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1366,7 +1366,7 @@ _readRangeTblEntry() token = lsptok(NULL, &length); /* get :skipAcl */ local_node->skipAcl = (token[0] == 't') ? true : false; - return (local_node); + return local_node; } /* ---------------- @@ -1401,7 +1401,7 @@ _readPath() token = lsptok(NULL, &length); /* get :keys */ local_node->keys = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1442,7 +1442,7 @@ _readIndexPath() token = lsptok(NULL, &length); /* get :indexqual */ local_node->indexqual = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1509,7 +1509,7 @@ _readJoinPath() local_node->path.joinid = toIntList(nodeRead(true)); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1586,7 +1586,7 @@ _readMergePath() token = lsptok(NULL, &length); /* get :innersortkeys */ local_node->innersortkeys = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1663,7 +1663,7 @@ _readHashPath() token = lsptok(NULL, &length); /* get :innerhashkeys */ local_node->innerhashkeys = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1691,7 +1691,7 @@ _readOrderKey() local_node->array_index = strtoul(token, NULL, 10); - return (local_node); + return local_node; } /* ---------------- @@ -1715,7 +1715,7 @@ _readJoinKey() token = lsptok(NULL, &length); /* get :inner */ local_node->inner = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1757,23 +1757,23 @@ _readMergeOrder() local_node->right_type = atol(token); - return (local_node); + return local_node; } /* ---------------- - * _readCInfo + * _readClauseInfo * - * CInfo is a subclass of Node. + * ClauseInfo is a subclass of Node. * ---------------- */ -static CInfo * -_readCInfo() +static ClauseInfo * +_readClauseInfo() { - CInfo *local_node; + ClauseInfo *local_node; char *token; int length; - local_node = makeNode(CInfo); + local_node = makeNode(ClauseInfo); token = lsptok(NULL, &length); /* get :clause */ local_node->clause = nodeRead(true); /* now read it */ @@ -1802,7 +1802,7 @@ _readCInfo() local_node->hashjoinoperator = atol(token); - return (local_node); + return local_node; } /* ---------------- @@ -1826,7 +1826,7 @@ _readJoinMethod() token = lsptok(NULL, &length); /* get :clauses */ local_node->clauses = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- @@ -1855,23 +1855,23 @@ _readHInfo() token = lsptok(NULL, &length); /* get :clauses */ local_node->jmethod.clauses = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } /* ---------------- - * _readJInfo() + * _readJoinInfo() * - * JInfo is a subclass of Node. + * JoinInfo is a subclass of Node. * ---------------- */ -static JInfo * -_readJInfo() +static JoinInfo * +_readJoinInfo() { - JInfo *local_node; + JoinInfo *local_node; char *token; int length; - local_node = makeNode(JInfo); + local_node = makeNode(JoinInfo); token = lsptok(NULL, &length); /* get :otherrels */ local_node->otherrels = @@ -1894,7 +1894,7 @@ _readJInfo() else local_node->hashjoinable = false; - return (local_node); + return local_node; } /* ---------------- @@ -1914,7 +1914,7 @@ _readIter() token = lsptok(NULL, &length); /* eat :iterexpr */ local_node->iterexpr = nodeRead(true); /* now read it */ - return (local_node); + return local_node; } @@ -2012,12 +2012,12 @@ parsePlanString(void) return_value = _readJoinKey(); else if (!strncmp(token, "MERGEORDER", length)) return_value = _readMergeOrder(); - else if (!strncmp(token, "CINFO", length)) - return_value = _readCInfo(); + else if (!strncmp(token, "CLAUSEINFO", length)) + return_value = _readClauseInfo(); else if (!strncmp(token, "JOINMETHOD", length)) return_value = _readJoinMethod(); - else if (!strncmp(token, "JINFO", length)) - return_value = _readJInfo(); + else if (!strncmp(token, "JOININFO", length)) + return_value = _readJoinInfo(); else if (!strncmp(token, "HINFO", length)) return_value = _readHInfo(); else if (!strncmp(token, "ITER", length)) @@ -2031,7 +2031,7 @@ parsePlanString(void) else elog(ERROR, "badly formatted planstring \"%.10s\"...\n", token); - return ((Node *) return_value); + return (Node *) return_value; } /*------------------------------------------------------------*/ @@ -2092,5 +2092,5 @@ readDatum(Oid type) if (token[0] != ']') elog(ERROR, "readValue: ']' expected, length =%d", length); - return (res); + return res; } |