1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting.

This commit is contained in:
Bruce Momjian
1997-09-08 02:41:22 +00:00
parent a90f12fd9d
commit 319dbfa736
632 changed files with 28301 additions and 28220 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.7 1997/09/07 04:42:44 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.8 1997/09/08 02:23:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,7 +26,7 @@
#include "utils/elog.h"
#include "storage/itemptr.h"
static bool equali(List * a, List * b);
static bool equali(List * a, List * b);
/*
* Stuff from primnodes.h
@@ -35,7 +35,7 @@ static bool equali(List * a, List * b);
/*
* Resdom is a subclass of Node.
*/
static bool
static bool
_equalResdom(Resdom * a, Resdom * b)
{
if (a->resno != b->resno)
@@ -54,10 +54,10 @@ _equalResdom(Resdom * a, Resdom * b)
return (true);
}
static bool
static bool
_equalFjoin(Fjoin * a, Fjoin * b)
{
int nNodes;
int nNodes;
if (a->fj_initialized != b->fj_initialized)
return (false);
@@ -78,7 +78,7 @@ _equalFjoin(Fjoin * a, Fjoin * b)
/*
* Expr is a subclass of Node.
*/
static bool
static bool
_equalExpr(Expr * a, Expr * b)
{
if (a->opType != b->opType)
@@ -91,13 +91,13 @@ _equalExpr(Expr * a, Expr * b)
return (true);
}
static bool
static bool
_equalIter(Iter * a, Iter * b)
{
return (equal(a->iterexpr, b->iterexpr));
}
static bool
static bool
_equalStream(Stream * a, Stream * b)
{
if (a->clausetype != b->clausetype)
@@ -120,7 +120,7 @@ _equalStream(Stream * a, Stream * b)
/*
* Var is a subclass of Expr.
*/
static bool
static bool
_equalVar(Var * a, Var * b)
{
if (a->varno != b->varno)
@@ -137,7 +137,7 @@ _equalVar(Var * a, Var * b)
return (true);
}
static bool
static bool
_equalArray(Array * a, Array * b)
{
if (a->arrayelemtype != b->arrayelemtype)
@@ -153,7 +153,7 @@ _equalArray(Array * a, Array * b)
return (TRUE);
}
static bool
static bool
_equalArrayRef(ArrayRef * a, ArrayRef * b)
{
if (a->refelemtype != b->refelemtype)
@@ -176,7 +176,7 @@ _equalArrayRef(ArrayRef * a, ArrayRef * b)
/*
* Oper is a subclass of Expr.
*/
static bool
static bool
_equalOper(Oper * a, Oper * b)
{
if (a->opno != b->opno)
@@ -190,7 +190,7 @@ _equalOper(Oper * a, Oper * b)
/*
* Const is a subclass of Expr.
*/
static bool
static bool
_equalConst(Const * a, Const * b)
{
@@ -213,7 +213,7 @@ _equalConst(Const * a, Const * b)
/*
* Param is a subclass of Expr.
*/
static bool
static bool
_equalParam(Param * a, Param * b)
{
if (a->paramkind != b->paramkind)
@@ -225,26 +225,26 @@ _equalParam(Param * a, Param * b)
switch (a->paramkind)
{
case PARAM_NAMED:
case PARAM_NEW:
case PARAM_OLD:
if (strcmp(a->paramname, b->paramname) != 0)
return (false);
break;
case PARAM_NUM:
if (a->paramid != b->paramid)
return (false);
break;
case PARAM_INVALID:
case PARAM_NAMED:
case PARAM_NEW:
case PARAM_OLD:
if (strcmp(a->paramname, b->paramname) != 0)
return (false);
break;
case PARAM_NUM:
if (a->paramid != b->paramid)
return (false);
break;
case PARAM_INVALID:
/*
* XXX: Hmmm... What are we supposed to return in this case ??
*/
return (true);
break;
default:
elog(WARN, "_equalParam: Invalid paramkind value: %d",
a->paramkind);
/*
* XXX: Hmmm... What are we supposed to return in this case ??
*/
return (true);
break;
default:
elog(WARN, "_equalParam: Invalid paramkind value: %d",
a->paramkind);
}
return (true);
@@ -253,7 +253,7 @@ _equalParam(Param * a, Param * b)
/*
* Func is a subclass of Expr.
*/
static bool
static bool
_equalFunc(Func * a, Func * b)
{
if (a->funcid != b->funcid)
@@ -275,7 +275,7 @@ _equalFunc(Func * a, Func * b)
/*
* CInfo is a subclass of Node.
*/
static bool
static bool
_equalCInfo(CInfo * a, CInfo * b)
{
Assert(IsA(a, CInfo));
@@ -297,7 +297,7 @@ _equalCInfo(CInfo * a, CInfo * b)
(b->indexids)));
}
static bool
static bool
_equalJoinMethod(JoinMethod * a, JoinMethod * b)
{
Assert(IsA(a, JoinMethod));
@@ -312,7 +312,7 @@ _equalJoinMethod(JoinMethod * a, JoinMethod * b)
return (true);
}
static bool
static bool
_equalPath(Path * a, Path * b)
{
if (a->pathtype != b->pathtype)
@@ -325,7 +325,7 @@ _equalPath(Path * a, Path * b)
*/
if (a->p_ordering.ordtype == SORTOP_ORDER)
{
int i = 0;
int i = 0;
if (a->p_ordering.ord.sortop == NULL ||
b->p_ordering.ord.sortop == NULL)
@@ -367,7 +367,7 @@ _equalPath(Path * a, Path * b)
return (true);
}
static bool
static bool
_equalIndexPath(IndexPath * a, IndexPath * b)
{
if (!_equalPath((Path *) a, (Path *) b))
@@ -379,7 +379,7 @@ _equalIndexPath(IndexPath * a, IndexPath * b)
return (true);
}
static bool
static bool
_equalJoinPath(JoinPath * a, JoinPath * b)
{
Assert(IsA_JoinPath(a));
@@ -396,7 +396,7 @@ _equalJoinPath(JoinPath * a, JoinPath * b)
return (true);
}
static bool
static bool
_equalMergePath(MergePath * a, MergePath * b)
{
Assert(IsA(a, MergePath));
@@ -413,7 +413,7 @@ _equalMergePath(MergePath * a, MergePath * b)
return (true);
}
static bool
static bool
_equalHashPath(HashPath * a, HashPath * b)
{
Assert(IsA(a, HashPath));
@@ -430,7 +430,7 @@ _equalHashPath(HashPath * a, HashPath * b)
return (true);
}
static bool
static bool
_equalJoinKey(JoinKey * a, JoinKey * b)
{
Assert(IsA(a, JoinKey));
@@ -443,7 +443,7 @@ _equalJoinKey(JoinKey * a, JoinKey * b)
return (true);
}
static bool
static bool
_equalMergeOrder(MergeOrder * a, MergeOrder * b)
{
if (a == (MergeOrder *) NULL && b == (MergeOrder *) NULL)
@@ -464,7 +464,7 @@ _equalMergeOrder(MergeOrder * a, MergeOrder * b)
return (true);
}
static bool
static bool
_equalHInfo(HInfo * a, HInfo * b)
{
Assert(IsA(a, HInfo));
@@ -478,7 +478,7 @@ _equalHInfo(HInfo * a, HInfo * b)
/* XXX This equality function is a quick hack, should be
* fixed to compare all fields.
*/
static bool
static bool
_equalIndexScan(IndexScan * a, IndexScan * b)
{
Assert(IsA(a, IndexScan));
@@ -499,7 +499,7 @@ _equalIndexScan(IndexScan * a, IndexScan * b)
return (true);
}
static bool
static bool
_equalJInfo(JInfo * a, JInfo * b)
{
Assert(IsA(a, JInfo));
@@ -522,7 +522,7 @@ _equalJInfo(JInfo * a, JInfo * b)
/*
* EState is a subclass of Node.
*/
static bool
static bool
_equalEState(EState * a, EState * b)
{
if (a->es_direction != b->es_direction)
@@ -537,7 +537,7 @@ _equalEState(EState * a, EState * b)
return (true);
}
static bool
static bool
_equalTargetEntry(TargetEntry * a, TargetEntry * b)
{
if (!equal(a->resdom, b->resdom))
@@ -557,7 +557,7 @@ _equalTargetEntry(TargetEntry * a, TargetEntry * b)
* This is a comparison by value. It would be simpler to write it
* to be recursive, but it should run faster if we iterate.
*/
static bool
static bool
_equalValue(Value * a, Value * b)
{
if (a->type != b->type)
@@ -565,14 +565,14 @@ _equalValue(Value * a, Value * b)
switch (a->type)
{
case T_String:
return strcmp(a->val.str, b->val.str);
case T_Integer:
return (a->val.ival == b->val.ival);
case T_Float:
return (a->val.dval == b->val.dval);
default:
break;
case T_String:
return strcmp(a->val.str, b->val.str);
case T_Integer:
return (a->val.ival == b->val.ival);
case T_Float:
return (a->val.dval == b->val.dval);
default:
break;
}
return (true);
@@ -585,7 +585,7 @@ _equalValue(Value * a, Value * b)
bool
equal(void *a, void *b)
{
bool retval = false;
bool retval = false;
if (a == b)
return (true);
@@ -604,112 +604,112 @@ equal(void *a, void *b)
switch (nodeTag(a))
{
case T_Resdom:
retval = _equalResdom(a, b);
break;
case T_Fjoin:
retval = _equalFjoin(a, b);
break;
case T_Expr:
retval = _equalExpr(a, b);
break;
case T_TargetEntry:
retval = _equalTargetEntry(a, b);
break;
case T_Iter:
retval = _equalIter(a, b);
break;
case T_Stream:
retval = _equalStream(a, b);
break;
case T_Var:
retval = _equalVar(a, b);
break;
case T_Array:
retval = _equalArray(a, b);
break;
case T_ArrayRef:
retval = _equalArrayRef(a, b);
break;
case T_Oper:
retval = _equalOper(a, b);
break;
case T_Const:
retval = _equalConst(a, b);
break;
case T_Param:
retval = _equalParam(a, b);
break;
case T_Func:
retval = _equalFunc(a, b);
break;
case T_CInfo:
retval = _equalCInfo(a, b);
break;
case T_JoinMethod:
retval = _equalJoinMethod(a, b);
break;
case T_Path:
retval = _equalPath(a, b);
break;
case T_IndexPath:
retval = _equalIndexPath(a, b);
break;
case T_JoinPath:
retval = _equalJoinPath(a, b);
break;
case T_MergePath:
retval = _equalMergePath(a, b);
break;
case T_HashPath:
retval = _equalHashPath(a, b);
break;
case T_JoinKey:
retval = _equalJoinKey(a, b);
break;
case T_MergeOrder:
retval = _equalMergeOrder(a, b);
break;
case T_HInfo:
retval = _equalHInfo(a, b);
break;
case T_IndexScan:
retval = _equalIndexScan(a, b);
break;
case T_JInfo:
retval = _equalJInfo(a, b);
break;
case T_EState:
retval = _equalEState(a, b);
break;
case T_Integer:
case T_String:
case T_Float:
retval = _equalValue(a, b);
break;
case T_List:
{
List *la = (List *) a;
List *lb = (List *) b;
List *l;
if (a == NULL && b == NULL)
return (true);
if (length(a) != length(b))
return (false);
foreach(l, la)
case T_Resdom:
retval = _equalResdom(a, b);
break;
case T_Fjoin:
retval = _equalFjoin(a, b);
break;
case T_Expr:
retval = _equalExpr(a, b);
break;
case T_TargetEntry:
retval = _equalTargetEntry(a, b);
break;
case T_Iter:
retval = _equalIter(a, b);
break;
case T_Stream:
retval = _equalStream(a, b);
break;
case T_Var:
retval = _equalVar(a, b);
break;
case T_Array:
retval = _equalArray(a, b);
break;
case T_ArrayRef:
retval = _equalArrayRef(a, b);
break;
case T_Oper:
retval = _equalOper(a, b);
break;
case T_Const:
retval = _equalConst(a, b);
break;
case T_Param:
retval = _equalParam(a, b);
break;
case T_Func:
retval = _equalFunc(a, b);
break;
case T_CInfo:
retval = _equalCInfo(a, b);
break;
case T_JoinMethod:
retval = _equalJoinMethod(a, b);
break;
case T_Path:
retval = _equalPath(a, b);
break;
case T_IndexPath:
retval = _equalIndexPath(a, b);
break;
case T_JoinPath:
retval = _equalJoinPath(a, b);
break;
case T_MergePath:
retval = _equalMergePath(a, b);
break;
case T_HashPath:
retval = _equalHashPath(a, b);
break;
case T_JoinKey:
retval = _equalJoinKey(a, b);
break;
case T_MergeOrder:
retval = _equalMergeOrder(a, b);
break;
case T_HInfo:
retval = _equalHInfo(a, b);
break;
case T_IndexScan:
retval = _equalIndexScan(a, b);
break;
case T_JInfo:
retval = _equalJInfo(a, b);
break;
case T_EState:
retval = _equalEState(a, b);
break;
case T_Integer:
case T_String:
case T_Float:
retval = _equalValue(a, b);
break;
case T_List:
{
if (!equal(lfirst(l), lfirst(lb)))
List *la = (List *) a;
List *lb = (List *) b;
List *l;
if (a == NULL && b == NULL)
return (true);
if (length(a) != length(b))
return (false);
lb = lnext(lb);
foreach(l, la)
{
if (!equal(lfirst(l), lfirst(lb)))
return (false);
lb = lnext(lb);
}
retval = true;
}
retval = true;
}
break;
default:
elog(NOTICE, "equal: don't know whether nodes of type %d are equal",
nodeTag(a));
break;
break;
default:
elog(NOTICE, "equal: don't know whether nodes of type %d are equal",
nodeTag(a));
break;
}
return retval;
@@ -721,12 +721,12 @@ equal(void *a, void *b)
*
* XXX temp hack. needs something like T_IntList
*/
static bool
static bool
equali(List * a, List * b)
{
List *la = (List *) a;
List *lb = (List *) b;
List *l;
List *la = (List *) a;
List *lb = (List *) b;
List *l;
if (a == NULL && b == NULL)
return (true);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.5 1997/09/07 04:42:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.6 1997/09/08 02:23:38 momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
@@ -29,13 +29,13 @@
#include "utils/elog.h"
#include "utils/palloc.h"
List *
List *
makeList(void *elem,...)
{
va_list args;
List *retval = NIL;
List *temp = NIL;
List *tempcons = NIL;
va_list args;
List *retval = NIL;
List *temp = NIL;
List *tempcons = NIL;
va_start(args, elem);
@@ -57,62 +57,62 @@ makeList(void *elem,...)
return (retval);
}
List *
List *
lcons(void *obj, List * list)
{
List *l = makeNode(List);
List *l = makeNode(List);
lfirst(l) = obj;
lnext(l) = list;
return l;
}
List *
List *
lconsi(int datum, List * list)
{
List *l = makeNode(List);
List *l = makeNode(List);
lfirsti(l) = datum;
lnext(l) = list;
return l;
}
List *
List *
lappend(List * list, void *obj)
{
return nconc(list, lcons(obj, NIL));
}
List *
List *
lappendi(List * list, int datum)
{
return nconc(list, lconsi(datum, NIL));
}
Value *
Value *
makeInteger(long i)
{
Value *v = makeNode(Value);
Value *v = makeNode(Value);
v->type = T_Integer;
v->val.ival = i;
return v;
}
Value *
Value *
makeFloat(double d)
{
Value *v = makeNode(Value);
Value *v = makeNode(Value);
v->type = T_Float;
v->val.dval = d;
return v;
}
Value *
Value *
makeString(char *str)
{
Value *v = makeNode(Value);
Value *v = makeNode(Value);
v->type = T_String;
v->val.str = str;
@@ -120,7 +120,7 @@ makeString(char *str)
}
/* n starts with 0 */
void *
void *
nth(int n, List * l)
{
/* XXX assume list is long enough */
@@ -161,7 +161,7 @@ set_nth(List * l, int n, void *elem)
int
length(List * l)
{
int i = 0;
int i = 0;
while (l != NIL)
{
@@ -176,7 +176,7 @@ freeList(List * list)
{
while (list != NIL)
{
List *l = list;
List *l = list;
list = lnext(list);
pfree(l);
@@ -186,12 +186,12 @@ freeList(List * list)
/*
* below are for backwards compatibility
*/
List *
List *
append(List * l1, List * l2)
{
List *newlist,
*newlist2,
*p;
List *newlist,
*newlist2,
*p;
if (l1 == NIL)
return copyObject(l2);
@@ -208,12 +208,12 @@ append(List * l1, List * l2)
/*
* below are for backwards compatibility
*/
List *
List *
intAppend(List * l1, List * l2)
{
List *newlist,
*newlist2,
*p;
List *newlist,
*newlist2,
*p;
if (l1 == NIL)
return listCopy(l2);
@@ -227,10 +227,10 @@ intAppend(List * l1, List * l2)
return newlist;
}
List *
List *
nconc(List * l1, List * l2)
{
List *temp;
List *temp;
if (l1 == NIL)
return l2;
@@ -247,11 +247,11 @@ nconc(List * l1, List * l2)
}
List *
List *
nreverse(List * list)
{
List *rlist = NIL;
List *p = NIL;
List *rlist = NIL;
List *p = NIL;
if (list == NULL)
return (NIL);
@@ -280,7 +280,7 @@ nreverse(List * list)
bool
same(List * foo, List * bar)
{
List *temp = NIL;
List *temp = NIL;
if (foo == NULL)
return (bar == NULL);
@@ -299,12 +299,12 @@ same(List * foo, List * bar)
}
List *
List *
LispUnion(List * foo, List * bar)
{
List *retval = NIL;
List *i = NIL;
List *j = NIL;
List *retval = NIL;
List *i = NIL;
List *j = NIL;
if (foo == NIL)
return (bar); /* XXX - should be copy of bar */
@@ -331,12 +331,12 @@ LispUnion(List * foo, List * bar)
return (retval);
}
List *
List *
LispUnioni(List * foo, List * bar)
{
List *retval = NIL;
List *i = NIL;
List *j = NIL;
List *retval = NIL;
List *i = NIL;
List *j = NIL;
if (foo == NIL)
return (bar); /* XXX - should be copy of bar */
@@ -371,7 +371,7 @@ LispUnioni(List * foo, List * bar)
bool
member(void *foo, List * bar)
{
List *i;
List *i;
foreach(i, bar)
if (equal((Node *) (lfirst(i)), (Node *) foo))
@@ -382,7 +382,7 @@ member(void *foo, List * bar)
bool
intMember(int foo, List * bar)
{
List *i;
List *i;
foreach(i, bar)
if (foo == lfirsti(i))
@@ -394,12 +394,12 @@ intMember(int foo, List * bar)
* lremove -
* only does pointer comparisons. Removes 'elem' from the the linked list.
*/
List *
List *
lremove(void *elem, List * list)
{
List *l;
List *prev = NIL;
List *result = list;
List *l;
List *prev = NIL;
List *result = list;
foreach(l, list)
{
@@ -421,11 +421,11 @@ lremove(void *elem, List * list)
return result;
}
List *
List *
LispRemove(void *elem, List * list)
{
List *temp = NIL;
List *prev = NIL;
List *temp = NIL;
List *prev = NIL;
if (equal(elem, lfirst(list)))
return lnext(list);
@@ -446,11 +446,11 @@ LispRemove(void *elem, List * list)
}
#ifdef NOT_USED
List *
List *
intLispRemove(int elem, List * list)
{
List *temp = NIL;
List *prev = NIL;
List *temp = NIL;
List *prev = NIL;
if (elem == lfirsti(list))
return lnext(list);
@@ -472,11 +472,11 @@ intLispRemove(int elem, List * list)
#endif
List *
List *
set_difference(List * list1, List * list2)
{
List *temp1 = NIL;
List *result = NIL;
List *temp1 = NIL;
List *result = NIL;
if (list2 == NIL)
return (list1);
@@ -489,11 +489,11 @@ set_difference(List * list1, List * list2)
return (result);
}
List *
List *
set_differencei(List * list1, List * list2)
{
List *temp1 = NIL;
List *result = NIL;
List *temp1 = NIL;
List *result = NIL;
if (list2 == NIL)
return (list1);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.3 1997/09/07 04:42:48 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/makefuncs.c,v 1.4 1997/09/08 02:23:39 momjian Exp $
*
* NOTES
* Creator functions in POSTGRES 4.2 are generated automatically. Most of
@@ -27,14 +27,14 @@
* makeOper -
* creates an Oper node
*/
Oper *
Oper *
makeOper(Oid opno,
Oid opid,
Oid opresulttype,
int opsize,
FunctionCachePtr op_fcache)
{
Oper *oper = makeNode(Oper);
Oper *oper = makeNode(Oper);
oper->opno = opno;
oper->opid = opid;
@@ -49,14 +49,14 @@ makeOper(Oid opno,
* creates a Var node
*
*/
Var *
Var *
makeVar(Index varno,
AttrNumber varattno,
Oid vartype,
Index varnoold,
AttrNumber varoattno)
{
Var *var = makeNode(Var);
Var *var = makeNode(Var);
var->varno = varno;
var->varattno = varattno;
@@ -71,7 +71,7 @@ makeVar(Index varno,
* makeResdom -
* creates a Resdom (Result Domain) node
*/
Resdom *
Resdom *
makeResdom(AttrNumber resno,
Oid restype,
int reslen,
@@ -80,7 +80,7 @@ makeResdom(AttrNumber resno,
Oid reskeyop,
int resjunk)
{
Resdom *resdom = makeNode(Resdom);
Resdom *resdom = makeNode(Resdom);
resdom->resno = resno;
resdom->restype = restype;
@@ -96,7 +96,7 @@ makeResdom(AttrNumber resno,
* makeConst -
* creates a Const node
*/
Const *
Const *
makeConst(Oid consttype,
Size constlen,
Datum constvalue,
@@ -105,7 +105,7 @@ makeConst(Oid consttype,
bool constisset,
bool constiscast)
{
Const *cnst = makeNode(Const);
Const *cnst = makeNode(Const);
cnst->consttype = consttype;
cnst->constlen = constlen;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.4 1997/09/07 04:42:49 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/nodeFuncs.c,v 1.5 1997/09/08 02:23:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,7 +23,7 @@
#include "nodes/nodeFuncs.h"
#include "utils/lsyscache.h"
static bool var_is_inner(Var * var);
static bool var_is_inner(Var * var);
/*
* single_node -
@@ -63,7 +63,7 @@ var_is_outer(Var * var)
return ((bool) (var->varno == OUTER));
}
static bool
static bool
var_is_inner(Var * var)
{
return ((bool) (var->varno == INNER));
@@ -89,7 +89,7 @@ var_is_rel(Var * var)
* Returns the modified oper node.
*
*/
Oper *
Oper *
replace_opid(Oper * oper)
{
oper->opid = get_opcode(oper->opno);

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.2 1997/09/07 04:42:52 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/nodes.c,v 1.3 1997/09/08 02:23:40 momjian Exp $
*
* HISTORY
* Andrew Yu Oct 20, 1994 file creation
@@ -31,10 +31,10 @@
* macro makeNode. eg. to create a Resdom node, use makeNode(Resdom)
*
*/
Node *
Node *
newNode(Size size, NodeTag tag)
{
Node *newNode;
Node *newNode;
Assert(size >= 4); /* need the tag, at least */

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.7 1997/09/07 04:42:53 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.8 1997/09/08 02:23:41 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -45,8 +45,8 @@
#include "catalog/pg_type.h"
#include "lib/stringinfo.h"
static void _outDatum(StringInfo str, Datum value, Oid type);
static void _outNode(StringInfo str, void *obj);
static void _outDatum(StringInfo str, Datum value, Oid type);
static void _outNode(StringInfo str, void *obj);
/*
* _outIntList -
@@ -55,8 +55,8 @@ static void _outNode(StringInfo str, void *obj);
static void
_outIntList(StringInfo str, List * list)
{
List *l;
char buf[500];
List *l;
char buf[500];
appendStringInfo(str, "(");
foreach(l, list)
@@ -70,7 +70,7 @@ _outIntList(StringInfo str, List * list)
static void
_outQuery(StringInfo str, Query * node)
{
char buf[500];
char buf[500];
sprintf(buf, "QUERY");
appendStringInfo(str, buf);
@@ -112,7 +112,7 @@ _outQuery(StringInfo str, Query * node)
static void
_outPlanInfo(StringInfo str, Plan * node)
{
char buf[500];
char buf[500];
sprintf(buf, " :cost %g", node->cost);
appendStringInfo(str, buf);
@@ -144,7 +144,7 @@ _outPlanInfo(StringInfo str, Plan * node)
static void
_outPlan(StringInfo str, Plan * node)
{
char buf[500];
char buf[500];
sprintf(buf, "PLAN");
appendStringInfo(str, buf);
@@ -155,7 +155,7 @@ _outPlan(StringInfo str, Plan * node)
static void
_outResult(StringInfo str, Result * node)
{
char buf[500];
char buf[500];
sprintf(buf, "RESULT");
appendStringInfo(str, buf);
@@ -173,7 +173,7 @@ _outResult(StringInfo str, Result * node)
static void
_outExistential(StringInfo str, Existential * node)
{
char buf[500];
char buf[500];
sprintf(buf, "EXISTENTIAL");
appendStringInfo(str, buf);
@@ -188,7 +188,7 @@ _outExistential(StringInfo str, Existential * node)
static void
_outAppend(StringInfo str, Append * node)
{
char buf[500];
char buf[500];
sprintf(buf, "APPEND");
appendStringInfo(str, buf);
@@ -213,7 +213,7 @@ _outAppend(StringInfo str, Append * node)
static void
_outJoin(StringInfo str, Join * node)
{
char buf[500];
char buf[500];
sprintf(buf, "JOIN");
appendStringInfo(str, buf);
@@ -227,7 +227,7 @@ _outJoin(StringInfo str, Join * node)
static void
_outNestLoop(StringInfo str, NestLoop * node)
{
char buf[500];
char buf[500];
sprintf(buf, "NESTLOOP");
appendStringInfo(str, buf);
@@ -240,7 +240,7 @@ _outNestLoop(StringInfo str, NestLoop * node)
static void
_outMergeJoin(StringInfo str, MergeJoin * node)
{
char buf[500];
char buf[500];
sprintf(buf, "MERGEJOIN");
appendStringInfo(str, buf);
@@ -266,7 +266,7 @@ _outMergeJoin(StringInfo str, MergeJoin * node)
static void
_outHashJoin(StringInfo str, HashJoin * node)
{
char buf[500];
char buf[500];
sprintf(buf, "HASHJOIN");
appendStringInfo(str, buf);
@@ -294,7 +294,7 @@ _outHashJoin(StringInfo str, HashJoin * node)
static void
_outScan(StringInfo str, Scan * node)
{
char buf[500];
char buf[500];
sprintf(buf, "SCAN");
appendStringInfo(str, buf);
@@ -311,7 +311,7 @@ _outScan(StringInfo str, Scan * node)
static void
_outSeqScan(StringInfo str, SeqScan * node)
{
char buf[500];
char buf[500];
sprintf(buf, "SEQSCAN");
appendStringInfo(str, buf);
@@ -329,7 +329,7 @@ _outSeqScan(StringInfo str, SeqScan * node)
static void
_outIndexScan(StringInfo str, IndexScan * node)
{
char buf[500];
char buf[500];
sprintf(buf, "INDEXSCAN");
appendStringInfo(str, buf);
@@ -354,7 +354,7 @@ _outIndexScan(StringInfo str, IndexScan * node)
static void
_outTemp(StringInfo str, Temp * node)
{
char buf[500];
char buf[500];
sprintf(buf, "TEMP");
appendStringInfo(str, buf);
@@ -373,7 +373,7 @@ _outTemp(StringInfo str, Temp * node)
static void
_outSort(StringInfo str, Sort * node)
{
char buf[500];
char buf[500];
sprintf(buf, "SORT");
appendStringInfo(str, buf);
@@ -389,7 +389,7 @@ _outSort(StringInfo str, Sort * node)
static void
_outAgg(StringInfo str, Agg * node)
{
char buf[500];
char buf[500];
sprintf(buf, "AGG");
appendStringInfo(str, buf);
@@ -403,7 +403,7 @@ _outAgg(StringInfo str, Agg * node)
static void
_outGroup(StringInfo str, Group * node)
{
char buf[500];
char buf[500];
sprintf(buf, "GRP");
appendStringInfo(str, buf);
@@ -424,7 +424,7 @@ _outGroup(StringInfo str, Group * node)
static void
_outUnique(StringInfo str, Unique * node)
{
char buf[500];
char buf[500];
sprintf(buf, "UNIQUE");
appendStringInfo(str, buf);
@@ -444,7 +444,7 @@ _outUnique(StringInfo str, Unique * node)
static void
_outHash(StringInfo str, Hash * node)
{
char buf[500];
char buf[500];
sprintf(buf, "HASH");
appendStringInfo(str, buf);
@@ -465,7 +465,7 @@ _outHash(StringInfo str, Hash * node)
static void
_outTee(StringInfo str, Tee * node)
{
char buf[500];
char buf[500];
sprintf(buf, "TEE");
appendStringInfo(str, buf);
@@ -496,7 +496,7 @@ _outTee(StringInfo str, Tee * node)
static void
_outResdom(StringInfo str, Resdom * node)
{
char buf[500];
char buf[500];
sprintf(buf, "RESDOM");
appendStringInfo(str, buf);
@@ -521,8 +521,8 @@ _outResdom(StringInfo str, Resdom * node)
static void
_outFjoin(StringInfo str, Fjoin * node)
{
char buf[500];
int i;
char buf[500];
int i;
sprintf(buf, "FJOIN");
appendStringInfo(str, buf);
@@ -552,8 +552,8 @@ _outFjoin(StringInfo str, Fjoin * node)
static void
_outExpr(StringInfo str, Expr * node)
{
char buf[500];
char *opstr = NULL;
char buf[500];
char *opstr = NULL;
sprintf(buf, "EXPR");
appendStringInfo(str, buf);
@@ -562,21 +562,21 @@ _outExpr(StringInfo str, Expr * node)
appendStringInfo(str, buf);
switch (node->opType)
{
case OP_EXPR:
opstr = "op";
break;
case FUNC_EXPR:
opstr = "func";
break;
case OR_EXPR:
opstr = "or";
break;
case AND_EXPR:
opstr = "and";
break;
case NOT_EXPR:
opstr = "not";
break;
case OP_EXPR:
opstr = "op";
break;
case FUNC_EXPR:
opstr = "func";
break;
case OR_EXPR:
opstr = "or";
break;
case AND_EXPR:
opstr = "and";
break;
case NOT_EXPR:
opstr = "not";
break;
}
sprintf(buf, " :opType %s", opstr);
appendStringInfo(str, buf);
@@ -594,7 +594,7 @@ _outExpr(StringInfo str, Expr * node)
static void
_outVar(StringInfo str, Var * node)
{
char buf[500];
char buf[500];
sprintf(buf, "VAR");
appendStringInfo(str, buf);
@@ -616,7 +616,7 @@ _outVar(StringInfo str, Var * node)
static void
_outConst(StringInfo str, Const * node)
{
char buf[500];
char buf[500];
sprintf(buf, "CONST");
appendStringInfo(str, buf);
@@ -648,7 +648,7 @@ _outConst(StringInfo str, Const * node)
static void
_outAggreg(StringInfo str, Aggreg * node)
{
char buf[500];
char buf[500];
sprintf(buf, "AGGREG");
appendStringInfo(str, buf);
@@ -672,8 +672,8 @@ _outAggreg(StringInfo str, Aggreg * node)
static void
_outArray(StringInfo str, Array * node)
{
char buf[500];
int i;
char buf[500];
int i;
sprintf(buf, "ARRAY");
appendStringInfo(str, buf);
@@ -709,7 +709,7 @@ _outArray(StringInfo str, Array * node)
static void
_outArrayRef(StringInfo str, ArrayRef * node)
{
char buf[500];
char buf[500];
sprintf(buf, "ARRAYREF");
appendStringInfo(str, buf);
@@ -745,7 +745,7 @@ _outArrayRef(StringInfo str, ArrayRef * node)
static void
_outFunc(StringInfo str, Func * node)
{
char buf[500];
char buf[500];
sprintf(buf, "FUNC");
appendStringInfo(str, buf);
@@ -774,7 +774,7 @@ _outFunc(StringInfo str, Func * node)
static void
_outOper(StringInfo str, Oper * node)
{
char buf[500];
char buf[500];
sprintf(buf, "OPER");
appendStringInfo(str, buf);
@@ -793,7 +793,7 @@ _outOper(StringInfo str, Oper * node)
static void
_outParam(StringInfo str, Param * node)
{
char buf[500];
char buf[500];
sprintf(buf, "PARAM");
appendStringInfo(str, buf);
@@ -820,7 +820,7 @@ _outParam(StringInfo str, Param * node)
static void
_outEState(StringInfo str, EState * node)
{
char buf[500];
char buf[500];
sprintf(buf, "ESTATE");
appendStringInfo(str, buf);
@@ -843,7 +843,7 @@ _outEState(StringInfo str, EState * node)
static void
_outRel(StringInfo str, Rel * node)
{
char buf[500];
char buf[500];
sprintf(buf, "REL");
appendStringInfo(str, buf);
@@ -919,7 +919,7 @@ _outRel(StringInfo str, Rel * node)
static void
_outTargetEntry(StringInfo str, TargetEntry * node)
{
char buf[500];
char buf[500];
sprintf(buf, "TLE");
appendStringInfo(str, buf);
@@ -942,7 +942,7 @@ _outTargetEntry(StringInfo str, TargetEntry * node)
static void
_outRangeTblEntry(StringInfo str, RangeTblEntry * node)
{
char buf[500];
char buf[500];
sprintf(buf, "RTE");
appendStringInfo(str, buf);
@@ -968,7 +968,7 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry * node)
static void
_outPath(StringInfo str, Path * node)
{
char buf[500];
char buf[500];
sprintf(buf, "PATH");
appendStringInfo(str, buf);
@@ -991,7 +991,7 @@ _outPath(StringInfo str, Path * node)
static void
_outIndexPath(StringInfo str, IndexPath * node)
{
char buf[500];
char buf[500];
sprintf(buf, "INDEXPATH");
appendStringInfo(str, buf);
@@ -1032,7 +1032,7 @@ _outIndexPath(StringInfo str, IndexPath * node)
static void
_outJoinPath(StringInfo str, JoinPath * node)
{
char buf[500];
char buf[500];
sprintf(buf, "JOINPATH");
appendStringInfo(str, buf);
@@ -1086,7 +1086,7 @@ _outJoinPath(StringInfo str, JoinPath * node)
static void
_outMergePath(StringInfo str, MergePath * node)
{
char buf[500];
char buf[500];
sprintf(buf, "MERGEPATH");
appendStringInfo(str, buf);
@@ -1142,7 +1142,7 @@ _outMergePath(StringInfo str, MergePath * node)
static void
_outHashPath(StringInfo str, HashPath * node)
{
char buf[500];
char buf[500];
sprintf(buf, "HASHPATH");
appendStringInfo(str, buf);
@@ -1198,7 +1198,7 @@ _outHashPath(StringInfo str, HashPath * node)
static void
_outOrderKey(StringInfo str, OrderKey * node)
{
char buf[500];
char buf[500];
sprintf(buf, "ORDERKEY");
appendStringInfo(str, buf);
@@ -1215,7 +1215,7 @@ _outOrderKey(StringInfo str, OrderKey * node)
static void
_outJoinKey(StringInfo str, JoinKey * node)
{
char buf[500];
char buf[500];
sprintf(buf, "JOINKEY");
appendStringInfo(str, buf);
@@ -1236,7 +1236,7 @@ _outJoinKey(StringInfo str, JoinKey * node)
static void
_outMergeOrder(StringInfo str, MergeOrder * node)
{
char buf[500];
char buf[500];
sprintf(buf, "MERGEORDER");
appendStringInfo(str, buf);
@@ -1260,7 +1260,7 @@ _outMergeOrder(StringInfo str, MergeOrder * node)
static void
_outCInfo(StringInfo str, CInfo * node)
{
char buf[500];
char buf[500];
sprintf(buf, "CINFO");
appendStringInfo(str, buf);
@@ -1293,7 +1293,7 @@ _outCInfo(StringInfo str, CInfo * node)
static void
_outJoinMethod(StringInfo str, JoinMethod * node)
{
char buf[500];
char buf[500];
sprintf(buf, "JOINMETHOD");
appendStringInfo(str, buf);
@@ -1315,7 +1315,7 @@ _outJoinMethod(StringInfo str, JoinMethod * node)
static void
_outHInfo(StringInfo str, HInfo * node)
{
char buf[500];
char buf[500];
sprintf(buf, "HASHINFO");
appendStringInfo(str, buf);
@@ -1341,7 +1341,7 @@ _outHInfo(StringInfo str, HInfo * node)
static void
_outJInfo(StringInfo str, JInfo * node)
{
char buf[500];
char buf[500];
sprintf(buf, "JINFO");
appendStringInfo(str, buf);
@@ -1369,12 +1369,12 @@ _outJInfo(StringInfo str, JInfo * node)
static void
_outDatum(StringInfo str, Datum value, Oid type)
{
char buf[500];
Size length,
typeLength;
bool byValue;
int i;
char *s;
char buf[500];
Size length,
typeLength;
bool byValue;
int i;
char *s;
/*
* find some information about the type and the "real" length of the
@@ -1442,7 +1442,7 @@ _outIter(StringInfo str, Iter * node)
static void
_outStream(StringInfo str, Stream * node)
{
char buf[500];
char buf[500];
appendStringInfo(str, "STREAM");
@@ -1474,24 +1474,24 @@ _outStream(StringInfo str, Stream * node)
static void
_outValue(StringInfo str, Value * value)
{
char buf[500];
char buf[500];
switch (value->type)
{
case T_String:
sprintf(buf, "\"%s\"", value->val.str);
appendStringInfo(str, buf);
break;
case T_Integer:
sprintf(buf, "%ld", value->val.ival);
appendStringInfo(str, buf);
break;
case T_Float:
sprintf(buf, "%f", value->val.dval);
appendStringInfo(str, buf);
break;
default:
break;
case T_String:
sprintf(buf, "\"%s\"", value->val.str);
appendStringInfo(str, buf);
break;
case T_Integer:
sprintf(buf, "%ld", value->val.ival);
appendStringInfo(str, buf);
break;
case T_Float:
sprintf(buf, "%f", value->val.dval);
appendStringInfo(str, buf);
break;
default:
break;
}
return;
}
@@ -1511,7 +1511,7 @@ _outNode(StringInfo str, void *obj)
if (nodeTag(obj) == T_List)
{
List *l;
List *l;
appendStringInfo(str, "(");
foreach(l, (List *) obj)
@@ -1527,159 +1527,159 @@ _outNode(StringInfo str, void *obj)
appendStringInfo(str, "{");
switch (nodeTag(obj))
{
case T_Query:
_outQuery(str, obj);
break;
case T_Plan:
_outPlan(str, obj);
break;
case T_Result:
_outResult(str, obj);
break;
case T_Existential:
_outExistential(str, obj);
break;
case T_Append:
_outAppend(str, obj);
break;
case T_Join:
_outJoin(str, obj);
break;
case T_NestLoop:
_outNestLoop(str, obj);
break;
case T_MergeJoin:
_outMergeJoin(str, obj);
break;
case T_HashJoin:
_outHashJoin(str, obj);
break;
case T_Scan:
_outScan(str, obj);
break;
case T_SeqScan:
_outSeqScan(str, obj);
break;
case T_IndexScan:
_outIndexScan(str, obj);
break;
case T_Temp:
_outTemp(str, obj);
break;
case T_Sort:
_outSort(str, obj);
break;
case T_Agg:
_outAgg(str, obj);
break;
case T_Group:
_outGroup(str, obj);
break;
case T_Unique:
_outUnique(str, obj);
break;
case T_Hash:
_outHash(str, obj);
break;
case T_Tee:
_outTee(str, obj);
break;
case T_Resdom:
_outResdom(str, obj);
break;
case T_Fjoin:
_outFjoin(str, obj);
break;
case T_Expr:
_outExpr(str, obj);
break;
case T_Var:
_outVar(str, obj);
break;
case T_Const:
_outConst(str, obj);
break;
case T_Aggreg:
_outAggreg(str, obj);
break;
case T_Array:
_outArray(str, obj);
break;
case T_ArrayRef:
_outArrayRef(str, obj);
break;
case T_Func:
_outFunc(str, obj);
break;
case T_Oper:
_outOper(str, obj);
break;
case T_Param:
_outParam(str, obj);
break;
case T_EState:
_outEState(str, obj);
break;
case T_Rel:
_outRel(str, obj);
break;
case T_TargetEntry:
_outTargetEntry(str, obj);
break;
case T_RangeTblEntry:
_outRangeTblEntry(str, obj);
break;
case T_Path:
_outPath(str, obj);
break;
case T_IndexPath:
_outIndexPath(str, obj);
break;
case T_JoinPath:
_outJoinPath(str, obj);
break;
case T_MergePath:
_outMergePath(str, obj);
break;
case T_HashPath:
_outHashPath(str, obj);
break;
case T_OrderKey:
_outOrderKey(str, obj);
break;
case T_JoinKey:
_outJoinKey(str, obj);
break;
case T_MergeOrder:
_outMergeOrder(str, obj);
break;
case T_CInfo:
_outCInfo(str, obj);
break;
case T_JoinMethod:
_outJoinMethod(str, obj);
break;
case T_HInfo:
_outHInfo(str, obj);
break;
case T_JInfo:
_outJInfo(str, obj);
break;
case T_Iter:
_outIter(str, obj);
break;
case T_Stream:
_outStream(str, obj);
break;
case T_Integer:
case T_String:
case T_Float:
_outValue(str, obj);
break;
default:
elog(NOTICE, "_outNode: don't know how to print type %d",
nodeTag(obj));
break;
case T_Query:
_outQuery(str, obj);
break;
case T_Plan:
_outPlan(str, obj);
break;
case T_Result:
_outResult(str, obj);
break;
case T_Existential:
_outExistential(str, obj);
break;
case T_Append:
_outAppend(str, obj);
break;
case T_Join:
_outJoin(str, obj);
break;
case T_NestLoop:
_outNestLoop(str, obj);
break;
case T_MergeJoin:
_outMergeJoin(str, obj);
break;
case T_HashJoin:
_outHashJoin(str, obj);
break;
case T_Scan:
_outScan(str, obj);
break;
case T_SeqScan:
_outSeqScan(str, obj);
break;
case T_IndexScan:
_outIndexScan(str, obj);
break;
case T_Temp:
_outTemp(str, obj);
break;
case T_Sort:
_outSort(str, obj);
break;
case T_Agg:
_outAgg(str, obj);
break;
case T_Group:
_outGroup(str, obj);
break;
case T_Unique:
_outUnique(str, obj);
break;
case T_Hash:
_outHash(str, obj);
break;
case T_Tee:
_outTee(str, obj);
break;
case T_Resdom:
_outResdom(str, obj);
break;
case T_Fjoin:
_outFjoin(str, obj);
break;
case T_Expr:
_outExpr(str, obj);
break;
case T_Var:
_outVar(str, obj);
break;
case T_Const:
_outConst(str, obj);
break;
case T_Aggreg:
_outAggreg(str, obj);
break;
case T_Array:
_outArray(str, obj);
break;
case T_ArrayRef:
_outArrayRef(str, obj);
break;
case T_Func:
_outFunc(str, obj);
break;
case T_Oper:
_outOper(str, obj);
break;
case T_Param:
_outParam(str, obj);
break;
case T_EState:
_outEState(str, obj);
break;
case T_Rel:
_outRel(str, obj);
break;
case T_TargetEntry:
_outTargetEntry(str, obj);
break;
case T_RangeTblEntry:
_outRangeTblEntry(str, obj);
break;
case T_Path:
_outPath(str, obj);
break;
case T_IndexPath:
_outIndexPath(str, obj);
break;
case T_JoinPath:
_outJoinPath(str, obj);
break;
case T_MergePath:
_outMergePath(str, obj);
break;
case T_HashPath:
_outHashPath(str, obj);
break;
case T_OrderKey:
_outOrderKey(str, obj);
break;
case T_JoinKey:
_outJoinKey(str, obj);
break;
case T_MergeOrder:
_outMergeOrder(str, obj);
break;
case T_CInfo:
_outCInfo(str, obj);
break;
case T_JoinMethod:
_outJoinMethod(str, obj);
break;
case T_HInfo:
_outHInfo(str, obj);
break;
case T_JInfo:
_outJInfo(str, obj);
break;
case T_Iter:
_outIter(str, obj);
break;
case T_Stream:
_outStream(str, obj);
break;
case T_Integer:
case T_String:
case T_Float:
_outValue(str, obj);
break;
default:
elog(NOTICE, "_outNode: don't know how to print type %d",
nodeTag(obj));
break;
}
appendStringInfo(str, "}");
}
@@ -1690,11 +1690,11 @@ _outNode(StringInfo str, void *obj)
* nodeToString -
* returns the ascii representation of the Node
*/
char *
char *
nodeToString(void *obj)
{
StringInfo str;
char *s;
StringInfo str;
char *s;
if (obj == NULL)
return "";

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.7 1997/09/07 04:42:55 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.8 1997/09/08 02:23:42 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -33,7 +33,7 @@
#include "nodes/plannodes.h"
#include "optimizer/clauses.h"
static char *plannode_type(Plan * p);
static char *plannode_type(Plan * p);
/*
* print--
@@ -42,7 +42,7 @@ static char *plannode_type(Plan * p);
void
print(void *obj)
{
char *s;
char *s;
s = nodeToString(obj);
printf("%s\n", s);
@@ -56,11 +56,11 @@ print(void *obj)
void
pprint(void *obj)
{
char *s;
int i;
char line[80];
int indentLev;
int j;
char *s;
int i;
char line[80];
int indentLev;
int j;
s = nodeToString(obj);
@@ -77,44 +77,44 @@ pprint(void *obj)
line[j] = s[i];
switch (line[j])
{
case '}':
if (j != indentLev * 3)
{
line[j] = '\0';
printf("%s\n", line);
line[indentLev * 3] = '\0';
printf("%s}\n", line);
}
else
{
line[j] = '\0';
printf("%s}\n", line);
}
indentLev--;
j = indentLev * 3 - 1; /* print the line before : and
* resets */
break;
case ')':
line[j + 1] = '\0';
printf("%s\n", line);
j = indentLev * 3 - 1;
break;
case '{':
indentLev++;
/* !!! FALLS THROUGH */
case ':':
if (j != 0)
{
line[j] = '\0';
printf("%s\n", line);
/* print the line before : and resets */
for (j = 0; j < indentLev * 3; j++)
case '}':
if (j != indentLev * 3)
{
line[j] = ' ';
line[j] = '\0';
printf("%s\n", line);
line[indentLev * 3] = '\0';
printf("%s}\n", line);
}
}
line[j] = s[i];
break;
else
{
line[j] = '\0';
printf("%s}\n", line);
}
indentLev--;
j = indentLev * 3 - 1; /* print the line before :
* and resets */
break;
case ')':
line[j + 1] = '\0';
printf("%s\n", line);
j = indentLev * 3 - 1;
break;
case '{':
indentLev++;
/* !!! FALLS THROUGH */
case ':':
if (j != 0)
{
line[j] = '\0';
printf("%s\n", line);
/* print the line before : and resets */
for (j = 0; j < indentLev * 3; j++)
{
line[j] = ' ';
}
}
line[j] = s[i];
break;
}
}
line[j] = '\0';
@@ -137,14 +137,14 @@ pprint(void *obj)
void
print_rt(List * rtable)
{
List *l;
int i = 1;
List *l;
int i = 1;
printf("resno\trelname(refname)\trelid\tinFromCl\n");
printf("-----\t----------------\t-----\t--------\n");
foreach(l, rtable)
{
RangeTblEntry *rte = lfirst(l);
RangeTblEntry *rte = lfirst(l);
printf("%d\t%s(%s)\t%d\t%d\t%s\n",
i, rte->relname, rte->refname, rte->relid,
@@ -170,44 +170,44 @@ print_expr(Node * expr, List * rtable)
if (IsA(expr, Var))
{
Var *var = (Var *) expr;
RangeTblEntry *rt;
char *relname,
*attname;
Var *var = (Var *) expr;
RangeTblEntry *rt;
char *relname,
*attname;
switch (var->varno)
{
case INNER:
relname = "INNER";
attname = "?";
break;
case OUTER:
relname = "OUTER";
attname = "?";
break;
default:
{
Relation r;
case INNER:
relname = "INNER";
attname = "?";
break;
case OUTER:
relname = "OUTER";
attname = "?";
break;
default:
{
Relation r;
rt = rt_fetch(var->varno, rtable);
relname = rt->relname;
r = heap_openr(relname);
if (rt->refname)
relname = rt->refname; /* table renamed */
attname = getAttrName(r, var->varattno);
heap_close(r);
}
break;
rt = rt_fetch(var->varno, rtable);
relname = rt->relname;
r = heap_openr(relname);
if (rt->refname)
relname = rt->refname; /* table renamed */
attname = getAttrName(r, var->varattno);
heap_close(r);
}
break;
}
printf("%s.%s", relname, attname);
}
else if (IsA(expr, Expr))
{
Expr *e = (Expr *) expr;
Expr *e = (Expr *) expr;
if (is_opclause(expr))
{
char *opname;
char *opname;
print_expr((Node *) get_leftop(e), rtable);
opname = get_opname(((Oper *) e->oper)->opno);
@@ -232,12 +232,12 @@ print_expr(Node * expr, List * rtable)
void
print_keys(List * keys, List * rtable)
{
List *k;
List *k;
printf("(");
foreach(k, keys)
{
Node *var = lfirst((List *) lfirst(k));
Node *var = lfirst((List *) lfirst(k));
print_expr(var, rtable);
if (lnext(k))
@@ -253,12 +253,12 @@ print_keys(List * keys, List * rtable)
void
print_tl(List * tlist, List * rtable)
{
List *tl;
List *tl;
printf("(\n");
foreach(tl, tlist)
{
TargetEntry *tle = lfirst(tl);
TargetEntry *tle = lfirst(tl);
printf("\t%d %s\t", tle->resdom->resno, tle->resdom->resname);
if (tle->resdom->reskey != 0)
@@ -296,74 +296,74 @@ print_slot(TupleTableSlot * slot)
debugtup(slot->val, slot->ttc_tupleDescriptor);
}
static char *
static char *
plannode_type(Plan * p)
{
switch (nodeTag(p))
{
case T_Plan:
return "PLAN";
break;
case T_Existential:
return "EXISTENTIAL";
break;
case T_Result:
return "RESULT";
break;
case T_Append:
return "APPEND";
break;
case T_Scan:
return "SCAN";
break;
case T_SeqScan:
return "SEQSCAN";
break;
case T_IndexScan:
return "INDEXSCAN";
break;
case T_Join:
return "JOIN";
break;
case T_NestLoop:
return "NESTLOOP";
break;
case T_MergeJoin:
return "MERGEJOIN";
break;
case T_HashJoin:
return "HASHJOIN";
break;
case T_Temp:
return "TEMP";
break;
case T_Material:
return "MATERIAL";
break;
case T_Sort:
return "SORT";
break;
case T_Agg:
return "AGG";
break;
case T_Unique:
return "UNIQUE";
break;
case T_Hash:
return "HASH";
break;
case T_Tee:
return "TEE";
break;
case T_Choose:
return "CHOOSE";
break;
case T_Group:
return "GROUP";
break;
default:
return "UNKNOWN";
break;
case T_Plan:
return "PLAN";
break;
case T_Existential:
return "EXISTENTIAL";
break;
case T_Result:
return "RESULT";
break;
case T_Append:
return "APPEND";
break;
case T_Scan:
return "SCAN";
break;
case T_SeqScan:
return "SEQSCAN";
break;
case T_IndexScan:
return "INDEXSCAN";
break;
case T_Join:
return "JOIN";
break;
case T_NestLoop:
return "NESTLOOP";
break;
case T_MergeJoin:
return "MERGEJOIN";
break;
case T_HashJoin:
return "HASHJOIN";
break;
case T_Temp:
return "TEMP";
break;
case T_Material:
return "MATERIAL";
break;
case T_Sort:
return "SORT";
break;
case T_Agg:
return "AGG";
break;
case T_Unique:
return "UNIQUE";
break;
case T_Hash:
return "HASH";
break;
case T_Tee:
return "TEE";
break;
case T_Choose:
return "CHOOSE";
break;
case T_Group:
return "GROUP";
break;
default:
return "UNKNOWN";
break;
}
}
@@ -377,8 +377,8 @@ plannode_type(Plan * p)
void
print_plan_recursive(Plan * p, Query * parsetree, int indentLevel, char *label)
{
int i;
char extraInfo[100];
int i;
char extraInfo[100];
if (!p)
return;
@@ -388,7 +388,7 @@ print_plan_recursive(Plan * p, Query * parsetree, int indentLevel, char *label)
p->cost, p->plan_size, p->plan_width);
if (IsA(p, Scan) || IsA(p, SeqScan))
{
RangeTblEntry *rte;
RangeTblEntry *rte;
rte = rt_fetch(((Scan *) p)->scanrelid, parsetree->rtable);
strNcpy(extraInfo, rte->relname, NAMEDATALEN - 1);

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.4 1997/09/07 04:42:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.5 1997/09/08 02:23:43 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -28,10 +28,10 @@
* stringToNode -
* returns a Node with a given legal ascii representation
*/
void *
void *
stringToNode(char *str)
{
void *retval;
void *retval;
lsptok(str, NULL); /* set the string used in lsptok */
retval = nodeRead(true); /* start reading */
@@ -61,10 +61,10 @@ stringToNode(char *str)
*
* Assumption: the ascii representation is legal
*/
static NodeTag
static NodeTag
nodeTokenType(char *token, int length)
{
NodeTag retval = 0;
NodeTag retval = 0;
/*
* Check if the token is a number (decimal or integer, positive or
@@ -116,11 +116,11 @@ nodeTokenType(char *token, int length)
* returning a token by calling lsptok with length == NULL.
*
*/
char *
char *
lsptok(char *string, int *length)
{
static char *local_str;
char *ret_string;
static char *local_str;
char *ret_string;
if (string != NULL)
{
@@ -174,16 +174,16 @@ lsptok(char *string, int *length)
* Secrets: He assumes that lsptok already has the string (see below).
* Any callers should set read_car_only to true.
*/
void *
void *
nodeRead(bool read_car_only)
{
char *token;
NodeTag type;
Node *this_value = NULL,
*return_value = NULL;
int tok_len;
char tmp;
bool make_dotted_pair_cell = false;
char *token;
NodeTag type;
Node *this_value = NULL,
*return_value = NULL;
int tok_len;
char tmp;
bool make_dotted_pair_cell = false;
token = lsptok(NULL, &tok_len);
@@ -194,93 +194,93 @@ nodeRead(bool read_car_only)
switch (type)
{
case PLAN_SYM:
this_value = parsePlanString();
token = lsptok(NULL, &tok_len);
if (token[0] != '}')
return (NULL);
case PLAN_SYM:
this_value = parsePlanString();
token = lsptok(NULL, &tok_len);
if (token[0] != '}')
return (NULL);
if (!read_car_only)
make_dotted_pair_cell = true;
else
make_dotted_pair_cell = false;
break;
case LEFT_PAREN:
if (!read_car_only)
{
List *l = makeNode(List);
lfirst(l) = nodeRead(false);
lnext(l) = nodeRead(false);
this_value = (Node *) l;
}
else
{
this_value = nodeRead(false);
}
break;
case RIGHT_PAREN:
this_value = NULL;
break;
case AT_SYMBOL:
break;
case ATOM_TOKEN:
if (!strncmp(token, "nil", 3))
{
this_value = NULL;
/*
* It might be "nil" but it is an atom!
*/
if (read_car_only)
{
if (!read_car_only)
make_dotted_pair_cell = true;
else
make_dotted_pair_cell = false;
break;
case LEFT_PAREN:
if (!read_car_only)
{
List *l = makeNode(List);
lfirst(l) = nodeRead(false);
lnext(l) = nodeRead(false);
this_value = (Node *) l;
}
else
{
make_dotted_pair_cell = true;
this_value = nodeRead(false);
}
}
else
{
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) pstrdup(token); /* !attention! not a
break;
case RIGHT_PAREN:
this_value = NULL;
break;
case AT_SYMBOL:
break;
case ATOM_TOKEN:
if (!strncmp(token, "nil", 3))
{
this_value = NULL;
/*
* It might be "nil" but it is an atom!
*/
if (read_car_only)
{
make_dotted_pair_cell = false;
}
else
{
make_dotted_pair_cell = true;
}
}
else
{
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) pstrdup(token); /* !attention! not a
* Node. use with
* caution */
token[tok_len] = tmp;
make_dotted_pair_cell = true;
}
break;
case T_Float:
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) makeFloat(atof(token));
token[tok_len] = tmp;
make_dotted_pair_cell = true;
}
break;
case T_Float:
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) makeFloat(atof(token));
token[tok_len] = tmp;
make_dotted_pair_cell = true;
break;
case T_Integer:
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) makeInteger(atoi(token));
token[tok_len] = tmp;
make_dotted_pair_cell = true;
break;
case T_String:
tmp = token[tok_len - 1];
token[tok_len - 1] = '\0';
token++;
this_value = (Node *) makeString(token); /* !! not strdup'd */
token[tok_len - 2] = tmp;
make_dotted_pair_cell = true;
break;
default:
elog(WARN, "nodeRead: Bad type %d", type);
break;
break;
case T_Integer:
tmp = token[tok_len];
token[tok_len] = '\0';
this_value = (Node *) makeInteger(atoi(token));
token[tok_len] = tmp;
make_dotted_pair_cell = true;
break;
case T_String:
tmp = token[tok_len - 1];
token[tok_len - 1] = '\0';
token++;
this_value = (Node *) makeString(token); /* !! not strdup'd */
token[tok_len - 2] = tmp;
make_dotted_pair_cell = true;
break;
default:
elog(WARN, "nodeRead: Bad type %d", type);
break;
}
if (make_dotted_pair_cell)
{
List *l = makeNode(List);
List *l = makeNode(List);
lfirst(l) = this_value;
if (!read_car_only)

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.7 1997/09/07 04:42:57 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.8 1997/09/08 02:23:45 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -51,12 +51,12 @@
* ----------------
*/
static Datum readDatum(Oid type);
static Datum readDatum(Oid type);
static List *
static List *
toIntList(List * list)
{
List *l;
List *l;
foreach(l, list)
{
@@ -70,12 +70,12 @@ toIntList(List * list)
* _readQuery
* ----------------
*/
static Query *
static Query *
_readQuery()
{
Query *local_node;
char *token;
int length;
Query *local_node;
char *token;
int length;
local_node = makeNode(Query);
@@ -89,7 +89,7 @@ _readQuery()
local_node->utilityStmt = NULL;
else
{
NotifyStmt *n = makeNode(NotifyStmt);
NotifyStmt *n = makeNode(NotifyStmt);
n->relname = palloc(length + 1);
strNcpy(n->relname, token, length);
@@ -130,8 +130,8 @@ _readQuery()
static void
_getPlan(Plan * node)
{
char *token;
int length;
char *token;
int length;
token = lsptok(NULL, &length); /* first token is :cost */
token = lsptok(NULL, &length); /* next is the actual cost */
@@ -181,10 +181,10 @@ _getPlan(Plan * node)
* _readPlan
* ----------------
*/
static Plan *
static Plan *
_readPlan()
{
Plan *local_node;
Plan *local_node;
local_node = makeNode(Plan);
@@ -200,12 +200,12 @@ _readPlan()
* sizes of things.
* ----------------
*/
static Result *
static Result *
_readResult()
{
Result *local_node;
char *token;
int length;
Result *local_node;
char *token;
int length;
local_node = makeNode(Result);
@@ -226,7 +226,7 @@ _readResult()
static Existential *
_readExistential()
{
Existential *local_node;
Existential *local_node;
local_node = makeNode(Existential);
@@ -242,12 +242,12 @@ _readExistential()
* ----------------
*/
static Append *
static Append *
_readAppend()
{
Append *local_node;
char *token;
int length;
Append *local_node;
char *token;
int length;
local_node = makeNode(Append);
@@ -285,10 +285,10 @@ _getJoin(Join * node)
* Join is a subclass of Plan
* ----------------
*/
static Join *
static Join *
_readJoin()
{
Join *local_node;
Join *local_node;
local_node = makeNode(Join);
@@ -307,7 +307,7 @@ _readJoin()
static NestLoop *
_readNestLoop()
{
NestLoop *local_node;
NestLoop *local_node;
local_node = makeNode(NestLoop);
@@ -325,9 +325,9 @@ _readNestLoop()
static MergeJoin *
_readMergeJoin()
{
MergeJoin *local_node;
char *token;
int length;
MergeJoin *local_node;
char *token;
int length;
local_node = makeNode(MergeJoin);
@@ -351,9 +351,9 @@ _readMergeJoin()
static HashJoin *
_readHashJoin()
{
HashJoin *local_node;
char *token;
int length;
HashJoin *local_node;
char *token;
int length;
local_node = makeNode(HashJoin);
@@ -398,8 +398,8 @@ _readHashJoin()
static void
_getScan(Scan * node)
{
char *token;
int length;
char *token;
int length;
_getPlan((Plan *) node);
@@ -414,10 +414,10 @@ _getScan(Scan * node)
* Scan is a subclass of Plan (Not Node, see above).
* ----------------
*/
static Scan *
static Scan *
_readScan()
{
Scan *local_node;
Scan *local_node;
local_node = makeNode(Scan);
@@ -435,7 +435,7 @@ _readScan()
static SeqScan *
_readSeqScan()
{
SeqScan *local_node;
SeqScan *local_node;
local_node = makeNode(SeqScan);
@@ -453,9 +453,9 @@ _readSeqScan()
static IndexScan *
_readIndexScan()
{
IndexScan *local_node;
char *token;
int length;
IndexScan *local_node;
char *token;
int length;
local_node = makeNode(IndexScan);
@@ -477,12 +477,12 @@ _readIndexScan()
* Temp is a subclass of Plan
* ----------------
*/
static Temp *
static Temp *
_readTemp()
{
Temp *local_node;
char *token;
int length;
Temp *local_node;
char *token;
int length;
local_node = makeNode(Temp);
@@ -505,12 +505,12 @@ _readTemp()
* Sort is a subclass of Temp
* ----------------
*/
static Sort *
static Sort *
_readSort()
{
Sort *local_node;
char *token;
int length;
Sort *local_node;
char *token;
int length;
local_node = makeNode(Sort);
@@ -527,12 +527,12 @@ _readSort()
return (local_node);
}
static Agg *
static Agg *
_readAgg()
{
Agg *local_node;
char *token;
int length;
Agg *local_node;
char *token;
int length;
local_node = makeNode(Agg);
_getPlan((Plan *) local_node);
@@ -549,12 +549,12 @@ _readAgg()
*
* For some reason, unique is a subclass of Temp.
*/
static Unique *
static Unique *
_readUnique()
{
Unique *local_node;
char *token;
int length;
Unique *local_node;
char *token;
int length;
local_node = makeNode(Unique);
@@ -577,12 +577,12 @@ _readUnique()
* Hash is a subclass of Temp
* ----------------
*/
static Hash *
static Hash *
_readHash()
{
Hash *local_node;
char *token;
int length;
Hash *local_node;
char *token;
int length;
local_node = makeNode(Hash);
@@ -616,12 +616,12 @@ _readHash()
* Resdom is a subclass of Node
* ----------------
*/
static Resdom *
static Resdom *
_readResdom()
{
Resdom *local_node;
char *token;
int length;
Resdom *local_node;
char *token;
int length;
local_node = makeNode(Resdom);
@@ -680,12 +680,12 @@ _readResdom()
* Expr is a subclass of Node
* ----------------
*/
static Expr *
static Expr *
_readExpr()
{
Expr *local_node;
char *token;
int length;
Expr *local_node;
char *token;
int length;
local_node = makeNode(Expr);
@@ -731,12 +731,12 @@ _readExpr()
* Var is a subclass of Expr
* ----------------
*/
static Var *
static Var *
_readVar()
{
Var *local_node;
char *token;
int length;
Var *local_node;
char *token;
int length;
local_node = makeNode(Var);
@@ -769,12 +769,12 @@ _readVar()
* Array is a subclass of Expr
* ----------------
*/
static Array *
static Array *
_readArray()
{
Array *local_node;
char *token;
int length;
Array *local_node;
char *token;
int length;
local_node = makeNode(Array);
@@ -814,9 +814,9 @@ _readArray()
static ArrayRef *
_readArrayRef()
{
ArrayRef *local_node;
char *token;
int length;
ArrayRef *local_node;
char *token;
int length;
local_node = makeNode(ArrayRef);
@@ -857,12 +857,12 @@ _readArrayRef()
* Const is a subclass of Expr
* ----------------
*/
static Const *
static Const *
_readConst()
{
Const *local_node;
char *token;
int length;
Const *local_node;
char *token;
int length;
local_node = makeNode(Const);
@@ -924,12 +924,12 @@ _readConst()
* Func is a subclass of Expr
* ----------------
*/
static Func *
static Func *
_readFunc()
{
Func *local_node;
char *token;
int length;
Func *local_node;
char *token;
int length;
local_node = makeNode(Func);
@@ -978,12 +978,12 @@ _readFunc()
* Oper is a subclass of Expr
* ----------------
*/
static Oper *
static Oper *
_readOper()
{
Oper *local_node;
char *token;
int length;
Oper *local_node;
char *token;
int length;
local_node = makeNode(Oper);
@@ -1014,12 +1014,12 @@ _readOper()
* Param is a subclass of Expr
* ----------------
*/
static Param *
static Param *
_readParam()
{
Param *local_node;
char *token;
int length;
Param *local_node;
char *token;
int length;
local_node = makeNode(Param);
@@ -1055,12 +1055,12 @@ _readParam()
* Aggreg is a subclass of Node
* ----------------
*/
static Aggreg *
static Aggreg *
_readAggreg()
{
Aggreg *local_node;
char *token;
int length;
Aggreg *local_node;
char *token;
int length;
local_node = makeNode(Aggreg);
@@ -1097,12 +1097,12 @@ _readAggreg()
* EState is a subclass of Node.
* ----------------
*/
static EState *
static EState *
_readEState()
{
EState *local_node;
char *token;
int length;
EState *local_node;
char *token;
int length;
local_node = makeNode(EState);
@@ -1132,12 +1132,12 @@ _readEState()
* _readRel
* ----------------
*/
static Rel *
static Rel *
_readRel()
{
Rel *local_node;
char *token;
int length;
Rel *local_node;
char *token;
int length;
local_node = makeNode(Rel);
@@ -1217,9 +1217,9 @@ _readRel()
static TargetEntry *
_readTargetEntry()
{
TargetEntry *local_node;
char *token;
int length;
TargetEntry *local_node;
char *token;
int length;
local_node = makeNode(TargetEntry);
@@ -1239,9 +1239,9 @@ _readTargetEntry()
static RangeTblEntry *
_readRangeTblEntry()
{
RangeTblEntry *local_node;
char *token;
int length;
RangeTblEntry *local_node;
char *token;
int length;
local_node = makeNode(RangeTblEntry);
@@ -1303,12 +1303,12 @@ _readRangeTblEntry()
* Path is a subclass of Node.
* ----------------
*/
static Path *
static Path *
_readPath()
{
Path *local_node;
char *token;
int length;
Path *local_node;
char *token;
int length;
local_node = makeNode(Path);
@@ -1341,9 +1341,9 @@ _readPath()
static IndexPath *
_readIndexPath()
{
IndexPath *local_node;
char *token;
int length;
IndexPath *local_node;
char *token;
int length;
local_node = makeNode(IndexPath);
@@ -1382,9 +1382,9 @@ _readIndexPath()
static JoinPath *
_readJoinPath()
{
JoinPath *local_node;
char *token;
int length;
JoinPath *local_node;
char *token;
int length;
local_node = makeNode(JoinPath);
@@ -1449,9 +1449,9 @@ _readJoinPath()
static MergePath *
_readMergePath()
{
MergePath *local_node;
char *token;
int length;
MergePath *local_node;
char *token;
int length;
local_node = makeNode(MergePath);
@@ -1526,9 +1526,9 @@ _readMergePath()
static HashPath *
_readHashPath()
{
HashPath *local_node;
char *token;
int length;
HashPath *local_node;
char *token;
int length;
local_node = makeNode(HashPath);
@@ -1603,9 +1603,9 @@ _readHashPath()
static OrderKey *
_readOrderKey()
{
OrderKey *local_node;
char *token;
int length;
OrderKey *local_node;
char *token;
int length;
local_node = makeNode(OrderKey);
@@ -1631,9 +1631,9 @@ _readOrderKey()
static JoinKey *
_readJoinKey()
{
JoinKey *local_node;
char *token;
int length;
JoinKey *local_node;
char *token;
int length;
local_node = makeNode(JoinKey);
@@ -1655,9 +1655,9 @@ _readJoinKey()
static MergeOrder *
_readMergeOrder()
{
MergeOrder *local_node;
char *token;
int length;
MergeOrder *local_node;
char *token;
int length;
local_node = makeNode(MergeOrder);
token = lsptok(NULL, &length); /* get :join_operator */
@@ -1694,12 +1694,12 @@ _readMergeOrder()
* CInfo is a subclass of Node.
* ----------------
*/
static CInfo *
static CInfo *
_readCInfo()
{
CInfo *local_node;
char *token;
int length;
CInfo *local_node;
char *token;
int length;
local_node = makeNode(CInfo);
@@ -1746,9 +1746,9 @@ _readCInfo()
static JoinMethod *
_readJoinMethod()
{
JoinMethod *local_node;
char *token;
int length;
JoinMethod *local_node;
char *token;
int length;
local_node = makeNode(JoinMethod);
@@ -1767,12 +1767,12 @@ _readJoinMethod()
* HInfo is a subclass of JoinMethod.
* ----------------
*/
static HInfo *
static HInfo *
_readHInfo()
{
HInfo *local_node;
char *token;
int length;
HInfo *local_node;
char *token;
int length;
local_node = makeNode(HInfo);
@@ -1796,12 +1796,12 @@ _readHInfo()
* JInfo is a subclass of Node.
* ----------------
*/
static JInfo *
static JInfo *
_readJInfo()
{
JInfo *local_node;
char *token;
int length;
JInfo *local_node;
char *token;
int length;
local_node = makeNode(JInfo);
@@ -1842,12 +1842,12 @@ _readJInfo()
*
* ----------------
*/
static Iter *
static Iter *
_readIter()
{
Iter *local_node;
char *token;
int length;
Iter *local_node;
char *token;
int length;
local_node = makeNode(Iter);
@@ -1867,12 +1867,12 @@ _readIter()
* The string passed to parsePlanString must be null-terminated.
* ----------------
*/
Node *
Node *
parsePlanString(void)
{
char *token;
int length;
void *return_value = NULL;
char *token;
int length;
void *return_value = NULL;
token = lsptok(NULL, &length);
@@ -2070,16 +2070,16 @@ parsePlanString(void)
* create the appropriate Datum
* ----------------
*/
static Datum
static Datum
readDatum(Oid type)
{
int length;
int tokenLength;
char *token;
bool byValue;
Datum res;
char *s;
int i;
int length;
int tokenLength;
char *token;
bool byValue;
Datum res;
char *s;
int i;
byValue = get_typbyval(type);