mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
pgindent run over code.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.80 1999/05/18 21:34:27 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.81 1999/05/25 16:09:04 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -92,7 +92,7 @@ CopyPlanFields(Plan *from, Plan *newnode)
|
||||
newnode->chgParam = listCopy(from->chgParam);
|
||||
Node_Copy(from, newnode, initPlan);
|
||||
if (from->subPlan != NULL)
|
||||
newnode->subPlan = SS_pull_subplan((Node*) newnode->qual);
|
||||
newnode->subPlan = SS_pull_subplan((Node *) newnode->qual);
|
||||
else
|
||||
newnode->subPlan = NULL;
|
||||
newnode->nParamExec = from->nParamExec;
|
||||
@@ -138,10 +138,12 @@ _copyResult(Result *from)
|
||||
*/
|
||||
Node_Copy(from, newnode, resconstantqual);
|
||||
|
||||
/* We must add subplans in resconstantqual to the new plan's subPlan list
|
||||
/*
|
||||
* We must add subplans in resconstantqual to the new plan's subPlan
|
||||
* list
|
||||
*/
|
||||
newnode->plan.subPlan = nconc(newnode->plan.subPlan,
|
||||
SS_pull_subplan(newnode->resconstantqual));
|
||||
SS_pull_subplan(newnode->resconstantqual));
|
||||
|
||||
return newnode;
|
||||
}
|
||||
@@ -369,7 +371,7 @@ _copyHashJoin(HashJoin *from)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
CopyNonameFields(Noname *from, Noname *newnode)
|
||||
CopyNonameFields(Noname * from, Noname * newnode)
|
||||
{
|
||||
newnode->nonameid = from->nonameid;
|
||||
newnode->keycount = from->keycount;
|
||||
@@ -382,7 +384,7 @@ CopyNonameFields(Noname *from, Noname *newnode)
|
||||
* ----------------
|
||||
*/
|
||||
static Noname *
|
||||
_copyNoname(Noname *from)
|
||||
_copyNoname(Noname * from)
|
||||
{
|
||||
Noname *newnode = makeNode(Noname);
|
||||
|
||||
@@ -466,9 +468,10 @@ _copyAgg(Agg *from)
|
||||
|
||||
CopyPlanFields((Plan *) from, (Plan *) newnode);
|
||||
|
||||
/* Cannot copy agg list; it must be rebuilt to point to subnodes of
|
||||
/*
|
||||
* Cannot copy agg list; it must be rebuilt to point to subnodes of
|
||||
* new node.
|
||||
*/
|
||||
*/
|
||||
set_agg_tlist_references(newnode);
|
||||
|
||||
return newnode;
|
||||
@@ -859,7 +862,7 @@ _copyFunc(Func *from)
|
||||
* ----------------
|
||||
*/
|
||||
static Aggref *
|
||||
_copyAggref(Aggref *from)
|
||||
_copyAggref(Aggref * from)
|
||||
{
|
||||
Aggref *newnode = makeNode(Aggref);
|
||||
|
||||
@@ -904,7 +907,7 @@ _copySubLink(SubLink *from)
|
||||
* ----------------
|
||||
*/
|
||||
static CaseExpr *
|
||||
_copyCaseExpr(CaseExpr *from)
|
||||
_copyCaseExpr(CaseExpr * from)
|
||||
{
|
||||
CaseExpr *newnode = makeNode(CaseExpr);
|
||||
|
||||
@@ -926,7 +929,7 @@ _copyCaseExpr(CaseExpr *from)
|
||||
* ----------------
|
||||
*/
|
||||
static CaseWhen *
|
||||
_copyCaseWhen(CaseWhen *from)
|
||||
_copyCaseWhen(CaseWhen * from)
|
||||
{
|
||||
CaseWhen *newnode = makeNode(CaseWhen);
|
||||
|
||||
@@ -1170,7 +1173,7 @@ _copyIndexPath(IndexPath *from)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
CopyNestPathFields(NestPath *from, NestPath *newnode)
|
||||
CopyNestPathFields(NestPath * from, NestPath * newnode)
|
||||
{
|
||||
Node_Copy(from, newnode, pathinfo);
|
||||
Node_Copy(from, newnode, outerjoinpath);
|
||||
@@ -1182,7 +1185,7 @@ CopyNestPathFields(NestPath *from, NestPath *newnode)
|
||||
* ----------------
|
||||
*/
|
||||
static NestPath *
|
||||
_copyNestPath(NestPath *from)
|
||||
_copyNestPath(NestPath * from)
|
||||
{
|
||||
NestPath *newnode = makeNode(NestPath);
|
||||
|
||||
@@ -1316,7 +1319,7 @@ _copyMergeOrder(MergeOrder *from)
|
||||
* ----------------
|
||||
*/
|
||||
static RestrictInfo *
|
||||
_copyRestrictInfo(RestrictInfo *from)
|
||||
_copyRestrictInfo(RestrictInfo * from)
|
||||
{
|
||||
RestrictInfo *newnode = makeNode(RestrictInfo);
|
||||
|
||||
@@ -1371,9 +1374,9 @@ _copyJoinMethod(JoinMethod *from)
|
||||
* ----------------
|
||||
*/
|
||||
static HashInfo *
|
||||
_copyHashInfo(HashInfo *from)
|
||||
_copyHashInfo(HashInfo * from)
|
||||
{
|
||||
HashInfo *newnode = makeNode(HashInfo);
|
||||
HashInfo *newnode = makeNode(HashInfo);
|
||||
|
||||
/* ----------------
|
||||
* copy remainder of node
|
||||
@@ -1390,9 +1393,9 @@ _copyHashInfo(HashInfo *from)
|
||||
* ----------------
|
||||
*/
|
||||
static MergeInfo *
|
||||
_copyMergeInfo(MergeInfo *from)
|
||||
_copyMergeInfo(MergeInfo * from)
|
||||
{
|
||||
MergeInfo *newnode = makeNode(MergeInfo);
|
||||
MergeInfo *newnode = makeNode(MergeInfo);
|
||||
|
||||
/* ----------------
|
||||
* copy remainder of node
|
||||
@@ -1409,7 +1412,7 @@ _copyMergeInfo(MergeInfo *from)
|
||||
* ----------------
|
||||
*/
|
||||
static JoinInfo *
|
||||
_copyJoinInfo(JoinInfo *from)
|
||||
_copyJoinInfo(JoinInfo * from)
|
||||
{
|
||||
JoinInfo *newnode = makeNode(JoinInfo);
|
||||
|
||||
@@ -1493,9 +1496,9 @@ _copyRangeTblEntry(RangeTblEntry *from)
|
||||
}
|
||||
|
||||
static RowMark *
|
||||
_copyRowMark(RowMark *from)
|
||||
_copyRowMark(RowMark * from)
|
||||
{
|
||||
RowMark *newnode = makeNode(RowMark);
|
||||
RowMark *newnode = makeNode(RowMark);
|
||||
|
||||
newnode->rti = from->rti;
|
||||
newnode->info = from->info;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.36 1999/05/12 15:01:33 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.37 1999/05/25 16:09:06 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -283,7 +283,7 @@ _equalFunc(Func *a, Func *b)
|
||||
* RestrictInfo is a subclass of Node.
|
||||
*/
|
||||
static bool
|
||||
_equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
|
||||
_equalRestrictInfo(RestrictInfo * a, RestrictInfo * b)
|
||||
{
|
||||
Assert(IsA(a, RestrictInfo));
|
||||
Assert(IsA(b, RestrictInfo));
|
||||
@@ -307,7 +307,7 @@ _equalRestrictInfo(RestrictInfo *a, RestrictInfo *b)
|
||||
* RelOptInfo is a subclass of Node.
|
||||
*/
|
||||
static bool
|
||||
_equalRelOptInfo(RelOptInfo *a, RelOptInfo *b)
|
||||
_equalRelOptInfo(RelOptInfo * a, RelOptInfo * b)
|
||||
{
|
||||
Assert(IsA(a, RelOptInfo));
|
||||
Assert(IsA(b, RelOptInfo));
|
||||
@@ -392,7 +392,7 @@ _equalIndexPath(IndexPath *a, IndexPath *b)
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalNestPath(NestPath *a, NestPath *b)
|
||||
_equalNestPath(NestPath * a, NestPath * b)
|
||||
{
|
||||
Assert(IsA_JoinPath(a));
|
||||
Assert(IsA_JoinPath(b));
|
||||
@@ -477,7 +477,7 @@ _equalMergeOrder(MergeOrder *a, MergeOrder *b)
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalHashInfo(HashInfo *a, HashInfo *b)
|
||||
_equalHashInfo(HashInfo * a, HashInfo * b)
|
||||
{
|
||||
Assert(IsA(a, HashInfo));
|
||||
Assert(IsA(b, HashInfo));
|
||||
@@ -524,7 +524,7 @@ _equalSubPlan(SubPlan *a, SubPlan *b)
|
||||
}
|
||||
|
||||
static bool
|
||||
_equalJoinInfo(JoinInfo *a, JoinInfo *b)
|
||||
_equalJoinInfo(JoinInfo * a, JoinInfo * b)
|
||||
{
|
||||
Assert(IsA(a, JoinInfo));
|
||||
Assert(IsA(b, JoinInfo));
|
||||
@@ -574,10 +574,13 @@ _equalQuery(Query *a, Query *b)
|
||||
return false;
|
||||
if (a->resultRelation != b->resultRelation)
|
||||
return false;
|
||||
if (a->into && b->into) {
|
||||
if (a->into && b->into)
|
||||
{
|
||||
if (strcmp(a->into, b->into) != 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a->into != b->into)
|
||||
return false;
|
||||
}
|
||||
@@ -593,10 +596,13 @@ _equalQuery(Query *a, Query *b)
|
||||
return false;
|
||||
if (a->hasSubLinks != b->hasSubLinks)
|
||||
return false;
|
||||
if (a->uniqueFlag && b->uniqueFlag) {
|
||||
if (a->uniqueFlag && b->uniqueFlag)
|
||||
{
|
||||
if (strcmp(a->uniqueFlag, b->uniqueFlag) != 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a->uniqueFlag != b->uniqueFlag)
|
||||
return false;
|
||||
}
|
||||
@@ -623,10 +629,10 @@ _equalQuery(Query *a, Query *b)
|
||||
if (!equal(a->limitCount, b->limitCount))
|
||||
return false;
|
||||
|
||||
/* We do not check the internal-to-the-planner fields
|
||||
* base_rel_list and join_rel_list. They might not be
|
||||
* set yet, and in any case they should be derivable
|
||||
* from the other fields.
|
||||
/*
|
||||
* We do not check the internal-to-the-planner fields base_rel_list
|
||||
* and join_rel_list. They might not be set yet, and in any case they
|
||||
* should be derivable from the other fields.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
@@ -634,17 +640,23 @@ _equalQuery(Query *a, Query *b)
|
||||
static bool
|
||||
_equalRangeTblEntry(RangeTblEntry *a, RangeTblEntry *b)
|
||||
{
|
||||
if (a->relname && b->relname) {
|
||||
if (a->relname && b->relname)
|
||||
{
|
||||
if (strcmp(a->relname, b->relname) != 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a->relname != b->relname)
|
||||
return false;
|
||||
}
|
||||
if (a->refname && b->refname) {
|
||||
if (a->refname && b->refname)
|
||||
{
|
||||
if (strcmp(a->refname, b->refname) != 0)
|
||||
return false;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (a->refname != b->refname)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.16 1999/05/12 15:01:33 wieck Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/Attic/freefuncs.c,v 1.17 1999/05/25 16:09:06 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -297,12 +297,12 @@ _freeHashJoin(HashJoin *node)
|
||||
/* ----------------
|
||||
* FreeNonameFields
|
||||
*
|
||||
* This function frees the fields of the Noname node. It is used by
|
||||
* This function frees the fields of the Noname node. It is used by
|
||||
* all the free functions for classes which inherit node Noname.
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
FreeNonameFields(Noname *node)
|
||||
FreeNonameFields(Noname * node)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ FreeNonameFields(Noname *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeNoname(Noname *node)
|
||||
_freeNoname(Noname * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free node superclass fields
|
||||
@@ -562,7 +562,7 @@ _freeConst(Const *node)
|
||||
* ----------------
|
||||
*/
|
||||
if (!node->constbyval)
|
||||
pfree((void *)node->constvalue);
|
||||
pfree((void *) node->constvalue);
|
||||
|
||||
pfree(node);
|
||||
}
|
||||
@@ -609,7 +609,7 @@ _freeFunc(Func *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeAggref(Aggref *node)
|
||||
_freeAggref(Aggref * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -644,7 +644,7 @@ _freeSubLink(SubLink *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeCaseExpr(CaseExpr *node)
|
||||
_freeCaseExpr(CaseExpr * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -662,7 +662,7 @@ _freeCaseExpr(CaseExpr *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeCaseWhen(CaseWhen *node)
|
||||
_freeCaseWhen(CaseWhen * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -709,7 +709,7 @@ _freeArrayRef(ArrayRef *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeRelOptInfo(RelOptInfo *node)
|
||||
_freeRelOptInfo(RelOptInfo * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -757,8 +757,8 @@ FreePathFields(Path *node)
|
||||
else
|
||||
freeObject(node->pathorder->ord.merge);
|
||||
|
||||
pfree(node->pathorder); /* is it an object, but we don't have
|
||||
separate free for it */
|
||||
pfree(node->pathorder); /* is it an object, but we don't have
|
||||
* separate free for it */
|
||||
|
||||
freeObject(node->pathkeys);
|
||||
|
||||
@@ -812,7 +812,7 @@ _freeIndexPath(IndexPath *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
FreeNestPathFields(NestPath *node)
|
||||
FreeNestPathFields(NestPath * node)
|
||||
{
|
||||
freeObject(node->pathinfo);
|
||||
freeObject(node->outerjoinpath);
|
||||
@@ -824,7 +824,7 @@ FreeNestPathFields(NestPath *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeNestPath(NestPath *node)
|
||||
_freeNestPath(NestPath * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free the node superclass fields
|
||||
@@ -933,7 +933,7 @@ _freeMergeOrder(MergeOrder *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeRestrictInfo(RestrictInfo *node)
|
||||
_freeRestrictInfo(RestrictInfo * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -950,7 +950,7 @@ _freeRestrictInfo(RestrictInfo *node)
|
||||
/* ----------------
|
||||
* FreeJoinMethodFields
|
||||
*
|
||||
* This function frees the fields of the JoinMethod node. It is used by
|
||||
* This function frees the fields of the JoinMethod node. It is used by
|
||||
* all the free functions for classes which inherit node JoinMethod.
|
||||
* ----------------
|
||||
*/
|
||||
@@ -979,7 +979,7 @@ _freeJoinMethod(JoinMethod *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeHashInfo(HashInfo *node)
|
||||
_freeHashInfo(HashInfo * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -995,7 +995,7 @@ _freeHashInfo(HashInfo *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeMergeInfo(MergeInfo *node)
|
||||
_freeMergeInfo(MergeInfo * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -1012,7 +1012,7 @@ _freeMergeInfo(MergeInfo *node)
|
||||
* ----------------
|
||||
*/
|
||||
static void
|
||||
_freeJoinInfo(JoinInfo *node)
|
||||
_freeJoinInfo(JoinInfo * node)
|
||||
{
|
||||
/* ----------------
|
||||
* free remainder of node
|
||||
@@ -1066,7 +1066,7 @@ _freeRangeTblEntry(RangeTblEntry *node)
|
||||
}
|
||||
|
||||
static void
|
||||
_freeRowMark(RowMark *node)
|
||||
_freeRowMark(RowMark * node)
|
||||
{
|
||||
pfree(node);
|
||||
}
|
||||
@@ -1142,7 +1142,7 @@ _freeValue(Value *node)
|
||||
{
|
||||
switch (node->type)
|
||||
{
|
||||
case T_String:
|
||||
case T_String:
|
||||
pfree(node->val.str);
|
||||
break;
|
||||
default:
|
||||
@@ -1165,6 +1165,7 @@ freeObject(void *node)
|
||||
|
||||
switch (nodeTag(node))
|
||||
{
|
||||
|
||||
/*
|
||||
* PLAN NODES
|
||||
*/
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.20 1999/02/22 17:29:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.21 1999/05/25 16:09:08 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* XXX a few of the following functions are duplicated to handle
|
||||
@@ -96,7 +96,7 @@ lconsi(int datum, List *list)
|
||||
* lappend
|
||||
*
|
||||
* Add obj to the end of list, or make a new list if 'list' is NIL
|
||||
*
|
||||
*
|
||||
* MORE EXPENSIVE THAN lcons
|
||||
*/
|
||||
List *
|
||||
@@ -161,6 +161,7 @@ nreverse(List *list)
|
||||
lnext(list) = lnext(rlist);
|
||||
return list;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -307,6 +308,7 @@ append(List *l1, List *l2)
|
||||
lnext(p) = newlist2;
|
||||
return newlist;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NOT_USED
|
||||
@@ -331,6 +333,7 @@ intAppend(List *l1, List *l2)
|
||||
lnext(p) = newlist2;
|
||||
return newlist;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -435,7 +438,7 @@ member(void *l1, List *l2)
|
||||
|
||||
foreach(i, l2)
|
||||
if (equal((Node *) l1, (Node *) lfirst(i)))
|
||||
return true;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: outfuncs.c,v 1.84 1999/05/19 16:46:11 momjian Exp $
|
||||
* $Id: outfuncs.c,v 1.85 1999/05/25 16:09:09 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Every (plan) node in POSTGRES has an associated "out" routine which
|
||||
@@ -54,24 +54,22 @@ static void _outNode(StringInfo str, void *obj);
|
||||
static void
|
||||
_outIntList(StringInfo str, List *list)
|
||||
{
|
||||
List *l;
|
||||
List *l;
|
||||
|
||||
appendStringInfo(str, "(");
|
||||
foreach(l, list)
|
||||
{
|
||||
appendStringInfo(str, " %d ", lfirsti(l));
|
||||
}
|
||||
appendStringInfo(str, ")");
|
||||
}
|
||||
|
||||
static void
|
||||
_outCreateStmt(StringInfo str, CreateStmt *node)
|
||||
{
|
||||
appendStringInfo(str, " CREATE :relname %s ",
|
||||
stringStringInfo(node->relname));
|
||||
appendStringInfo(str, " CREATE :relname %s ",
|
||||
stringStringInfo(node->relname));
|
||||
|
||||
appendStringInfo(str, " :istemp %s ",
|
||||
node->istemp ? "true" : "false");
|
||||
node->istemp ? "true" : "false");
|
||||
|
||||
appendStringInfo(str, " :columns ");
|
||||
_outNode(str, node->tableElts);
|
||||
@@ -86,11 +84,11 @@ _outCreateStmt(StringInfo str, CreateStmt *node)
|
||||
static void
|
||||
_outIndexStmt(StringInfo str, IndexStmt *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" INDEX :idxname %s :relname %s :accessMethod %s :indexParams ",
|
||||
stringStringInfo(node->idxname),
|
||||
stringStringInfo(node->relname),
|
||||
stringStringInfo(node->accessMethod));
|
||||
appendStringInfo(str,
|
||||
" INDEX :idxname %s :relname %s :accessMethod %s :indexParams ",
|
||||
stringStringInfo(node->idxname),
|
||||
stringStringInfo(node->relname),
|
||||
stringStringInfo(node->accessMethod));
|
||||
_outNode(str, node->indexParams);
|
||||
|
||||
appendStringInfo(str, " :withClause ");
|
||||
@@ -103,8 +101,8 @@ _outIndexStmt(StringInfo str, IndexStmt *node)
|
||||
_outNode(str, node->rangetable);
|
||||
|
||||
appendStringInfo(str, " :lossy %s :unique %s ",
|
||||
node->lossy ? "true" : "false",
|
||||
node->unique ? "true" : "false");
|
||||
node->lossy ? "true" : "false",
|
||||
node->unique ? "true" : "false");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -125,24 +123,24 @@ static void
|
||||
_outColumnDef(StringInfo str, ColumnDef *node)
|
||||
{
|
||||
appendStringInfo(str, " COLUMNDEF :colname %s :typename ",
|
||||
stringStringInfo(node->colname));
|
||||
stringStringInfo(node->colname));
|
||||
_outNode(str, node->typename);
|
||||
|
||||
appendStringInfo(str, " :is_not_null %s :defval %s :constraints ",
|
||||
node->is_not_null ? "true" : "false",
|
||||
stringStringInfo(node->defval));
|
||||
node->is_not_null ? "true" : "false",
|
||||
stringStringInfo(node->defval));
|
||||
_outNode(str, node->constraints);
|
||||
}
|
||||
|
||||
static void
|
||||
_outTypeName(StringInfo str, TypeName *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" TYPENAME :name %s :timezone %s :setof %s typmod %d :arrayBounds ",
|
||||
stringStringInfo(node->name),
|
||||
node->timezone ? "true" : "false",
|
||||
node->setof ? "true" : "false",
|
||||
node->typmod);
|
||||
appendStringInfo(str,
|
||||
" TYPENAME :name %s :timezone %s :setof %s typmod %d :arrayBounds ",
|
||||
stringStringInfo(node->name),
|
||||
node->timezone ? "true" : "false",
|
||||
node->setof ? "true" : "false",
|
||||
node->typmod);
|
||||
|
||||
appendStringInfo(str, " :arrayBounds ");
|
||||
_outNode(str, node->arrayBounds);
|
||||
@@ -152,7 +150,7 @@ static void
|
||||
_outIndexElem(StringInfo str, IndexElem *node)
|
||||
{
|
||||
appendStringInfo(str, " INDEXELEM :name %s :args ",
|
||||
stringStringInfo(node->name));
|
||||
stringStringInfo(node->name));
|
||||
_outNode(str, node->args);
|
||||
|
||||
appendStringInfo(str, " :class %s :typename ", stringStringInfo(node->class));
|
||||
@@ -171,20 +169,20 @@ _outQuery(StringInfo str, Query *node)
|
||||
{
|
||||
case T_CreateStmt:
|
||||
appendStringInfo(str, " :create %s ",
|
||||
stringStringInfo(((CreateStmt *) (node->utilityStmt))->relname));
|
||||
stringStringInfo(((CreateStmt *) (node->utilityStmt))->relname));
|
||||
_outNode(str, node->utilityStmt);
|
||||
break;
|
||||
|
||||
case T_IndexStmt:
|
||||
appendStringInfo(str, " :index %s on %s ",
|
||||
stringStringInfo(((IndexStmt *) (node->utilityStmt))->idxname),
|
||||
stringStringInfo(((IndexStmt *) (node->utilityStmt))->relname));
|
||||
stringStringInfo(((IndexStmt *) (node->utilityStmt))->idxname),
|
||||
stringStringInfo(((IndexStmt *) (node->utilityStmt))->relname));
|
||||
_outNode(str, node->utilityStmt);
|
||||
break;
|
||||
|
||||
case T_NotifyStmt:
|
||||
appendStringInfo(str, " :utility %s ",
|
||||
stringStringInfo(((NotifyStmt *) (node->utilityStmt))->relname));
|
||||
stringStringInfo(((NotifyStmt *) (node->utilityStmt))->relname));
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -192,21 +190,19 @@ _outQuery(StringInfo str, Query *node)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
appendStringInfo(str, " :utility <>");
|
||||
}
|
||||
|
||||
appendStringInfo(str,
|
||||
" :resultRelation %u :into %s :isPortal %s :isBinary %s :isTemp %s :unionall %s ",
|
||||
node->resultRelation,
|
||||
stringStringInfo(node->into),
|
||||
node->isPortal ? "true" : "false",
|
||||
node->isBinary ? "true" : "false",
|
||||
node->isTemp ? "true" : "false",
|
||||
node->unionall ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" :resultRelation %u :into %s :isPortal %s :isBinary %s :isTemp %s :unionall %s ",
|
||||
node->resultRelation,
|
||||
stringStringInfo(node->into),
|
||||
node->isPortal ? "true" : "false",
|
||||
node->isBinary ? "true" : "false",
|
||||
node->isTemp ? "true" : "false",
|
||||
node->unionall ? "true" : "false");
|
||||
|
||||
appendStringInfo(str, " :unique %s :sortClause ",
|
||||
stringStringInfo(node->uniqueFlag));
|
||||
appendStringInfo(str, " :unique %s :sortClause ",
|
||||
stringStringInfo(node->uniqueFlag));
|
||||
_outNode(str, node->sortClause);
|
||||
|
||||
appendStringInfo(str, " :rtable ");
|
||||
@@ -225,8 +221,8 @@ _outQuery(StringInfo str, Query *node)
|
||||
_outNode(str, node->havingQual);
|
||||
|
||||
appendStringInfo(str, " :hasAggs %s :hasSubLinks %s :unionClause ",
|
||||
node->hasAggs ? "true" : "false",
|
||||
node->hasSubLinks ? "true" : "false");
|
||||
node->hasAggs ? "true" : "false",
|
||||
node->hasSubLinks ? "true" : "false");
|
||||
_outNode(str, node->unionClause);
|
||||
|
||||
appendStringInfo(str, " :intersectClause ");
|
||||
@@ -255,9 +251,9 @@ _outSortClause(StringInfo str, SortClause *node)
|
||||
static void
|
||||
_outGroupClause(StringInfo str, GroupClause *node)
|
||||
{
|
||||
appendStringInfo(str, " GROUPCLAUSE :grpOpoid %u :tleGroupref %d",
|
||||
node->grpOpoid,
|
||||
node->tleGroupref);
|
||||
appendStringInfo(str, " GROUPCLAUSE :grpOpoid %u :tleGroupref %d",
|
||||
node->grpOpoid,
|
||||
node->tleGroupref);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -266,12 +262,12 @@ _outGroupClause(StringInfo str, GroupClause *node)
|
||||
static void
|
||||
_outPlanInfo(StringInfo str, Plan *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
":cost %g :size %d :width %d :state %s :qptargetlist ",
|
||||
node->cost,
|
||||
node->plan_size,
|
||||
node->plan_width,
|
||||
node->state ? "not-NULL" : "<>");
|
||||
appendStringInfo(str,
|
||||
":cost %g :size %d :width %d :state %s :qptargetlist ",
|
||||
node->cost,
|
||||
node->plan_size,
|
||||
node->plan_width,
|
||||
node->state ? "not-NULL" : "<>");
|
||||
_outNode(str, node->targetlist);
|
||||
|
||||
appendStringInfo(str, " :qpqual ");
|
||||
@@ -331,9 +327,9 @@ _outAppend(StringInfo str, Append *node)
|
||||
appendStringInfo(str, " :unionrtables ");
|
||||
_outNode(str, node->unionrtables);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :inheritrelid %u :inheritrtable ",
|
||||
node->inheritrelid);
|
||||
appendStringInfo(str,
|
||||
" :inheritrelid %u :inheritrtable ",
|
||||
node->inheritrelid);
|
||||
_outNode(str, node->inheritrtable);
|
||||
|
||||
}
|
||||
@@ -384,13 +380,13 @@ _outHashJoin(StringInfo str, HashJoin *node)
|
||||
appendStringInfo(str, " :hashclauses ");
|
||||
_outNode(str, node->hashclauses);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :hashjoinop %u ",
|
||||
node->hashjoinop);
|
||||
appendStringInfo(str,
|
||||
" :hashjoinop %u ",
|
||||
node->hashjoinop);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :hashdone %d ",
|
||||
node->hashdone);
|
||||
appendStringInfo(str,
|
||||
" :hashdone %d ",
|
||||
node->hashdone);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -460,14 +456,14 @@ _outIndexScan(StringInfo str, IndexScan *node)
|
||||
* Noname is a subclass of Plan
|
||||
*/
|
||||
static void
|
||||
_outNoname(StringInfo str, Noname *node)
|
||||
_outNoname(StringInfo str, Noname * node)
|
||||
{
|
||||
appendStringInfo(str, " NONAME ");
|
||||
_outPlanInfo(str, (Plan *) node);
|
||||
|
||||
appendStringInfo(str, " :nonameid %u :keycount %d ",
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
appendStringInfo(str, " :nonameid %u :keycount %d ",
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -480,8 +476,8 @@ _outSort(StringInfo str, Sort *node)
|
||||
_outPlanInfo(str, (Plan *) node);
|
||||
|
||||
appendStringInfo(str, " :nonameid %u :keycount %d ",
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -503,8 +499,8 @@ _outGroup(StringInfo str, Group *node)
|
||||
|
||||
/* the actual Group fields */
|
||||
appendStringInfo(str, " :numCols %d :tuplePerGroup %s ",
|
||||
node->numCols,
|
||||
node->tuplePerGroup ? "true" : "false");
|
||||
node->numCols,
|
||||
node->tuplePerGroup ? "true" : "false");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -517,8 +513,8 @@ _outUnique(StringInfo str, Unique *node)
|
||||
_outPlanInfo(str, (Plan *) node);
|
||||
|
||||
appendStringInfo(str, " :nonameid %u :keycount %d ",
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
node->nonameid,
|
||||
node->keycount);
|
||||
}
|
||||
|
||||
|
||||
@@ -548,18 +544,18 @@ static void
|
||||
_outResdom(StringInfo str, Resdom *node)
|
||||
{
|
||||
appendStringInfo(str, " RESDOM :resno %d :restype %u :restypmod %d",
|
||||
node->resno,
|
||||
node->restype,
|
||||
node->restypmod);
|
||||
node->resno,
|
||||
node->restype,
|
||||
node->restypmod);
|
||||
|
||||
appendStringInfo(str, " :resname \"%s\" :reskey %d :reskeyop %u",
|
||||
stringStringInfo(node->resname),
|
||||
node->reskey,
|
||||
node->reskeyop);
|
||||
stringStringInfo(node->resname),
|
||||
node->reskey,
|
||||
node->reskeyop);
|
||||
|
||||
appendStringInfo(str, " :resgroupref %d :resjunk %s ",
|
||||
node->resgroupref,
|
||||
node->resjunk ? "true" : "false");
|
||||
node->resgroupref,
|
||||
node->resjunk ? "true" : "false");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -568,14 +564,14 @@ _outFjoin(StringInfo str, Fjoin *node)
|
||||
int i;
|
||||
|
||||
appendStringInfo(str, " FJOIN :initialized %s :nNodes %d ",
|
||||
node->fj_initialized ? "true" : "false",
|
||||
node->fj_nNodes);
|
||||
node->fj_initialized ? "true" : "false",
|
||||
node->fj_nNodes);
|
||||
|
||||
appendStringInfo(str, " :innerNode ");
|
||||
_outNode(str, node->fj_innerNode);
|
||||
|
||||
appendStringInfo(str, " :results @ 0x%x :alwaysdone",
|
||||
(int) node->fj_results);
|
||||
appendStringInfo(str, " :results @ 0x%x :alwaysdone",
|
||||
(int) node->fj_results);
|
||||
|
||||
for (i = 0; i < node->fj_nNodes; i++)
|
||||
appendStringInfo(str, (node->fj_alwaysDone[i]) ? "true" : "false");
|
||||
@@ -590,7 +586,7 @@ _outExpr(StringInfo str, Expr *node)
|
||||
char *opstr = NULL;
|
||||
|
||||
appendStringInfo(str, " EXPR :typeOid %u ",
|
||||
node->typeOid);
|
||||
node->typeOid);
|
||||
|
||||
switch (node->opType)
|
||||
{
|
||||
@@ -626,17 +622,17 @@ _outExpr(StringInfo str, Expr *node)
|
||||
static void
|
||||
_outVar(StringInfo str, Var *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" VAR :varno %d :varattno %d :vartype %u :vartypmod %d ",
|
||||
node->varno,
|
||||
node->varattno,
|
||||
node->vartype,
|
||||
node->vartypmod);
|
||||
appendStringInfo(str,
|
||||
" VAR :varno %d :varattno %d :vartype %u :vartypmod %d ",
|
||||
node->varno,
|
||||
node->varattno,
|
||||
node->vartype,
|
||||
node->vartypmod);
|
||||
|
||||
appendStringInfo(str, " :varlevelsup %u :varnoold %d :varoattno %d" ,
|
||||
node->varlevelsup,
|
||||
node->varnoold,
|
||||
node->varoattno);
|
||||
appendStringInfo(str, " :varlevelsup %u :varnoold %d :varoattno %d",
|
||||
node->varlevelsup,
|
||||
node->varnoold,
|
||||
node->varoattno);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -645,37 +641,37 @@ _outVar(StringInfo str, Var *node)
|
||||
static void
|
||||
_outConst(StringInfo str, Const *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" CONST :consttype %u :constlen %d :constisnull %s :constvalue ",
|
||||
node->consttype,
|
||||
node->constlen,
|
||||
node->constisnull ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" CONST :consttype %u :constlen %d :constisnull %s :constvalue ",
|
||||
node->consttype,
|
||||
node->constlen,
|
||||
node->constisnull ? "true" : "false");
|
||||
|
||||
if (node->constisnull)
|
||||
appendStringInfo(str, "<>");
|
||||
else
|
||||
_outDatum(str, node->constvalue, node->consttype);
|
||||
|
||||
appendStringInfo(str, " :constbyval %s ",
|
||||
node->constbyval ? "true" : "false");
|
||||
appendStringInfo(str, " :constbyval %s ",
|
||||
node->constbyval ? "true" : "false");
|
||||
}
|
||||
|
||||
/*
|
||||
* Aggref
|
||||
*/
|
||||
static void
|
||||
_outAggref(StringInfo str, Aggref *node)
|
||||
_outAggref(StringInfo str, Aggref * node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" AGGREG :aggname %s :basetype %u :aggtype %u :target ",
|
||||
stringStringInfo(node->aggname),
|
||||
node->basetype,
|
||||
node->aggtype);
|
||||
appendStringInfo(str,
|
||||
" AGGREG :aggname %s :basetype %u :aggtype %u :target ",
|
||||
stringStringInfo(node->aggname),
|
||||
node->basetype,
|
||||
node->aggtype);
|
||||
_outNode(str, node->target);
|
||||
|
||||
appendStringInfo(str, ":aggno %d :usenulls %s",
|
||||
node->aggno,
|
||||
node->usenulls ? "true" : "false");
|
||||
node->aggno,
|
||||
node->usenulls ? "true" : "false");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -684,10 +680,10 @@ _outAggref(StringInfo str, Aggref *node)
|
||||
static void
|
||||
_outSubLink(StringInfo str, SubLink *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" SUBLINK :subLinkType %d :useor %s :lefthand ",
|
||||
node->subLinkType,
|
||||
node->useor ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" SUBLINK :subLinkType %d :useor %s :lefthand ",
|
||||
node->subLinkType,
|
||||
node->useor ? "true" : "false");
|
||||
_outNode(str, node->lefthand);
|
||||
|
||||
appendStringInfo(str, " :oper ");
|
||||
@@ -705,22 +701,18 @@ _outArray(StringInfo str, Array *node)
|
||||
{
|
||||
int i;
|
||||
|
||||
appendStringInfo(str,
|
||||
" ARRAY :arrayelemtype %u :arrayelemlength %d :arrayelembyval %c ",
|
||||
node->arrayelemtype,
|
||||
node->arrayelemlength,
|
||||
node->arrayelembyval ? 't' : 'f');
|
||||
appendStringInfo(str,
|
||||
" ARRAY :arrayelemtype %u :arrayelemlength %d :arrayelembyval %c ",
|
||||
node->arrayelemtype,
|
||||
node->arrayelemlength,
|
||||
node->arrayelembyval ? 't' : 'f');
|
||||
|
||||
appendStringInfo(str, " :arrayndim %d :arraylow ", node->arrayndim);
|
||||
for (i = 0; i < node->arrayndim; i++)
|
||||
{
|
||||
appendStringInfo(str, " %d ", node->arraylow.indx[i]);
|
||||
}
|
||||
appendStringInfo(str, " :arrayhigh ");
|
||||
for (i = 0; i < node->arrayndim; i++)
|
||||
{
|
||||
appendStringInfo(str, " %d ", node->arrayhigh.indx[i]);
|
||||
}
|
||||
appendStringInfo(str, " :arraylen %d ", node->arraylen);
|
||||
}
|
||||
|
||||
@@ -730,14 +722,14 @@ _outArray(StringInfo str, Array *node)
|
||||
static void
|
||||
_outArrayRef(StringInfo str, ArrayRef *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" ARRAYREF :refelemtype %u :refattrlength $d :refelemlength %d ",
|
||||
node->refelemtype,
|
||||
node->refattrlength,
|
||||
node->refelemlength);
|
||||
appendStringInfo(str,
|
||||
" ARRAYREF :refelemtype %u :refattrlength $d :refelemlength %d ",
|
||||
node->refelemtype,
|
||||
node->refattrlength,
|
||||
node->refelemlength);
|
||||
|
||||
appendStringInfo(str, " :refelembyval %c :refupperindex ",
|
||||
node->refelembyval ? 't' : 'f');
|
||||
appendStringInfo(str, " :refelembyval %c :refupperindex ",
|
||||
node->refelembyval ? 't' : 'f');
|
||||
_outNode(str, node->refupperindexpr);
|
||||
|
||||
appendStringInfo(str, " :reflowerindex ");
|
||||
@@ -756,15 +748,15 @@ _outArrayRef(StringInfo str, ArrayRef *node)
|
||||
static void
|
||||
_outFunc(StringInfo str, Func *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" FUNC :funcid %u :functype %u :funcisindex %s :funcsize %d ",
|
||||
node->funcid,
|
||||
node->functype,
|
||||
node->funcisindex ? "true" : "false",
|
||||
node->funcsize);
|
||||
appendStringInfo(str,
|
||||
" FUNC :funcid %u :functype %u :funcisindex %s :funcsize %d ",
|
||||
node->funcid,
|
||||
node->functype,
|
||||
node->funcisindex ? "true" : "false",
|
||||
node->funcsize);
|
||||
|
||||
appendStringInfo(str, " :func_fcache @ 0x%x :func_tlist ",
|
||||
(int) node->func_fcache);
|
||||
(int) node->func_fcache);
|
||||
_outNode(str, node->func_tlist);
|
||||
|
||||
appendStringInfo(str, " :func_planlist ");
|
||||
@@ -777,11 +769,11 @@ _outFunc(StringInfo str, Func *node)
|
||||
static void
|
||||
_outOper(StringInfo str, Oper *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" OPER :opno %u :opid %u :opresulttype %u ",
|
||||
node->opno,
|
||||
node->opid,
|
||||
node->opresulttype);
|
||||
appendStringInfo(str,
|
||||
" OPER :opno %u :opid %u :opresulttype %u ",
|
||||
node->opno,
|
||||
node->opid,
|
||||
node->opresulttype);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -790,12 +782,12 @@ _outOper(StringInfo str, Oper *node)
|
||||
static void
|
||||
_outParam(StringInfo str, Param *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" PARAM :paramkind %d :paramid %d :paramname %s :paramtype %u ",
|
||||
node->paramkind,
|
||||
node->paramid,
|
||||
stringStringInfo(node->paramname),
|
||||
node->paramtype);
|
||||
appendStringInfo(str,
|
||||
" PARAM :paramkind %d :paramid %d :paramname %s :paramtype %u ",
|
||||
node->paramkind,
|
||||
node->paramid,
|
||||
stringStringInfo(node->paramname),
|
||||
node->paramtype);
|
||||
|
||||
appendStringInfo(str, " :param_tlist ");
|
||||
_outNode(str, node->param_tlist);
|
||||
@@ -811,31 +803,31 @@ _outParam(StringInfo str, Param *node)
|
||||
static void
|
||||
_outEState(StringInfo str, EState *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" ESTATE :direction %d :range_table ",
|
||||
node->es_direction);
|
||||
appendStringInfo(str,
|
||||
" ESTATE :direction %d :range_table ",
|
||||
node->es_direction);
|
||||
_outNode(str, node->es_range_table);
|
||||
|
||||
appendStringInfo(str, " :result_relation_info @ 0x%x ",
|
||||
(int) (node->es_result_relation_info));
|
||||
(int) (node->es_result_relation_info));
|
||||
}
|
||||
|
||||
/*
|
||||
* Stuff from relation.h
|
||||
*/
|
||||
static void
|
||||
_outRelOptInfo(StringInfo str, RelOptInfo *node)
|
||||
_outRelOptInfo(StringInfo str, RelOptInfo * node)
|
||||
{
|
||||
appendStringInfo(str, " RELOPTINFO :relids ");
|
||||
_outIntList(str, node->relids);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :indexed %s :pages %u :tuples %u :size %u :width %u :targetlist ",
|
||||
node->indexed ? "true" : "false",
|
||||
node->pages,
|
||||
node->tuples,
|
||||
node->size,
|
||||
node->width);
|
||||
appendStringInfo(str,
|
||||
" :indexed %s :pages %u :tuples %u :size %u :width %u :targetlist ",
|
||||
node->indexed ? "true" : "false",
|
||||
node->pages,
|
||||
node->tuples,
|
||||
node->size,
|
||||
node->width);
|
||||
_outNode(str, node->targetlist);
|
||||
|
||||
appendStringInfo(str, " :pathlist ");
|
||||
@@ -847,10 +839,10 @@ _outRelOptInfo(StringInfo str, RelOptInfo *node)
|
||||
* This can be changed later, if necessary.
|
||||
*/
|
||||
|
||||
appendStringInfo(str,
|
||||
" :cheapestpath @ 0x%x :pruneable %s :restrictinfo ",
|
||||
(int) node->cheapestpath,
|
||||
node->pruneable ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" :cheapestpath @ 0x%x :pruneable %s :restrictinfo ",
|
||||
(int) node->cheapestpath,
|
||||
node->pruneable ? "true" : "false");
|
||||
_outNode(str, node->restrictinfo);
|
||||
|
||||
appendStringInfo(str, " :joininfo ");
|
||||
@@ -876,18 +868,18 @@ _outTargetEntry(StringInfo str, TargetEntry *node)
|
||||
static void
|
||||
_outRangeTblEntry(StringInfo str, RangeTblEntry *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" RTE :relname %s :refname %s :relid %u :inh %s :inFromCl %s :skipAcl %s",
|
||||
stringStringInfo(node->relname),
|
||||
stringStringInfo(node->refname),
|
||||
node->relid,
|
||||
node->inh ? "true" : "false",
|
||||
node->inFromCl ? "true" : "false",
|
||||
node->skipAcl ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" RTE :relname %s :refname %s :relid %u :inh %s :inFromCl %s :skipAcl %s",
|
||||
stringStringInfo(node->relname),
|
||||
stringStringInfo(node->refname),
|
||||
node->relid,
|
||||
node->inh ? "true" : "false",
|
||||
node->inFromCl ? "true" : "false",
|
||||
node->skipAcl ? "true" : "false");
|
||||
}
|
||||
|
||||
static void
|
||||
_outRowMark(StringInfo str, RowMark *node)
|
||||
_outRowMark(StringInfo str, RowMark * node)
|
||||
{
|
||||
appendStringInfo(str, " ROWMARK :rti %u :info %u", node->rti, node->info);
|
||||
}
|
||||
@@ -899,17 +891,17 @@ static void
|
||||
_outPathOrder(StringInfo str, PathOrder *node)
|
||||
{
|
||||
appendStringInfo(str, " PATHORDER :ordtype %d ",
|
||||
node->ordtype);
|
||||
node->ordtype);
|
||||
if (node->ordtype == SORTOP_ORDER)
|
||||
{
|
||||
int i;
|
||||
|
||||
int i;
|
||||
|
||||
appendStringInfo(str, " :sortop ");
|
||||
if (node->ord.sortop == NULL)
|
||||
appendStringInfo(str, "<>");
|
||||
else
|
||||
{
|
||||
for (i=0; node->ord.sortop[i] != 0; i++)
|
||||
for (i = 0; node->ord.sortop[i] != 0; i++)
|
||||
appendStringInfo(str, " %d ", node->ord.sortop[i]);
|
||||
appendStringInfo(str, " %d ", 0);
|
||||
}
|
||||
@@ -917,7 +909,7 @@ _outPathOrder(StringInfo str, PathOrder *node)
|
||||
else
|
||||
{
|
||||
appendStringInfo(str, " :merge ");
|
||||
_outNode(str,node->ord.merge);
|
||||
_outNode(str, node->ord.merge);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -928,8 +920,8 @@ static void
|
||||
_outPath(StringInfo str, Path *node)
|
||||
{
|
||||
appendStringInfo(str, " PATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->pathtype,
|
||||
node->path_cost);
|
||||
node->pathtype,
|
||||
node->path_cost);
|
||||
_outNode(str, node->pathkeys);
|
||||
|
||||
appendStringInfo(str, " :pathorder ");
|
||||
@@ -942,10 +934,10 @@ _outPath(StringInfo str, Path *node)
|
||||
static void
|
||||
_outIndexPath(StringInfo str, IndexPath *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" INDEXPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->path.pathtype,
|
||||
node->path.path_cost);
|
||||
appendStringInfo(str,
|
||||
" INDEXPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->path.pathtype,
|
||||
node->path.path_cost);
|
||||
_outNode(str, node->path.pathkeys);
|
||||
|
||||
appendStringInfo(str, " :pathorder ");
|
||||
@@ -962,17 +954,17 @@ _outIndexPath(StringInfo str, IndexPath *node)
|
||||
* NestPath is a subclass of Path
|
||||
*/
|
||||
static void
|
||||
_outNestPath(StringInfo str, NestPath *node)
|
||||
_outNestPath(StringInfo str, NestPath * node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" NESTPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->path.pathtype,
|
||||
node->path.path_cost);
|
||||
appendStringInfo(str,
|
||||
" NESTPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->path.pathtype,
|
||||
node->path.path_cost);
|
||||
_outNode(str, node->path.pathkeys);
|
||||
|
||||
appendStringInfo(str, " :pathorder ");
|
||||
_outNode(str, node->path.pathorder);
|
||||
|
||||
|
||||
appendStringInfo(str, " :pathinfo ");
|
||||
_outNode(str, node->pathinfo);
|
||||
|
||||
@@ -981,11 +973,11 @@ _outNestPath(StringInfo str, NestPath *node)
|
||||
* For now, i'll just print the addresses.
|
||||
*/
|
||||
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outjoincost %f :joinid ",
|
||||
(int) node->outerjoinpath,
|
||||
(int) node->innerjoinpath,
|
||||
node->path.outerjoincost);
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outjoincost %f :joinid ",
|
||||
(int) node->outerjoinpath,
|
||||
(int) node->innerjoinpath,
|
||||
node->path.outerjoincost);
|
||||
_outIntList(str, node->path.joinid);
|
||||
}
|
||||
|
||||
@@ -995,15 +987,15 @@ _outNestPath(StringInfo str, NestPath *node)
|
||||
static void
|
||||
_outMergePath(StringInfo str, MergePath *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" MERGEPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->jpath.path.pathtype,
|
||||
node->jpath.path.path_cost);
|
||||
appendStringInfo(str,
|
||||
" MERGEPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->jpath.path.pathtype,
|
||||
node->jpath.path.path_cost);
|
||||
_outNode(str, node->jpath.path.pathkeys);
|
||||
|
||||
appendStringInfo(str, " :pathorder ");
|
||||
_outNode(str, node->jpath.path.pathorder);
|
||||
|
||||
|
||||
appendStringInfo(str, " :pathinfo ");
|
||||
_outNode(str, node->jpath.pathinfo);
|
||||
|
||||
@@ -1012,11 +1004,11 @@ _outMergePath(StringInfo str, MergePath *node)
|
||||
* For now, i'll just print the addresses.
|
||||
*/
|
||||
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outerjoincost %f :joinid ",
|
||||
(int) node->jpath.outerjoinpath,
|
||||
(int) node->jpath.innerjoinpath,
|
||||
(int) node->jpath.path.outerjoincost);
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outerjoincost %f :joinid ",
|
||||
(int) node->jpath.outerjoinpath,
|
||||
(int) node->jpath.innerjoinpath,
|
||||
(int) node->jpath.path.outerjoincost);
|
||||
_outIntList(str, node->jpath.path.joinid);
|
||||
|
||||
appendStringInfo(str, " :path_mergeclauses ");
|
||||
@@ -1035,10 +1027,10 @@ _outMergePath(StringInfo str, MergePath *node)
|
||||
static void
|
||||
_outHashPath(StringInfo str, HashPath *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" HASHPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->jpath.path.pathtype,
|
||||
node->jpath.path.path_cost);
|
||||
appendStringInfo(str,
|
||||
" HASHPATH :pathtype %d :cost %f :pathkeys ",
|
||||
node->jpath.path.pathtype,
|
||||
node->jpath.path.path_cost);
|
||||
_outNode(str, node->jpath.path.pathkeys);
|
||||
|
||||
appendStringInfo(str, " :pathorder ");
|
||||
@@ -1052,11 +1044,11 @@ _outHashPath(StringInfo str, HashPath *node)
|
||||
* For now, i'll just print the addresses.
|
||||
*/
|
||||
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outerjoincost %f :joinid ",
|
||||
(int) node->jpath.outerjoinpath,
|
||||
(int) node->jpath.innerjoinpath,
|
||||
node->jpath.path.outerjoincost);
|
||||
appendStringInfo(str,
|
||||
" :outerjoinpath @ 0x%x :innerjoinpath @ 0x%x :outerjoincost %f :joinid ",
|
||||
(int) node->jpath.outerjoinpath,
|
||||
(int) node->jpath.innerjoinpath,
|
||||
node->jpath.path.outerjoincost);
|
||||
_outIntList(str, node->jpath.path.joinid);
|
||||
|
||||
appendStringInfo(str, " :path_hashclauses ");
|
||||
@@ -1075,10 +1067,10 @@ _outHashPath(StringInfo str, HashPath *node)
|
||||
static void
|
||||
_outOrderKey(StringInfo str, OrderKey *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" ORDERKEY :attribute_number %d :array_index %d ",
|
||||
node->attribute_number,
|
||||
node->array_index);
|
||||
appendStringInfo(str,
|
||||
" ORDERKEY :attribute_number %d :array_index %d ",
|
||||
node->attribute_number,
|
||||
node->array_index);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1101,31 +1093,31 @@ _outJoinKey(StringInfo str, JoinKey *node)
|
||||
static void
|
||||
_outMergeOrder(StringInfo str, MergeOrder *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" MERGEORDER :join_operator %u :left_operator %u :right_operator %u ",
|
||||
node->join_operator,
|
||||
node->left_operator,
|
||||
node->right_operator);
|
||||
appendStringInfo(str,
|
||||
" MERGEORDER :join_operator %u :left_operator %u :right_operator %u ",
|
||||
node->join_operator,
|
||||
node->left_operator,
|
||||
node->right_operator);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :left_type %u :right_type %u ",
|
||||
node->left_type,
|
||||
node->right_type);
|
||||
appendStringInfo(str,
|
||||
" :left_type %u :right_type %u ",
|
||||
node->left_type,
|
||||
node->right_type);
|
||||
}
|
||||
|
||||
/*
|
||||
* RestrictInfo is a subclass of Node.
|
||||
*/
|
||||
static void
|
||||
_outRestrictInfo(StringInfo str, RestrictInfo *node)
|
||||
_outRestrictInfo(StringInfo str, RestrictInfo * node)
|
||||
{
|
||||
appendStringInfo(str, " RESTRICTINFO :clause ");
|
||||
_outNode(str, node->clause);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :selectivity %f :notclause %s :indexids ",
|
||||
node->selectivity,
|
||||
node->notclause ? "true" : "false");
|
||||
appendStringInfo(str,
|
||||
" :selectivity %f :notclause %s :indexids ",
|
||||
node->selectivity,
|
||||
node->notclause ? "true" : "false");
|
||||
_outNode(str, node->indexids);
|
||||
|
||||
appendStringInfo(str, " :mergejoinorder ");
|
||||
@@ -1152,7 +1144,7 @@ _outJoinMethod(StringInfo str, JoinMethod *node)
|
||||
* HashInfo is a subclass of JoinMethod.
|
||||
*/
|
||||
static void
|
||||
_outHashInfo(StringInfo str, HashInfo *node)
|
||||
_outHashInfo(StringInfo str, HashInfo * node)
|
||||
{
|
||||
appendStringInfo(str, " HASHINFO :hashop %u :jmkeys ", node->hashop);
|
||||
_outNode(str, node->jmethod.jmkeys);
|
||||
@@ -1165,7 +1157,7 @@ _outHashInfo(StringInfo str, HashInfo *node)
|
||||
* JoinInfo is a subclass of Node.
|
||||
*/
|
||||
static void
|
||||
_outJoinInfo(StringInfo str, JoinInfo *node)
|
||||
_outJoinInfo(StringInfo str, JoinInfo * node)
|
||||
{
|
||||
appendStringInfo(str, " JINFO :unjoined_relids ");
|
||||
_outIntList(str, node->unjoined_relids);
|
||||
@@ -1174,8 +1166,8 @@ _outJoinInfo(StringInfo str, JoinInfo *node)
|
||||
_outNode(str, node->jinfo_restrictinfo);
|
||||
|
||||
appendStringInfo(str, " :mergejoinable %s :hashjoinable %s ",
|
||||
node->mergejoinable ? "true" : "false",
|
||||
node->hashjoinable ? "true" : "false");
|
||||
node->mergejoinable ? "true" : "false",
|
||||
node->hashjoinable ? "true" : "false");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1184,9 +1176,9 @@ _outJoinInfo(StringInfo str, JoinInfo *node)
|
||||
static void
|
||||
_outDatum(StringInfo str, Datum value, Oid type)
|
||||
{
|
||||
char *s;
|
||||
char *s;
|
||||
Size length,
|
||||
typeLength;
|
||||
typeLength;
|
||||
bool byValue;
|
||||
int i;
|
||||
|
||||
@@ -1213,6 +1205,7 @@ _outDatum(StringInfo str, Datum value, Oid type)
|
||||
appendStringInfo(str, " 0 [ ] ");
|
||||
else
|
||||
{
|
||||
|
||||
/*
|
||||
* length is unsigned - very bad to do < comparison to -1
|
||||
* without casting it to int first!! -mer 8 Jan 1991
|
||||
@@ -1221,9 +1214,7 @@ _outDatum(StringInfo str, Datum value, Oid type)
|
||||
length = VARSIZE(s);
|
||||
appendStringInfo(str, " %d [ ", length);
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
appendStringInfo(str, " %d ", (int) (s[i]));
|
||||
}
|
||||
appendStringInfo(str, "] ");
|
||||
}
|
||||
}
|
||||
@@ -1239,19 +1230,19 @@ _outIter(StringInfo str, Iter *node)
|
||||
static void
|
||||
_outStream(StringInfo str, Stream *node)
|
||||
{
|
||||
appendStringInfo(str,
|
||||
" STREAM :pathptr @ 0x%x :cinfo @ 0x%x :clausetype %d :upstream @ 0x%x ",
|
||||
(int) node->pathptr,
|
||||
(int) node->cinfo,
|
||||
(int) node->clausetype,
|
||||
(int) node->upstream);
|
||||
appendStringInfo(str,
|
||||
" STREAM :pathptr @ 0x%x :cinfo @ 0x%x :clausetype %d :upstream @ 0x%x ",
|
||||
(int) node->pathptr,
|
||||
(int) node->cinfo,
|
||||
(int) node->clausetype,
|
||||
(int) node->upstream);
|
||||
|
||||
appendStringInfo(str,
|
||||
" :downstream @ 0x%x :groupup %d :groupcost %f :groupsel %f ",
|
||||
(int) node->downstream,
|
||||
node->groupup,
|
||||
node->groupcost,
|
||||
node->groupsel);
|
||||
appendStringInfo(str,
|
||||
" :downstream @ 0x%x :groupup %d :groupcost %f :groupsel %f ",
|
||||
(int) node->downstream,
|
||||
node->groupup,
|
||||
node->groupcost,
|
||||
node->groupsel);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1289,7 +1280,7 @@ _outValue(StringInfo str, Value *value)
|
||||
{
|
||||
switch (value->type)
|
||||
{
|
||||
case T_String:
|
||||
case T_String:
|
||||
appendStringInfo(str, " \"%s\" ", stringStringInfo(value->val.str));
|
||||
break;
|
||||
case T_Integer:
|
||||
@@ -1340,7 +1331,7 @@ _outAConst(StringInfo str, A_Const *node)
|
||||
static void
|
||||
_outConstraint(StringInfo str, Constraint *node)
|
||||
{
|
||||
appendStringInfo(str," %s :type", stringStringInfo(node->name));
|
||||
appendStringInfo(str, " %s :type", stringStringInfo(node->name));
|
||||
|
||||
switch (node->contype)
|
||||
{
|
||||
@@ -1374,7 +1365,7 @@ _outConstraint(StringInfo str, Constraint *node)
|
||||
}
|
||||
|
||||
static void
|
||||
_outCaseExpr(StringInfo str, CaseExpr *node)
|
||||
_outCaseExpr(StringInfo str, CaseExpr * node)
|
||||
{
|
||||
appendStringInfo(str, "CASE ");
|
||||
_outNode(str, node->args);
|
||||
@@ -1386,7 +1377,7 @@ _outCaseExpr(StringInfo str, CaseExpr *node)
|
||||
}
|
||||
|
||||
static void
|
||||
_outCaseWhen(StringInfo str, CaseWhen *node)
|
||||
_outCaseWhen(StringInfo str, CaseWhen * node)
|
||||
{
|
||||
appendStringInfo(str, " WHEN ");
|
||||
_outNode(str, node->expr);
|
||||
@@ -1653,7 +1644,7 @@ _outNode(StringInfo str, void *obj)
|
||||
char *
|
||||
nodeToString(void *obj)
|
||||
{
|
||||
StringInfoData str;
|
||||
StringInfoData str;
|
||||
|
||||
/* see stringinfo.h for an explanation of this maneuver */
|
||||
initStringInfo(&str);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.27 1999/05/10 00:45:13 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.28 1999/05/25 16:09:10 momjian Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -218,17 +218,19 @@ print_expr(Node *expr, List *rtable)
|
||||
void
|
||||
print_pathkeys(List *pathkeys, List *rtable)
|
||||
{
|
||||
List *i, *k;
|
||||
List *i,
|
||||
*k;
|
||||
|
||||
printf("(");
|
||||
foreach(i, pathkeys)
|
||||
{
|
||||
List *pathkey = lfirst(i);
|
||||
List *pathkey = lfirst(i);
|
||||
|
||||
printf("(");
|
||||
foreach(k, pathkey)
|
||||
{
|
||||
Node *var = lfirst(k);
|
||||
|
||||
print_expr(var, rtable);
|
||||
if (lnext(k))
|
||||
printf(", ");
|
||||
@@ -241,7 +243,7 @@ print_pathkeys(List *pathkeys, List *rtable)
|
||||
}
|
||||
|
||||
/*
|
||||
* print_tl
|
||||
* print_tl
|
||||
* print targetlist in a more legible way.
|
||||
*/
|
||||
void
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.63 1999/05/18 21:34:29 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.64 1999/05/25 16:09:11 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* Most of the read functions for plan nodes are tested. (In fact, they
|
||||
@@ -169,9 +169,9 @@ _readQuery()
|
||||
local_node->unionClause = nodeRead(true);
|
||||
|
||||
/***S*I***/
|
||||
token = lsptok(NULL, &length); /* skip :intersectClause */
|
||||
local_node->intersectClause = nodeRead(true);
|
||||
|
||||
token = lsptok(NULL, &length); /* skip :intersectClause */
|
||||
local_node->intersectClause = nodeRead(true);
|
||||
|
||||
|
||||
token = lsptok(NULL, &length); /* skip :limitOffset */
|
||||
local_node->limitOffset = nodeRead(true);
|
||||
@@ -544,7 +544,7 @@ _readIndexScan()
|
||||
local_node->indxqual = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* eat :indxqualorig */
|
||||
local_node->indxqualorig = nodeRead(true); /* now read it */
|
||||
local_node->indxqualorig = nodeRead(true); /* now read it */
|
||||
|
||||
return local_node;
|
||||
}
|
||||
@@ -1407,7 +1407,7 @@ _readRangeTblEntry()
|
||||
static RowMark *
|
||||
_readRowMark()
|
||||
{
|
||||
RowMark *local_node = makeNode(RowMark);
|
||||
RowMark *local_node = makeNode(RowMark);
|
||||
char *token;
|
||||
int length;
|
||||
|
||||
@@ -1431,7 +1431,7 @@ _readRowMark()
|
||||
static PathOrder *
|
||||
_readPathOrder()
|
||||
{
|
||||
PathOrder *local_node;
|
||||
PathOrder *local_node;
|
||||
char *token;
|
||||
int length;
|
||||
|
||||
@@ -1443,17 +1443,18 @@ _readPathOrder()
|
||||
|
||||
if (local_node->ordtype == SORTOP_ORDER)
|
||||
{
|
||||
token = lsptok(NULL, &length); /* get :sortop */
|
||||
token = lsptok(NULL, &length); /* get :sortop */
|
||||
|
||||
if (length == 0)
|
||||
local_node->ord.sortop = NULL;
|
||||
else
|
||||
{
|
||||
int i = -1;
|
||||
|
||||
local_node->ord.sortop = palloc(sizeof(Oid) * (INDEX_MAX_KEYS+1));
|
||||
|
||||
do {
|
||||
int i = -1;
|
||||
|
||||
local_node->ord.sortop = palloc(sizeof(Oid) * (INDEX_MAX_KEYS + 1));
|
||||
|
||||
do
|
||||
{
|
||||
i++;
|
||||
Assert(i <= INDEX_MAX_KEYS);
|
||||
token = lsptok(NULL, &length); /* now read it */
|
||||
@@ -1463,7 +1464,7 @@ _readPathOrder()
|
||||
}
|
||||
else
|
||||
{
|
||||
token = lsptok(NULL, &length); /* get :merge */
|
||||
token = lsptok(NULL, &length); /* get :merge */
|
||||
local_node->ord.merge = nodeRead(true); /* now read it */
|
||||
}
|
||||
|
||||
@@ -1494,10 +1495,10 @@ _readPath()
|
||||
local_node->path_cost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathorder */
|
||||
local_node->pathorder = nodeRead(true); /* now read it */
|
||||
local_node->pathorder = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathkeys */
|
||||
local_node->pathkeys = nodeRead(true); /* now read it */
|
||||
local_node->pathkeys = nodeRead(true); /* now read it */
|
||||
|
||||
return local_node;
|
||||
}
|
||||
@@ -1526,10 +1527,10 @@ _readIndexPath()
|
||||
local_node->path.path_cost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathorder */
|
||||
local_node->path.pathorder = nodeRead(true); /* now read it */
|
||||
local_node->path.pathorder = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathkeys */
|
||||
local_node->path.pathkeys = nodeRead(true); /* now read it */
|
||||
local_node->path.pathkeys = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :indexid */
|
||||
local_node->indexid = toIntList(nodeRead(true));
|
||||
@@ -1568,7 +1569,7 @@ _readNestPath()
|
||||
local_node->path.pathorder = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathkeys */
|
||||
local_node->path.pathkeys = nodeRead(true); /* now read it */
|
||||
local_node->path.pathkeys = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathinfo */
|
||||
local_node->pathinfo = nodeRead(true); /* now read it */
|
||||
@@ -1630,13 +1631,13 @@ _readMergePath()
|
||||
local_node->jpath.path.path_cost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathorder */
|
||||
local_node->jpath.path.pathorder = nodeRead(true); /* now read it */
|
||||
local_node->jpath.path.pathorder = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathkeys */
|
||||
local_node->jpath.path.pathkeys = nodeRead(true); /* now read it */
|
||||
local_node->jpath.path.pathkeys = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathinfo */
|
||||
local_node->jpath.pathinfo = nodeRead(true); /* now read it */
|
||||
local_node->jpath.pathinfo = nodeRead(true); /* now read it */
|
||||
|
||||
/*
|
||||
* Not sure if these are nodes; they're declared as "struct path *".
|
||||
@@ -1664,7 +1665,7 @@ _readMergePath()
|
||||
local_node->jpath.path.outerjoincost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :joinid */
|
||||
local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */
|
||||
local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :path_mergeclauses */
|
||||
local_node->path_mergeclauses = nodeRead(true); /* now read it */
|
||||
@@ -1704,13 +1705,13 @@ _readHashPath()
|
||||
local_node->jpath.path.path_cost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathorder */
|
||||
local_node->jpath.path.pathorder = nodeRead(true); /* now read it */
|
||||
local_node->jpath.path.pathorder = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathkeys */
|
||||
local_node->jpath.path.pathkeys = nodeRead(true); /* now read it */
|
||||
local_node->jpath.path.pathkeys = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :pathinfo */
|
||||
local_node->jpath.pathinfo = nodeRead(true); /* now read it */
|
||||
local_node->jpath.pathinfo = nodeRead(true); /* now read it */
|
||||
|
||||
/*
|
||||
* Not sure if these are nodes; they're declared as "struct path *".
|
||||
@@ -1738,7 +1739,7 @@ _readHashPath()
|
||||
local_node->jpath.path.outerjoincost = (Cost) atof(token);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :joinid */
|
||||
local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */
|
||||
local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :path_hashclauses */
|
||||
local_node->path_hashclauses = nodeRead(true); /* now read it */
|
||||
@@ -1924,7 +1925,7 @@ _readJoinMethod()
|
||||
static HashInfo *
|
||||
_readHashInfo()
|
||||
{
|
||||
HashInfo *local_node;
|
||||
HashInfo *local_node;
|
||||
char *token;
|
||||
int length;
|
||||
|
||||
@@ -1960,10 +1961,10 @@ _readJoinInfo()
|
||||
local_node = makeNode(JoinInfo);
|
||||
|
||||
token = lsptok(NULL, &length); /* get :unjoined_relids */
|
||||
local_node->unjoined_relids = toIntList(nodeRead(true)); /* now read it */
|
||||
local_node->unjoined_relids = toIntList(nodeRead(true)); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :jinfo_restrictinfo */
|
||||
local_node->jinfo_restrictinfo = nodeRead(true); /* now read it */
|
||||
local_node->jinfo_restrictinfo = nodeRead(true); /* now read it */
|
||||
|
||||
token = lsptok(NULL, &length); /* get :mergejoinable */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user