⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 outfuncs.c

📁 PostgreSQL 8.1.4的源码 适用于Linux下的开源数据库系统
💻 C
📖 第 1 页 / 共 3 页
字号:
	WRITE_NODE_TYPE("BOOLEXPR");	/* do-it-yourself enum representation */	switch (node->boolop)	{		case AND_EXPR:			opstr = "and";			break;		case OR_EXPR:			opstr = "or";			break;		case NOT_EXPR:			opstr = "not";			break;	}	appendStringInfo(str, " :boolop ");	_outToken(str, opstr);	WRITE_NODE_FIELD(args);}static void_outSubLink(StringInfo str, SubLink *node){	WRITE_NODE_TYPE("SUBLINK");	WRITE_ENUM_FIELD(subLinkType, SubLinkType);	WRITE_BOOL_FIELD(useOr);	WRITE_NODE_FIELD(lefthand);	WRITE_NODE_FIELD(operName);	WRITE_NODE_FIELD(operOids);	WRITE_NODE_FIELD(subselect);}static void_outSubPlan(StringInfo str, SubPlan *node){	WRITE_NODE_TYPE("SUBPLAN");	WRITE_ENUM_FIELD(subLinkType, SubLinkType);	WRITE_BOOL_FIELD(useOr);	WRITE_NODE_FIELD(exprs);	WRITE_NODE_FIELD(paramIds);	WRITE_NODE_FIELD(plan);	WRITE_INT_FIELD(plan_id);	WRITE_NODE_FIELD(rtable);	WRITE_BOOL_FIELD(useHashTable);	WRITE_BOOL_FIELD(unknownEqFalse);	WRITE_NODE_FIELD(setParam);	WRITE_NODE_FIELD(parParam);	WRITE_NODE_FIELD(args);}static void_outFieldSelect(StringInfo str, FieldSelect *node){	WRITE_NODE_TYPE("FIELDSELECT");	WRITE_NODE_FIELD(arg);	WRITE_INT_FIELD(fieldnum);	WRITE_OID_FIELD(resulttype);	WRITE_INT_FIELD(resulttypmod);}static void_outFieldStore(StringInfo str, FieldStore *node){	WRITE_NODE_TYPE("FIELDSTORE");	WRITE_NODE_FIELD(arg);	WRITE_NODE_FIELD(newvals);	WRITE_NODE_FIELD(fieldnums);	WRITE_OID_FIELD(resulttype);}static void_outRelabelType(StringInfo str, RelabelType *node){	WRITE_NODE_TYPE("RELABELTYPE");	WRITE_NODE_FIELD(arg);	WRITE_OID_FIELD(resulttype);	WRITE_INT_FIELD(resulttypmod);	WRITE_ENUM_FIELD(relabelformat, CoercionForm);}static void_outConvertRowtypeExpr(StringInfo str, ConvertRowtypeExpr *node){	WRITE_NODE_TYPE("CONVERTROWTYPEEXPR");	WRITE_NODE_FIELD(arg);	WRITE_OID_FIELD(resulttype);	WRITE_ENUM_FIELD(convertformat, CoercionForm);}static void_outCaseExpr(StringInfo str, CaseExpr *node){	WRITE_NODE_TYPE("CASE");	WRITE_OID_FIELD(casetype);	WRITE_NODE_FIELD(arg);	WRITE_NODE_FIELD(args);	WRITE_NODE_FIELD(defresult);}static void_outCaseWhen(StringInfo str, CaseWhen *node){	WRITE_NODE_TYPE("WHEN");	WRITE_NODE_FIELD(expr);	WRITE_NODE_FIELD(result);}static void_outCaseTestExpr(StringInfo str, CaseTestExpr *node){	WRITE_NODE_TYPE("CASETESTEXPR");	WRITE_OID_FIELD(typeId);	WRITE_INT_FIELD(typeMod);}static void_outArrayExpr(StringInfo str, ArrayExpr *node){	WRITE_NODE_TYPE("ARRAY");	WRITE_OID_FIELD(array_typeid);	WRITE_OID_FIELD(element_typeid);	WRITE_NODE_FIELD(elements);	WRITE_BOOL_FIELD(multidims);}static void_outRowExpr(StringInfo str, RowExpr *node){	WRITE_NODE_TYPE("ROW");	WRITE_NODE_FIELD(args);	WRITE_OID_FIELD(row_typeid);	WRITE_ENUM_FIELD(row_format, CoercionForm);}static void_outCoalesceExpr(StringInfo str, CoalesceExpr *node){	WRITE_NODE_TYPE("COALESCE");	WRITE_OID_FIELD(coalescetype);	WRITE_NODE_FIELD(args);}static void_outMinMaxExpr(StringInfo str, MinMaxExpr *node){	WRITE_NODE_TYPE("MINMAX");	WRITE_OID_FIELD(minmaxtype);	WRITE_ENUM_FIELD(op, MinMaxOp);	WRITE_NODE_FIELD(args);}static void_outNullIfExpr(StringInfo str, NullIfExpr *node){	WRITE_NODE_TYPE("NULLIFEXPR");	WRITE_OID_FIELD(opno);	WRITE_OID_FIELD(opfuncid);	WRITE_OID_FIELD(opresulttype);	WRITE_BOOL_FIELD(opretset);	WRITE_NODE_FIELD(args);}static void_outNullTest(StringInfo str, NullTest *node){	WRITE_NODE_TYPE("NULLTEST");	WRITE_NODE_FIELD(arg);	WRITE_ENUM_FIELD(nulltesttype, NullTestType);}static void_outBooleanTest(StringInfo str, BooleanTest *node){	WRITE_NODE_TYPE("BOOLEANTEST");	WRITE_NODE_FIELD(arg);	WRITE_ENUM_FIELD(booltesttype, BoolTestType);}static void_outCoerceToDomain(StringInfo str, CoerceToDomain *node){	WRITE_NODE_TYPE("COERCETODOMAIN");	WRITE_NODE_FIELD(arg);	WRITE_OID_FIELD(resulttype);	WRITE_INT_FIELD(resulttypmod);	WRITE_ENUM_FIELD(coercionformat, CoercionForm);}static void_outCoerceToDomainValue(StringInfo str, CoerceToDomainValue *node){	WRITE_NODE_TYPE("COERCETODOMAINVALUE");	WRITE_OID_FIELD(typeId);	WRITE_INT_FIELD(typeMod);}static void_outSetToDefault(StringInfo str, SetToDefault *node){	WRITE_NODE_TYPE("SETTODEFAULT");	WRITE_OID_FIELD(typeId);	WRITE_INT_FIELD(typeMod);}static void_outTargetEntry(StringInfo str, TargetEntry *node){	WRITE_NODE_TYPE("TARGETENTRY");	WRITE_NODE_FIELD(expr);	WRITE_INT_FIELD(resno);	WRITE_STRING_FIELD(resname);	WRITE_UINT_FIELD(ressortgroupref);	WRITE_OID_FIELD(resorigtbl);	WRITE_INT_FIELD(resorigcol);	WRITE_BOOL_FIELD(resjunk);}static void_outRangeTblRef(StringInfo str, RangeTblRef *node){	WRITE_NODE_TYPE("RANGETBLREF");	WRITE_INT_FIELD(rtindex);}static void_outJoinExpr(StringInfo str, JoinExpr *node){	WRITE_NODE_TYPE("JOINEXPR");	WRITE_ENUM_FIELD(jointype, JoinType);	WRITE_BOOL_FIELD(isNatural);	WRITE_NODE_FIELD(larg);	WRITE_NODE_FIELD(rarg);	WRITE_NODE_FIELD(using);	WRITE_NODE_FIELD(quals);	WRITE_NODE_FIELD(alias);	WRITE_INT_FIELD(rtindex);}static void_outFromExpr(StringInfo str, FromExpr *node){	WRITE_NODE_TYPE("FROMEXPR");	WRITE_NODE_FIELD(fromlist);	WRITE_NODE_FIELD(quals);}/***************************************************************************** * *	Stuff from relation.h. * *****************************************************************************//* * print the basic stuff of all nodes that inherit from Path * * Note we do NOT print the parent, else we'd be in infinite recursion */static void_outPathInfo(StringInfo str, Path *node){	WRITE_ENUM_FIELD(pathtype, NodeTag);	WRITE_FLOAT_FIELD(startup_cost, "%.2f");	WRITE_FLOAT_FIELD(total_cost, "%.2f");	WRITE_NODE_FIELD(pathkeys);}/* * print the basic stuff of all nodes that inherit from JoinPath */static void_outJoinPathInfo(StringInfo str, JoinPath *node){	_outPathInfo(str, (Path *) node);	WRITE_ENUM_FIELD(jointype, JoinType);	WRITE_NODE_FIELD(outerjoinpath);	WRITE_NODE_FIELD(innerjoinpath);	WRITE_NODE_FIELD(joinrestrictinfo);}static void_outPath(StringInfo str, Path *node){	WRITE_NODE_TYPE("PATH");	_outPathInfo(str, (Path *) node);}static void_outIndexPath(StringInfo str, IndexPath *node){	WRITE_NODE_TYPE("INDEXPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(indexinfo);	WRITE_NODE_FIELD(indexclauses);	WRITE_NODE_FIELD(indexquals);	WRITE_BOOL_FIELD(isjoininner);	WRITE_ENUM_FIELD(indexscandir, ScanDirection);	WRITE_FLOAT_FIELD(indextotalcost, "%.2f");	WRITE_FLOAT_FIELD(indexselectivity, "%.4f");	WRITE_FLOAT_FIELD(rows, "%.0f");}static void_outBitmapHeapPath(StringInfo str, BitmapHeapPath *node){	WRITE_NODE_TYPE("BITMAPHEAPPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(bitmapqual);	WRITE_BOOL_FIELD(isjoininner);	WRITE_FLOAT_FIELD(rows, "%.0f");}static void_outBitmapAndPath(StringInfo str, BitmapAndPath *node){	WRITE_NODE_TYPE("BITMAPANDPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(bitmapquals);	WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");}static void_outBitmapOrPath(StringInfo str, BitmapOrPath *node){	WRITE_NODE_TYPE("BITMAPORPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(bitmapquals);	WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");}static void_outTidPath(StringInfo str, TidPath *node){	WRITE_NODE_TYPE("TIDPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(tideval);}static void_outAppendPath(StringInfo str, AppendPath *node){	WRITE_NODE_TYPE("APPENDPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(subpaths);}static void_outResultPath(StringInfo str, ResultPath *node){	WRITE_NODE_TYPE("RESULTPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(subpath);	WRITE_NODE_FIELD(constantqual);}static void_outMaterialPath(StringInfo str, MaterialPath *node){	WRITE_NODE_TYPE("MATERIALPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(subpath);}static void_outUniquePath(StringInfo str, UniquePath *node){	WRITE_NODE_TYPE("UNIQUEPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(subpath);	WRITE_ENUM_FIELD(umethod, UniquePathMethod);	WRITE_FLOAT_FIELD(rows, "%.0f");}static void_outNestPath(StringInfo str, NestPath *node){	WRITE_NODE_TYPE("NESTPATH");	_outJoinPathInfo(str, (JoinPath *) node);}static void_outMergePath(StringInfo str, MergePath *node){	WRITE_NODE_TYPE("MERGEPATH");	_outJoinPathInfo(str, (JoinPath *) node);	WRITE_NODE_FIELD(path_mergeclauses);	WRITE_NODE_FIELD(outersortkeys);	WRITE_NODE_FIELD(innersortkeys);}static void_outHashPath(StringInfo str, HashPath *node){	WRITE_NODE_TYPE("HASHPATH");	_outJoinPathInfo(str, (JoinPath *) node);	WRITE_NODE_FIELD(path_hashclauses);}static void_outPlannerInfo(StringInfo str, PlannerInfo *node){	WRITE_NODE_TYPE("PLANNERINFO");	/* NB: this isn't a complete set of fields */	WRITE_NODE_FIELD(parse);	WRITE_NODE_FIELD(join_rel_list);	WRITE_NODE_FIELD(equi_key_list);	WRITE_NODE_FIELD(left_join_clauses);	WRITE_NODE_FIELD(right_join_clauses);	WRITE_NODE_FIELD(full_join_clauses);	WRITE_NODE_FIELD(in_info_list);	WRITE_NODE_FIELD(query_pathkeys);	WRITE_NODE_FIELD(group_pathkeys);	WRITE_NODE_FIELD(sort_pathkeys);	WRITE_FLOAT_FIELD(tuple_fraction, "%.4f");	WRITE_BOOL_FIELD(hasJoinRTEs);	WRITE_BOOL_FIELD(hasOuterJoins);	WRITE_BOOL_FIELD(hasHavingQual);}static void_outRelOptInfo(StringInfo str, RelOptInfo *node){	WRITE_NODE_TYPE("RELOPTINFO");	/* NB: this isn't a complete set of fields */	WRITE_ENUM_FIELD(reloptkind, RelOptKind);	WRITE_BITMAPSET_FIELD(relids);	WRITE_FLOAT_FIELD(rows, "%.0f");	WRITE_INT_FIELD(width);	WRITE_NODE_FIELD(reltargetlist);	WRITE_NODE_FIELD(pathlist);	WRITE_NODE_FIELD(cheapest_startup_path);	WRITE_NODE_FIELD(cheapest_total_path);	WRITE_NODE_FIELD(cheapest_unique_path);	WRITE_UINT_FIELD(relid);	WRITE_ENUM_FIELD(rtekind, RTEKind);	WRITE_UINT_FIELD(min_attr);	WRITE_UINT_FIELD(max_attr);	WRITE_NODE_FIELD(indexlist);	WRITE_UINT_FIELD(pages);	WRITE_FLOAT_FIELD(tuples, "%.0f");	WRITE_NODE_FIELD(subplan);	WRITE_NODE_FIELD(baserestrictinfo);	WRITE_BITMAPSET_FIELD(outerjoinset);	WRITE_NODE_FIELD(joininfo);	WRITE_BITMAPSET_FIELD(index_outer_relids);	WRITE_NODE_FIELD(index_inner_paths);}static void_outIndexOptInfo(StringInfo str, IndexOptInfo *node){	WRITE_NODE_TYPE("INDEXOPTINFO");	/* NB: this isn't a complete set of fields */	WRITE_OID_FIELD(indexoid);	/* Do NOT print rel field, else infinite recursion */	WRITE_UINT_FIELD(pages);	WRITE_FLOAT_FIELD(tuples, "%.0f");	WRITE_INT_FIELD(ncolumns);	WRITE_NODE_FIELD(indexprs);	WRITE_NODE_FIELD(indpred);	WRITE_BOOL_FIELD(predOK);	WRITE_BOOL_FIELD(unique);}static void_outPathKeyItem(StringInfo str, PathKeyItem *node){	WRITE_NODE_TYPE("PATHKEYITEM");	WRITE_NODE_FIELD(key);	WRITE_OID_FIELD(sortop);}static void_outRestrictInfo(StringInfo str, RestrictInfo *node){	WRITE_NODE_TYPE("RESTRICTINFO");	/* NB: this isn't a complete set of fields */	WRITE_NODE_FIELD(clause);	WRITE_BOOL_FIELD(is_pushed_down);	WRITE_BOOL_FIELD(outerjoin_delayed);	WRITE_BOOL_FIELD(can_join);	WRITE_BITMAPSET_FIELD(clause_relids);	WRITE_BITMAPSET_FIELD(required_relids);	WRITE_BITMAPSET_FIELD(left_relids);	WRITE_BITMAPSET_FIELD(right_relids);	WRITE_NODE_FIELD(orclause);	WRITE_OID_FIELD(mergejoinoperator);	WRITE_OID_FIELD(left_sortop);	WRITE_OID_FIELD(right_sortop);	WRITE_NODE_FIELD(left_pathkey);	WRITE_NODE_FIELD(right_pathkey);	WRITE_OID_FIELD(hashjoinoperator);}static void_outInnerIndexscanInfo(StringInfo str, InnerIndexscanInfo *node){	WRITE_NODE_TYPE("INNERINDEXSCANINFO");	WRITE_BITMAPSET_FIELD(other_relids);	WRITE_BOOL_FIELD(isouterjoin);	WRITE_NODE_FIELD(best_innerpath);}static void_outInClauseInfo(StringInfo str, InClauseInfo *node){	WRITE_NODE_TYPE("INCLAUSEINFO");	WRITE_BITMAPSET_FIELD(lefthand);	WRITE_BITMAPSET_FIELD(righthand);	WRITE_NODE_FIELD(sub_targetlist);}/***************************************************************************** * *	Stuff from parsenodes.h. * *****************************************************************************/static void_outCreateStmt(StringInfo str, CreateStmt *node){	WRITE_NODE_TYPE("CREATESTMT");	WRITE_NODE_FIELD(relation);	WRITE_NODE_FIELD(tableElts);	WRITE_NODE_FIELD(inhRelations);	WRITE_NODE_FIELD(constraints);	WRITE_ENUM_FIELD(hasoids, ContainsOids);	WRITE_ENUM_FIELD(oncommit, OnCommitAction);	WRITE_STRING_FIELD(tablespacename);}static void_outIndexStmt(StringInfo str, IndexStmt *node){	WRITE_NODE_TYPE("INDEXSTMT");	WRITE_STRING_FIELD(idxname);	WRITE_NODE_FIELD(relation);	WRITE_STRING_FIELD(accessMethod);	WRITE_STRING_FIELD(tableSpace);	WRITE_NODE_FIELD(indexParams);	WRITE_NODE_FIELD(whereClause);	WRITE_NODE_FIELD(rangetable);	WRITE_BOOL_FIELD(unique);	WRITE_BOOL_FIELD(primary);	WRITE_BOOL_FIELD(isconstraint);}static void_outNotifyStmt(StringInfo str, NotifyStmt *node){	WRITE_NODE_TYPE("NOTIFY");	WRITE_NODE_FIELD(relation);}static void_outDeclareCursorStmt(StringInfo str, DeclareCursorStmt *node){	WRITE_NODE_TYPE("DECLARECURSOR");	WRITE_STRING_FIELD(portalname);	WRITE_INT_FIELD(options);	WRITE_NODE_FIELD(query);}static void_outSelectStmt(StringInfo str, SelectStmt *node){	WRITE_NODE_TYPE("SELECT");	WRITE_NODE_FIELD(distinctClause);	WRITE_NODE_FIELD(into);	WRITE_NODE_FIELD(intoColNames);	WRITE_ENUM_FIELD(intoHasOids, ContainsOids);	WRITE_NODE_FIELD(targetList);	WRITE_NODE_FIELD(fromClause);	WRITE_NODE_FIELD(whereClause);	WRITE_NODE_FIELD(groupClause);	WRITE_NODE_FIELD(havingClause);	WRITE_NODE_FIELD(sortClause);	WRITE_NODE_FIELD(limitOffset);	WRITE_NODE_FIELD(limitCount);	WRITE_NODE_FIELD(lockingClause);	WRITE_ENUM_FIELD(op, SetOperation);	WRITE_BOOL_FIELD(all);	WRITE_NODE_FIELD(larg);	WRITE_NODE_FIELD(rarg);}static void_outFuncCall(StringInfo str, FuncCall *node){	WRITE_NODE_TYPE("FUNCCALL");	WRITE_NODE_FIELD(funcname);	WRITE_NODE_FIELD(args);	WRITE_BOOL_FIELD(agg_star);	WRITE_BOOL_FIELD(agg_distinct);}static void_outDefElem(StringInfo str, DefElem *node){	WRITE_NODE_TYPE("DEFELEM");	WRITE_STRING_FIELD(defname);	WRITE_NODE_FIELD(arg);}static void_outLockingClause(StringInfo str, LockingClause *node){	WRITE_NODE_TYPE("LOCKINGCLAUSE");	WRITE_NODE_FIELD(lockedRels);	WRITE_BOOL_FIELD(forUpdate);	WRITE_BOOL_FIELD(nowait);}static void_outColumnDef(StringInfo str, ColumnDef *node){	WRITE_NODE_TYPE("COLUMNDEF");	WRITE_STRING_FIELD(colname);	WRITE_NODE_FIELD(typename);	WRITE_INT_FIELD(inhcount);	WRITE_BOOL_FIELD(is_local);	WRITE_BOOL_FIELD(is_not_null);	WRITE_NODE_FIELD(raw_default);	WRITE_STRING_FIELD(cooked_default);	WRITE_NODE_FIELD(constraints);	WRITE_NODE_FIELD(support);}static void_outTypeName(StringInfo str, TypeName *node){	WRITE_NODE_TYPE("TYPENAME");	WRITE_NODE_FIELD(names);	WRITE_OID_FIELD(typeid);	WRITE_BOOL_FIELD(timezone);	WRITE_BOOL_FIELD(setof);	WRITE_BOOL_FIELD(pct_type);	WRITE_INT_FIELD(typmod);	WRITE_NODE_FIELD(arrayBounds);}static void_outTypeCast(StringInfo str, TypeCast *node){	WRITE_NODE_TYPE("TYPECAST");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -