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

📄 outfuncs.c

📁 PostgreSQL7.4.6 for Linux
💻 C
📖 第 1 页 / 共 3 页
字号:
static void_outArrayRef(StringInfo str, ArrayRef *node){	WRITE_NODE_TYPE("ARRAYREF");	WRITE_OID_FIELD(refrestype);	WRITE_OID_FIELD(refarraytype);	WRITE_OID_FIELD(refelemtype);	WRITE_NODE_FIELD(refupperindexpr);	WRITE_NODE_FIELD(reflowerindexpr);	WRITE_NODE_FIELD(refexpr);	WRITE_NODE_FIELD(refassgnexpr);}static void_outFuncExpr(StringInfo str, FuncExpr *node){	WRITE_NODE_TYPE("FUNCEXPR");	WRITE_OID_FIELD(funcid);	WRITE_OID_FIELD(funcresulttype);	WRITE_BOOL_FIELD(funcretset);	WRITE_ENUM_FIELD(funcformat, CoercionForm);	WRITE_NODE_FIELD(args);}static void_outOpExpr(StringInfo str, OpExpr *node){	WRITE_NODE_TYPE("OPEXPR");	WRITE_OID_FIELD(opno);	WRITE_OID_FIELD(opfuncid);	WRITE_OID_FIELD(opresulttype);	WRITE_BOOL_FIELD(opretset);	WRITE_NODE_FIELD(args);}static void_outDistinctExpr(StringInfo str, DistinctExpr *node){	WRITE_NODE_TYPE("DISTINCTEXPR");	WRITE_OID_FIELD(opno);	WRITE_OID_FIELD(opfuncid);	WRITE_OID_FIELD(opresulttype);	WRITE_BOOL_FIELD(opretset);	WRITE_NODE_FIELD(args);}static void_outScalarArrayOpExpr(StringInfo str, ScalarArrayOpExpr *node){	WRITE_NODE_TYPE("SCALARARRAYOPEXPR");	WRITE_OID_FIELD(opno);	WRITE_OID_FIELD(opfuncid);	WRITE_BOOL_FIELD(useOr);	WRITE_NODE_FIELD(args);}static void_outBoolExpr(StringInfo str, BoolExpr *node){	char	   *opstr = NULL;	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_OIDLIST_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_INTLIST_FIELD(paramIds);	WRITE_NODE_FIELD(plan);	WRITE_INT_FIELD(plan_id);	WRITE_NODE_FIELD(rtable);	WRITE_BOOL_FIELD(useHashTable);	WRITE_BOOL_FIELD(unknownEqFalse);	WRITE_INTLIST_FIELD(setParam);	WRITE_INTLIST_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_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_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_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_outCoalesceExpr(StringInfo str, CoalesceExpr *node){	WRITE_NODE_TYPE("COALESCE");	WRITE_OID_FIELD(coalescetype);	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(resdom);	WRITE_NODE_FIELD(expr);}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);}/* *	IndexPath is a subclass of Path. */static void_outIndexPath(StringInfo str, IndexPath *node){	WRITE_NODE_TYPE("INDEXPATH");	_outPathInfo(str, (Path *) node);	WRITE_NODE_FIELD(indexinfo);	WRITE_NODE_FIELD(indexqual);	WRITE_NODE_FIELD(indexjoinclauses);	WRITE_ENUM_FIELD(indexscandir, ScanDirection);	WRITE_FLOAT_FIELD(rows, "%.2f");}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_BOOL_FIELD(use_hash);	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_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(ispusheddown);	WRITE_NODE_FIELD(subclauseindices);	WRITE_BITMAPSET_FIELD(left_relids);	WRITE_BITMAPSET_FIELD(right_relids);	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_outJoinInfo(StringInfo str, JoinInfo *node){	WRITE_NODE_TYPE("JOININFO");	WRITE_BITMAPSET_FIELD(unjoined_relids);	WRITE_NODE_FIELD(jinfo_restrictinfo);}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("CREATE");	WRITE_NODE_FIELD(relation);	WRITE_NODE_FIELD(tableElts);	WRITE_NODE_FIELD(inhRelations);	WRITE_NODE_FIELD(constraints);	WRITE_BOOL_FIELD(hasoids);	WRITE_ENUM_FIELD(oncommit, OnCommitAction);}static void_outIndexStmt(StringInfo str, IndexStmt *node){	WRITE_NODE_TYPE("INDEX");	WRITE_STRING_FIELD(idxname);	WRITE_NODE_FIELD(relation);	WRITE_STRING_FIELD(accessMethod);	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");	/* XXX this is pretty durn incomplete */	WRITE_NODE_FIELD(whereClause);}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_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");	WRITE_NODE_FIELD(arg);	WRITE_NODE_FIELD(typename);}static void_outIndexElem(StringInfo str, IndexElem *node){	WRITE_NODE_TYPE("INDEXELEM");	WRITE_STRING_FIELD(name);	WRITE_NODE_FIELD(expr);	WRITE_NODE_FIELD(opclass);}static void_outQuery(StringInfo str, Query *node){	WRITE_NODE_TYPE("QUERY");	WRITE_ENUM_FIELD(commandType, CmdType);	WRITE_ENUM_FIELD(querySource, QuerySource);	WRITE_BOOL_FIELD(canSetTag);	/*	 * Hack to work around missing outfuncs routines for a lot of the	 * utility-statement node types.  (The only one we actually *need* for	 * rules support is NotifyStmt.)  Someday we ought to support 'em all,	 * but for the meantime do this to avoid getting lots of warnings when	 * running with debug_print_parse on.	 */	if (node->utilityStmt)	{		switch (nodeTag(node->utilityStmt))		{			case T_CreateStmt:			case T_IndexStmt:			case T_NotifyStmt:			case T_DeclareCursorStmt:

⌨️ 快捷键说明

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