📄 outfuncs.c
字号:
node->reskey, node->reskeyop); appendStringInfo(str, " :resgroupref %d :resjunk %s ", node->resgroupref, node->resjunk ? "true" : "false");}static void_outFjoin(StringInfo str, Fjoin *node){ int i; appendStringInfo(str, " FJOIN :initialized %s :nNodes %d ", 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); for (i = 0; i < node->fj_nNodes; i++) appendStringInfo(str, (node->fj_alwaysDone[i]) ? "true" : "false");}/* * Expr is a subclass of Node */static void_outExpr(StringInfo str, Expr *node){ char *opstr = NULL; appendStringInfo(str, " EXPR :typeOid %u ", node->typeOid); 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 SUBPLAN_EXPR: opstr = "subp"; break; } appendStringInfo(str, " :opType %s :oper ", stringStringInfo(opstr)); _outNode(str, node->oper); appendStringInfo(str, " :args "); _outNode(str, node->args);}/* * Var is a subclass of Expr */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, " :varlevelsup %u :varnoold %d :varoattno %d", node->varlevelsup, node->varnoold, node->varoattno);}/* * Const is a subclass of Expr */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"); if (node->constisnull) appendStringInfo(str, "<>"); else _outDatum(str, node->constvalue, node->consttype); appendStringInfo(str, " :constbyval %s ", node->constbyval ? "true" : "false");}/* * Aggref */static void_outAggref(StringInfo str, Aggref *node){ 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");}/* * SubLink */static void_outSubLink(StringInfo str, SubLink *node){ appendStringInfo(str, " SUBLINK :subLinkType %d :useor %s :lefthand ", node->subLinkType, node->useor ? "true" : "false"); _outNode(str, node->lefthand); appendStringInfo(str, " :oper "); _outNode(str, node->oper); appendStringInfo(str, " :subselect "); _outNode(str, node->subselect);}/* * Array is a subclass of Expr */static void_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, " :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);}/* * ArrayRef is a subclass of Expr */static void_outArrayRef(StringInfo str, ArrayRef *node){ appendStringInfo(str, " ARRAYREF :refelemtype %u :refattrlength $d :refelemlength %d ", node->refelemtype, node->refattrlength, node->refelemlength); appendStringInfo(str, " :refelembyval %c :refupperindex ", node->refelembyval ? 't' : 'f'); _outNode(str, node->refupperindexpr); appendStringInfo(str, " :reflowerindex "); _outNode(str, node->reflowerindexpr); appendStringInfo(str, " :refexpr "); _outNode(str, node->refexpr); appendStringInfo(str, " :refassgnexpr "); _outNode(str, node->refassgnexpr);}/* * Func is a subclass of Expr */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_fcache @ 0x%x :func_tlist ", (int) node->func_fcache); _outNode(str, node->func_tlist); appendStringInfo(str, " :func_planlist "); _outNode(str, node->func_planlist);}/* * Oper is a subclass of Expr */static void_outOper(StringInfo str, Oper *node){ appendStringInfo(str, " OPER :opno %u :opid %u :opresulttype %u ", node->opno, node->opid, node->opresulttype);}/* * Param is a subclass of Expr */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_tlist "); _outNode(str, node->param_tlist);}/* * Stuff from execnodes.h *//* * EState is a subclass of Node. */static void_outEState(StringInfo str, EState *node){ 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));}/* * Stuff from relation.h */static void_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); _outNode(str, node->targetlist); appendStringInfo(str, " :pathlist "); _outNode(str, node->pathlist); /* * Not sure if these are nodes or not. They're declared as struct * Path *. Since i don't know, i'll just print the addresses for now. * This can be changed later, if necessary. */ appendStringInfo(str, " :cheapestpath @ 0x%x :pruneable %s :restrictinfo ", (int) node->cheapestpath, node->pruneable ? "true" : "false"); _outNode(str, node->restrictinfo); appendStringInfo(str, " :joininfo "); _outNode(str, node->joininfo); appendStringInfo(str, " :innerjoin "); _outNode(str, node->innerjoin);}/* * TargetEntry is a subclass of Node. */static void_outTargetEntry(StringInfo str, TargetEntry *node){ appendStringInfo(str, " TARGETENTRY :resdom "); _outNode(str, node->resdom); appendStringInfo(str, " :expr "); _outNode(str, node->expr);}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");}static void_outRowMark(StringInfo str, RowMark *node){ appendStringInfo(str, " ROWMARK :rti %u :info %u", node->rti, node->info);}/* * Path is a subclass of Node. */static void_outPathOrder(StringInfo str, PathOrder *node){ appendStringInfo(str, " PATHORDER :ordtype %d ", node->ordtype); if (node->ordtype == SORTOP_ORDER) { int i; appendStringInfo(str, " :sortop "); if (node->ord.sortop == NULL) appendStringInfo(str, "<>"); else { for (i = 0; node->ord.sortop[i] != 0; i++) appendStringInfo(str, " %d ", node->ord.sortop[i]); appendStringInfo(str, " %d ", 0); } } else { appendStringInfo(str, " :merge "); _outNode(str, node->ord.merge); }}/* * Path is a subclass of Node. */static void_outPath(StringInfo str, Path *node){ appendStringInfo(str, " PATH :pathtype %d :cost %f :pathkeys ", node->pathtype, node->path_cost); _outNode(str, node->pathkeys); appendStringInfo(str, " :pathorder "); _outNode(str, node->pathorder);}/* * IndexPath is a subclass of Path. */static void_outIndexPath(StringInfo str, IndexPath *node){ appendStringInfo(str, " INDEXPATH :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, " :indexid "); _outIntList(str, node->indexid); appendStringInfo(str, " :indexqual "); _outNode(str, node->indexqual);}/* * NestPath is a subclass of Path */static void_outNestPath(StringInfo str, NestPath *node){ 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); /* * Not sure if these are nodes; they're declared as "struct path *". * 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); _outIntList(str, node->path.joinid);}/* * MergePath is a subclass of NestPath. */static void_outMergePath(StringInfo str, MergePath *node){ 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); /* * Not sure if these are nodes; they're declared as "struct path *". * 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); _outIntList(str, node->jpath.path.joinid); appendStringInfo(str, " :path_mergeclauses "); _outNode(str, node->path_mergeclauses); appendStringInfo(str, " :outersortkeys "); _outNode(str, node->outersortkeys); appendStringInfo(str, " :innersortkeys "); _outNode(str, node->innersortkeys);}/* * HashPath is a subclass of NestPath. */static void_outHashPath(StringInfo str, HashPath *node){ 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 "); _outNode(str, node->jpath.path.pathorder); appendStringInfo(str, " :pathinfo "); _outNode(str, node->jpath.pathinfo); /* * Not sure if these are nodes; they're declared as "struct path *". * 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); _outIntList(str, node->jpath.path.joinid); appendStringInfo(str, " :path_hashclauses "); _outNode(str, node->path_hashclauses); appendStringInfo(str, " :outerhashkeys "); _outNode(str, node->outerhashkeys); appendStringInfo(str, " :innerhashkeys "); _outNode(str, node->innerhashkeys);}/* * OrderKey is a subclass of Node. */static void_outOrderKey(StringInfo str, OrderKey *node){ appendStringInfo(str, " ORDERKEY :attribute_number %d :array_index %d ", node->attribute_number, node->array_index);}/* * JoinKey is a subclass of Node. */static void_outJoinKey(StringInfo str, JoinKey *node){ appendStringInfo(str, " JOINKEY :outer "); _outNode(str, node->outer); appendStringInfo(str, " :inner "); _outNode(str, node->inner);}/* * MergeOrder is a subclass of 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, " :left_type %u :right_type %u ", node->left_type,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -