PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
outfuncs.c File Reference
#include "postgres.h"
#include <ctype.h>
#include "lib/stringinfo.h"
#include "nodes/extensible.h"
#include "nodes/plannodes.h"
#include "nodes/relation.h"
#include "utils/datum.h"
#include "utils/rel.h"
Include dependency graph for outfuncs.c:

Go to the source code of this file.

Macros

#define WRITE_NODE_TYPE(nodelabel)   appendStringInfoString(str, nodelabel)
 
#define WRITE_INT_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname)
 
#define WRITE_UINT_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname)
 
#define WRITE_OID_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %u", node->fldname)
 
#define WRITE_LONG_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %ld", node->fldname)
 
#define WRITE_CHAR_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %c", node->fldname)
 
#define WRITE_ENUM_FIELD(fldname, enumtype)
 
#define WRITE_FLOAT_FIELD(fldname, format)   appendStringInfo(str, " :" CppAsString(fldname) " " format, node->fldname)
 
#define WRITE_BOOL_FIELD(fldname)
 
#define WRITE_STRING_FIELD(fldname)
 
#define WRITE_LOCATION_FIELD(fldname)   appendStringInfo(str, " :" CppAsString(fldname) " %d", node->fldname)
 
#define WRITE_NODE_FIELD(fldname)
 
#define WRITE_BITMAPSET_FIELD(fldname)
 
#define booltostr(x)   ((x) ? "true" : "false")
 

Functions

void outToken (StringInfo str, const char *s)
 
static void _outList (StringInfo str, const List *node)
 
void outBitmapset (StringInfo str, const Bitmapset *bms)
 
void outDatum (StringInfo str, Datum value, int typlen, bool typbyval)
 
static void _outPlannedStmt (StringInfo str, const PlannedStmt *node)
 
static void _outPlanInfo (StringInfo str, const Plan *node)
 
static void _outScanInfo (StringInfo str, const Scan *node)
 
static void _outJoinPlanInfo (StringInfo str, const Join *node)
 
static void _outPlan (StringInfo str, const Plan *node)
 
static void _outResult (StringInfo str, const Result *node)
 
static void _outProjectSet (StringInfo str, const ProjectSet *node)
 
static void _outModifyTable (StringInfo str, const ModifyTable *node)
 
static void _outAppend (StringInfo str, const Append *node)
 
static void _outMergeAppend (StringInfo str, const MergeAppend *node)
 
static void _outRecursiveUnion (StringInfo str, const RecursiveUnion *node)
 
static void _outBitmapAnd (StringInfo str, const BitmapAnd *node)
 
static void _outBitmapOr (StringInfo str, const BitmapOr *node)
 
static void _outGather (StringInfo str, const Gather *node)
 
static void _outGatherMerge (StringInfo str, const GatherMerge *node)
 
static void _outScan (StringInfo str, const Scan *node)
 
static void _outSeqScan (StringInfo str, const SeqScan *node)
 
static void _outSampleScan (StringInfo str, const SampleScan *node)
 
static void _outIndexScan (StringInfo str, const IndexScan *node)
 
static void _outIndexOnlyScan (StringInfo str, const IndexOnlyScan *node)
 
static void _outBitmapIndexScan (StringInfo str, const BitmapIndexScan *node)
 
static void _outBitmapHeapScan (StringInfo str, const BitmapHeapScan *node)
 
static void _outTidScan (StringInfo str, const TidScan *node)
 
static void _outSubqueryScan (StringInfo str, const SubqueryScan *node)
 
static void _outFunctionScan (StringInfo str, const FunctionScan *node)
 
static void _outTableFuncScan (StringInfo str, const TableFuncScan *node)
 
static void _outValuesScan (StringInfo str, const ValuesScan *node)
 
static void _outCteScan (StringInfo str, const CteScan *node)
 
static void _outNamedTuplestoreScan (StringInfo str, const NamedTuplestoreScan *node)
 
static void _outWorkTableScan (StringInfo str, const WorkTableScan *node)
 
static void _outForeignScan (StringInfo str, const ForeignScan *node)
 
static void _outCustomScan (StringInfo str, const CustomScan *node)
 
static void _outJoin (StringInfo str, const Join *node)
 
static void _outNestLoop (StringInfo str, const NestLoop *node)
 
static void _outMergeJoin (StringInfo str, const MergeJoin *node)
 
static void _outHashJoin (StringInfo str, const HashJoin *node)
 
static void _outAgg (StringInfo str, const Agg *node)
 
static void _outWindowAgg (StringInfo str, const WindowAgg *node)
 
static void _outGroup (StringInfo str, const Group *node)
 
static void _outMaterial (StringInfo str, const Material *node)
 
static void _outSort (StringInfo str, const Sort *node)
 
static void _outUnique (StringInfo str, const Unique *node)
 
static void _outHash (StringInfo str, const Hash *node)
 
static void _outSetOp (StringInfo str, const SetOp *node)
 
static void _outLockRows (StringInfo str, const LockRows *node)
 
static void _outLimit (StringInfo str, const Limit *node)
 
static void _outNestLoopParam (StringInfo str, const NestLoopParam *node)
 
static void _outPlanRowMark (StringInfo str, const PlanRowMark *node)
 
static void _outPlanInvalItem (StringInfo str, const PlanInvalItem *node)
 
static void _outAlias (StringInfo str, const Alias *node)
 
static void _outRangeVar (StringInfo str, const RangeVar *node)
 
static void _outTableFunc (StringInfo str, const TableFunc *node)
 
static void _outIntoClause (StringInfo str, const IntoClause *node)
 
static void _outVar (StringInfo str, const Var *node)
 
static void _outConst (StringInfo str, const Const *node)
 
static void _outParam (StringInfo str, const Param *node)
 
static void _outAggref (StringInfo str, const Aggref *node)
 
static void _outGroupingFunc (StringInfo str, const GroupingFunc *node)
 
static void _outWindowFunc (StringInfo str, const WindowFunc *node)
 
static void _outArrayRef (StringInfo str, const ArrayRef *node)
 
static void _outFuncExpr (StringInfo str, const FuncExpr *node)
 
static void _outNamedArgExpr (StringInfo str, const NamedArgExpr *node)
 
static void _outOpExpr (StringInfo str, const OpExpr *node)
 
static void _outDistinctExpr (StringInfo str, const DistinctExpr *node)
 
static void _outNullIfExpr (StringInfo str, const NullIfExpr *node)
 
static void _outScalarArrayOpExpr (StringInfo str, const ScalarArrayOpExpr *node)
 
static void _outBoolExpr (StringInfo str, const BoolExpr *node)
 
static void _outSubLink (StringInfo str, const SubLink *node)
 
static void _outSubPlan (StringInfo str, const SubPlan *node)
 
static void _outAlternativeSubPlan (StringInfo str, const AlternativeSubPlan *node)
 
static void _outFieldSelect (StringInfo str, const FieldSelect *node)
 
static void _outFieldStore (StringInfo str, const FieldStore *node)
 
static void _outRelabelType (StringInfo str, const RelabelType *node)
 
static void _outCoerceViaIO (StringInfo str, const CoerceViaIO *node)
 
static void _outArrayCoerceExpr (StringInfo str, const ArrayCoerceExpr *node)
 
static void _outConvertRowtypeExpr (StringInfo str, const ConvertRowtypeExpr *node)
 
static void _outCollateExpr (StringInfo str, const CollateExpr *node)
 
static void _outCaseExpr (StringInfo str, const CaseExpr *node)
 
static void _outCaseWhen (StringInfo str, const CaseWhen *node)
 
static void _outCaseTestExpr (StringInfo str, const CaseTestExpr *node)
 
static void _outArrayExpr (StringInfo str, const ArrayExpr *node)
 
static void _outRowExpr (StringInfo str, const RowExpr *node)
 
static void _outRowCompareExpr (StringInfo str, const RowCompareExpr *node)
 
static void _outCoalesceExpr (StringInfo str, const CoalesceExpr *node)
 
static void _outMinMaxExpr (StringInfo str, const MinMaxExpr *node)
 
static void _outSQLValueFunction (StringInfo str, const SQLValueFunction *node)
 
static void _outXmlExpr (StringInfo str, const XmlExpr *node)
 
static void _outNullTest (StringInfo str, const NullTest *node)
 
static void _outBooleanTest (StringInfo str, const BooleanTest *node)
 
static void _outCoerceToDomain (StringInfo str, const CoerceToDomain *node)
 
static void _outCoerceToDomainValue (StringInfo str, const CoerceToDomainValue *node)
 
static void _outSetToDefault (StringInfo str, const SetToDefault *node)
 
static void _outCurrentOfExpr (StringInfo str, const CurrentOfExpr *node)
 
static void _outInferenceElem (StringInfo str, const InferenceElem *node)
 
static void _outTargetEntry (StringInfo str, const TargetEntry *node)
 
static void _outRangeTblRef (StringInfo str, const RangeTblRef *node)
 
static void _outJoinExpr (StringInfo str, const JoinExpr *node)
 
static void _outFromExpr (StringInfo str, const FromExpr *node)
 
static void _outOnConflictExpr (StringInfo str, const OnConflictExpr *node)
 
static void _outPathInfo (StringInfo str, const Path *node)
 
static void _outJoinPathInfo (StringInfo str, const JoinPath *node)
 
static void _outPath (StringInfo str, const Path *node)
 
static void _outIndexPath (StringInfo str, const IndexPath *node)
 
static void _outBitmapHeapPath (StringInfo str, const BitmapHeapPath *node)
 
static void _outBitmapAndPath (StringInfo str, const BitmapAndPath *node)
 
static void _outBitmapOrPath (StringInfo str, const BitmapOrPath *node)
 
static void _outTidPath (StringInfo str, const TidPath *node)
 
static void _outSubqueryScanPath (StringInfo str, const SubqueryScanPath *node)
 
static void _outForeignPath (StringInfo str, const ForeignPath *node)
 
static void _outCustomPath (StringInfo str, const CustomPath *node)
 
static void _outAppendPath (StringInfo str, const AppendPath *node)
 
static void _outMergeAppendPath (StringInfo str, const MergeAppendPath *node)
 
static void _outResultPath (StringInfo str, const ResultPath *node)
 
static void _outMaterialPath (StringInfo str, const MaterialPath *node)
 
static void _outUniquePath (StringInfo str, const UniquePath *node)
 
static void _outGatherPath (StringInfo str, const GatherPath *node)
 
static void _outProjectionPath (StringInfo str, const ProjectionPath *node)
 
static void _outProjectSetPath (StringInfo str, const ProjectSetPath *node)
 
static void _outSortPath (StringInfo str, const SortPath *node)
 
static void _outGroupPath (StringInfo str, const GroupPath *node)
 
static void _outUpperUniquePath (StringInfo str, const UpperUniquePath *node)
 
static void _outAggPath (StringInfo str, const AggPath *node)
 
static void _outRollupData (StringInfo str, const RollupData *node)
 
static void _outGroupingSetData (StringInfo str, const GroupingSetData *node)
 
static void _outGroupingSetsPath (StringInfo str, const GroupingSetsPath *node)
 
static void _outMinMaxAggPath (StringInfo str, const MinMaxAggPath *node)
 
static void _outWindowAggPath (StringInfo str, const WindowAggPath *node)
 
static void _outSetOpPath (StringInfo str, const SetOpPath *node)
 
static void _outRecursiveUnionPath (StringInfo str, const RecursiveUnionPath *node)
 
static void _outLockRowsPath (StringInfo str, const LockRowsPath *node)
 
static void _outModifyTablePath (StringInfo str, const ModifyTablePath *node)
 
static void _outLimitPath (StringInfo str, const LimitPath *node)
 
static void _outGatherMergePath (StringInfo str, const GatherMergePath *node)
 
static void _outNestPath (StringInfo str, const NestPath *node)
 
static void _outMergePath (StringInfo str, const MergePath *node)
 
static void _outHashPath (StringInfo str, const HashPath *node)
 
static void _outPlannerGlobal (StringInfo str, const PlannerGlobal *node)
 
static void _outPlannerInfo (StringInfo str, const PlannerInfo *node)
 
static void _outRelOptInfo (StringInfo str, const RelOptInfo *node)
 
static void _outIndexOptInfo (StringInfo str, const IndexOptInfo *node)
 
static void _outForeignKeyOptInfo (StringInfo str, const ForeignKeyOptInfo *node)
 
static void _outStatisticExtInfo (StringInfo str, const StatisticExtInfo *node)
 
static void _outEquivalenceClass (StringInfo str, const EquivalenceClass *node)
 
static void _outEquivalenceMember (StringInfo str, const EquivalenceMember *node)
 
static void _outPathKey (StringInfo str, const PathKey *node)
 
static void _outPathTarget (StringInfo str, const PathTarget *node)
 
static void _outParamPathInfo (StringInfo str, const ParamPathInfo *node)
 
static void _outRestrictInfo (StringInfo str, const RestrictInfo *node)
 
static void _outPlaceHolderVar (StringInfo str, const PlaceHolderVar *node)
 
static void _outSpecialJoinInfo (StringInfo str, const SpecialJoinInfo *node)
 
static void _outAppendRelInfo (StringInfo str, const AppendRelInfo *node)
 
static void _outPartitionedChildRelInfo (StringInfo str, const PartitionedChildRelInfo *node)
 
static void _outPlaceHolderInfo (StringInfo str, const PlaceHolderInfo *node)
 
static void _outMinMaxAggInfo (StringInfo str, const MinMaxAggInfo *node)
 
static void _outPlannerParamItem (StringInfo str, const PlannerParamItem *node)
 
static void _outExtensibleNode (StringInfo str, const ExtensibleNode *node)
 
static void _outCreateStmtInfo (StringInfo str, const CreateStmt *node)
 
static void _outCreateStmt (StringInfo str, const CreateStmt *node)
 
static void _outCreateForeignTableStmt (StringInfo str, const CreateForeignTableStmt *node)
 
static void _outImportForeignSchemaStmt (StringInfo str, const ImportForeignSchemaStmt *node)
 
static void _outIndexStmt (StringInfo str, const IndexStmt *node)
 
static void _outCreateStatsStmt (StringInfo str, const CreateStatsStmt *node)
 
static void _outNotifyStmt (StringInfo str, const NotifyStmt *node)
 
static void _outDeclareCursorStmt (StringInfo str, const DeclareCursorStmt *node)
 
static void _outSelectStmt (StringInfo str, const SelectStmt *node)
 
static void _outFuncCall (StringInfo str, const FuncCall *node)
 
static void _outDefElem (StringInfo str, const DefElem *node)
 
static void _outTableLikeClause (StringInfo str, const TableLikeClause *node)
 
static void _outLockingClause (StringInfo str, const LockingClause *node)
 
static void _outXmlSerialize (StringInfo str, const XmlSerialize *node)
 
static void _outTriggerTransition (StringInfo str, const TriggerTransition *node)
 
static void _outColumnDef (StringInfo str, const ColumnDef *node)
 
static void _outTypeName (StringInfo str, const TypeName *node)
 
static void _outTypeCast (StringInfo str, const TypeCast *node)
 
static void _outCollateClause (StringInfo str, const CollateClause *node)
 
static void _outIndexElem (StringInfo str, const IndexElem *node)
 
static void _outQuery (StringInfo str, const Query *node)
 
static void _outWithCheckOption (StringInfo str, const WithCheckOption *node)
 
static void _outSortGroupClause (StringInfo str, const SortGroupClause *node)
 
static void _outGroupingSet (StringInfo str, const GroupingSet *node)
 
static void _outWindowClause (StringInfo str, const WindowClause *node)
 
static void _outRowMarkClause (StringInfo str, const RowMarkClause *node)
 
static void _outWithClause (StringInfo str, const WithClause *node)
 
static void _outCommonTableExpr (StringInfo str, const CommonTableExpr *node)
 
static void _outSetOperationStmt (StringInfo str, const SetOperationStmt *node)
 
static void _outRangeTblEntry (StringInfo str, const RangeTblEntry *node)
 
static void _outRangeTblFunction (StringInfo str, const RangeTblFunction *node)
 
static void _outTableSampleClause (StringInfo str, const TableSampleClause *node)
 
static void _outAExpr (StringInfo str, const A_Expr *node)
 
static void _outValue (StringInfo str, const Value *value)
 
static void _outColumnRef (StringInfo str, const ColumnRef *node)
 
static void _outParamRef (StringInfo str, const ParamRef *node)
 
static void _outAConst (StringInfo str, const A_Const *node)
 
static void _outA_Star (StringInfo str, const A_Star *node)
 
static void _outA_Indices (StringInfo str, const A_Indices *node)
 
static void _outA_Indirection (StringInfo str, const A_Indirection *node)
 
static void _outA_ArrayExpr (StringInfo str, const A_ArrayExpr *node)
 
static void _outResTarget (StringInfo str, const ResTarget *node)
 
static void _outMultiAssignRef (StringInfo str, const MultiAssignRef *node)
 
static void _outSortBy (StringInfo str, const SortBy *node)
 
static void _outWindowDef (StringInfo str, const WindowDef *node)
 
static void _outRangeSubselect (StringInfo str, const RangeSubselect *node)
 
static void _outRangeFunction (StringInfo str, const RangeFunction *node)
 
static void _outRangeTableSample (StringInfo str, const RangeTableSample *node)
 
static void _outRangeTableFunc (StringInfo str, const RangeTableFunc *node)
 
static void _outRangeTableFuncCol (StringInfo str, const RangeTableFuncCol *node)
 
static void _outConstraint (StringInfo str, const Constraint *node)
 
static void _outForeignKeyCacheInfo (StringInfo str, const ForeignKeyCacheInfo *node)
 
static void _outPartitionElem (StringInfo str, const PartitionElem *node)
 
static void _outPartitionSpec (StringInfo str, const PartitionSpec *node)
 
static void _outPartitionBoundSpec (StringInfo str, const PartitionBoundSpec *node)
 
static void _outPartitionRangeDatum (StringInfo str, const PartitionRangeDatum *node)
 
void outNode (StringInfo str, const void *obj)
 
char * nodeToString (const void *obj)
 
char * bmsToString (const Bitmapset *bms)
 

Macro Definition Documentation

#define booltostr (   x)    ((x) ? "true" : "false")

Definition at line 101 of file outfuncs.c.

Referenced by _outGatherMerge(), _outMergeAppend(), _outMergeJoin(), and _outSort().

#define WRITE_BITMAPSET_FIELD (   fldname)
Value:
(appendStringInfo(str, " :" CppAsString(fldname) " "), \
outBitmapset(str, node->fldname))
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void outBitmapset(StringInfo str, const Bitmapset *bms)
Definition: outfuncs.c:187
#define CppAsString(identifier)
Definition: c.h:161

Definition at line 96 of file outfuncs.c.

Referenced by _outAgg(), _outCustomScan(), _outEquivalenceClass(), _outEquivalenceMember(), _outForeignScan(), _outModifyTable(), _outParamPathInfo(), _outPlaceHolderInfo(), _outPlaceHolderVar(), _outPlanInfo(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outRangeTblEntry(), _outRangeTblFunction(), _outRelOptInfo(), _outRestrictInfo(), _outSpecialJoinInfo(), _outStatisticExtInfo(), and _outTableFunc().

#define WRITE_BOOL_FIELD (   fldname)
Value:
appendStringInfo(str, " :" CppAsString(fldname) " %s", \
booltostr(node->fldname))
#define booltostr(x)
Definition: outfuncs.c:101
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
#define CppAsString(identifier)
Definition: c.h:161

Definition at line 77 of file outfuncs.c.

Referenced by _outA_Indices(), _outAggref(), _outArrayCoerceExpr(), _outArrayExpr(), _outBitmapIndexScan(), _outBitmapOr(), _outColumnDef(), _outCommonTableExpr(), _outConst(), _outConstraint(), _outCreateStatsStmt(), _outCreateStmtInfo(), _outDistinctExpr(), _outEquivalenceClass(), _outEquivalenceMember(), _outForeignScan(), _outFuncCall(), _outFuncExpr(), _outFunctionScan(), _outGather(), _outGatherPath(), _outHash(), _outIndexOptInfo(), _outIndexStmt(), _outIntoClause(), _outJoinExpr(), _outJoinPathInfo(), _outJoinPlanInfo(), _outMergeJoin(), _outMergePath(), _outModifyTable(), _outModifyTablePath(), _outNullIfExpr(), _outNullTest(), _outOpExpr(), _outPartitionRangeDatum(), _outPathInfo(), _outPathKey(), _outPlanInfo(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outPlanRowMark(), _outProjectionPath(), _outQuery(), _outRangeFunction(), _outRangeSubselect(), _outRangeTableFunc(), _outRangeTableFuncCol(), _outRangeTblEntry(), _outRangeVar(), _outRelOptInfo(), _outRestrictInfo(), _outRollupData(), _outRowMarkClause(), _outScalarArrayOpExpr(), _outSelectStmt(), _outSetOperationStmt(), _outSortGroupClause(), _outSpecialJoinInfo(), _outSubPlan(), _outTargetEntry(), _outTriggerTransition(), _outTypeName(), _outWindowClause(), _outWindowFunc(), _outWithCheckOption(), and _outWithClause().

#define WRITE_CHAR_FIELD (   fldname)    appendStringInfo(str, " :" CppAsString(fldname) " %c", node->fldname)
#define WRITE_LONG_FIELD (   fldname)    appendStringInfo(str, " :" CppAsString(fldname) " %ld", node->fldname)

Definition at line 60 of file outfuncs.c.

Referenced by _outAgg(), _outRecursiveUnion(), and _outSetOp().

#define WRITE_NODE_FIELD (   fldname)
Value:
(appendStringInfo(str, " :" CppAsString(fldname) " "), \
outNode(str, node->fldname))
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void outNode(StringInfo str, const void *obj)
Definition: outfuncs.c:3568
#define CppAsString(identifier)
Definition: c.h:161

Definition at line 91 of file outfuncs.c.

Referenced by _outA_ArrayExpr(), _outA_Indices(), _outA_Indirection(), _outAExpr(), _outAgg(), _outAggPath(), _outAggref(), _outAlias(), _outAlternativeSubPlan(), _outAppend(), _outAppendPath(), _outAppendRelInfo(), _outArrayCoerceExpr(), _outArrayExpr(), _outArrayRef(), _outBitmapAnd(), _outBitmapAndPath(), _outBitmapHeapPath(), _outBitmapHeapScan(), _outBitmapIndexScan(), _outBitmapOr(), _outBitmapOrPath(), _outBooleanTest(), _outBoolExpr(), _outCaseExpr(), _outCaseWhen(), _outCoalesceExpr(), _outCoerceToDomain(), _outCoerceViaIO(), _outCollateClause(), _outCollateExpr(), _outColumnDef(), _outColumnRef(), _outCommonTableExpr(), _outConstraint(), _outConvertRowtypeExpr(), _outCreateForeignTableStmt(), _outCreateStatsStmt(), _outCreateStmtInfo(), _outCustomPath(), _outCustomScan(), _outDeclareCursorStmt(), _outDefElem(), _outDistinctExpr(), _outEquivalenceClass(), _outEquivalenceMember(), _outFieldSelect(), _outFieldStore(), _outForeignPath(), _outForeignScan(), _outFromExpr(), _outFuncCall(), _outFuncExpr(), _outFunctionScan(), _outGatherMergePath(), _outGatherPath(), _outGroupingFunc(), _outGroupingSet(), _outGroupingSetData(), _outGroupingSetsPath(), _outGroupPath(), _outHashJoin(), _outHashPath(), _outImportForeignSchemaStmt(), _outIndexElem(), _outIndexOnlyScan(), _outIndexOptInfo(), _outIndexPath(), _outIndexScan(), _outIndexStmt(), _outInferenceElem(), _outIntoClause(), _outJoinExpr(), _outJoinPathInfo(), _outJoinPlanInfo(), _outLimit(), _outLimitPath(), _outLockingClause(), _outLockRows(), _outLockRowsPath(), _outMaterialPath(), _outMergeAppend(), _outMergeAppendPath(), _outMergeJoin(), _outMergePath(), _outMinMaxAggInfo(), _outMinMaxAggPath(), _outMinMaxExpr(), _outModifyTable(), _outModifyTablePath(), _outMultiAssignRef(), _outNamedArgExpr(), _outNestLoop(), _outNestLoopParam(), _outNullIfExpr(), _outNullTest(), _outOnConflictExpr(), _outOpExpr(), _outParamPathInfo(), _outPartitionBoundSpec(), _outPartitionedChildRelInfo(), _outPartitionElem(), _outPartitionRangeDatum(), _outPartitionSpec(), _outPathInfo(), _outPathKey(), _outPathTarget(), _outPlaceHolderInfo(), _outPlaceHolderVar(), _outPlanInfo(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outPlannerParamItem(), _outProjectionPath(), _outProjectSetPath(), _outQuery(), _outRangeFunction(), _outRangeSubselect(), _outRangeTableFunc(), _outRangeTableFuncCol(), _outRangeTableSample(), _outRangeTblEntry(), _outRangeTblFunction(), _outRangeVar(), _outRecursiveUnionPath(), _outRelabelType(), _outRelOptInfo(), _outResTarget(), _outRestrictInfo(), _outResult(), _outResultPath(), _outRollupData(), _outRowCompareExpr(), _outRowExpr(), _outSampleScan(), _outScalarArrayOpExpr(), _outSelectStmt(), _outSetOperationStmt(), _outSetOpPath(), _outSortBy(), _outSortPath(), _outSpecialJoinInfo(), _outSubLink(), _outSubPlan(), _outSubqueryScan(), _outSubqueryScanPath(), _outTableFunc(), _outTableFuncScan(), _outTableLikeClause(), _outTableSampleClause(), _outTargetEntry(), _outTidPath(), _outTidScan(), _outTypeCast(), _outTypeName(), _outUniquePath(), _outUpperUniquePath(), _outValuesScan(), _outWindowAgg(), _outWindowAggPath(), _outWindowClause(), _outWindowDef(), _outWindowFunc(), _outWithCheckOption(), _outWithClause(), _outXmlExpr(), and _outXmlSerialize().

#define WRITE_NODE_TYPE (   nodelabel)    appendStringInfoString(str, nodelabel)

Definition at line 44 of file outfuncs.c.

Referenced by _outA_ArrayExpr(), _outA_Indices(), _outA_Indirection(), _outA_Star(), _outAConst(), _outAExpr(), _outAgg(), _outAggPath(), _outAggref(), _outAlias(), _outAlternativeSubPlan(), _outAppend(), _outAppendPath(), _outAppendRelInfo(), _outArrayCoerceExpr(), _outArrayExpr(), _outArrayRef(), _outBitmapAnd(), _outBitmapAndPath(), _outBitmapHeapPath(), _outBitmapHeapScan(), _outBitmapIndexScan(), _outBitmapOr(), _outBitmapOrPath(), _outBooleanTest(), _outBoolExpr(), _outCaseExpr(), _outCaseTestExpr(), _outCaseWhen(), _outCoalesceExpr(), _outCoerceToDomain(), _outCoerceToDomainValue(), _outCoerceViaIO(), _outCollateClause(), _outCollateExpr(), _outColumnDef(), _outColumnRef(), _outCommonTableExpr(), _outConst(), _outConstraint(), _outConvertRowtypeExpr(), _outCreateForeignTableStmt(), _outCreateStatsStmt(), _outCreateStmt(), _outCteScan(), _outCurrentOfExpr(), _outCustomPath(), _outCustomScan(), _outDeclareCursorStmt(), _outDefElem(), _outDistinctExpr(), _outEquivalenceClass(), _outEquivalenceMember(), _outExtensibleNode(), _outFieldSelect(), _outFieldStore(), _outForeignKeyCacheInfo(), _outForeignKeyOptInfo(), _outForeignPath(), _outForeignScan(), _outFromExpr(), _outFuncCall(), _outFuncExpr(), _outFunctionScan(), _outGather(), _outGatherMerge(), _outGatherMergePath(), _outGatherPath(), _outGroup(), _outGroupingFunc(), _outGroupingSet(), _outGroupingSetData(), _outGroupingSetsPath(), _outGroupPath(), _outHash(), _outHashJoin(), _outHashPath(), _outImportForeignSchemaStmt(), _outIndexElem(), _outIndexOnlyScan(), _outIndexOptInfo(), _outIndexPath(), _outIndexScan(), _outIndexStmt(), _outInferenceElem(), _outIntoClause(), _outJoin(), _outJoinExpr(), _outLimit(), _outLimitPath(), _outLockingClause(), _outLockRows(), _outLockRowsPath(), _outMaterial(), _outMaterialPath(), _outMergeAppend(), _outMergeAppendPath(), _outMergeJoin(), _outMergePath(), _outMinMaxAggInfo(), _outMinMaxAggPath(), _outMinMaxExpr(), _outModifyTable(), _outModifyTablePath(), _outMultiAssignRef(), _outNamedArgExpr(), _outNamedTuplestoreScan(), _outNestLoop(), _outNestLoopParam(), _outNestPath(), _outNotifyStmt(), _outNullIfExpr(), _outNullTest(), _outOnConflictExpr(), _outOpExpr(), _outParam(), _outParamPathInfo(), _outParamRef(), _outPartitionBoundSpec(), _outPartitionedChildRelInfo(), _outPartitionElem(), _outPartitionRangeDatum(), _outPartitionSpec(), _outPath(), _outPathKey(), _outPathTarget(), _outPlaceHolderInfo(), _outPlaceHolderVar(), _outPlan(), _outPlanInvalItem(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outPlannerParamItem(), _outPlanRowMark(), _outProjectionPath(), _outProjectSet(), _outProjectSetPath(), _outQuery(), _outRangeFunction(), _outRangeSubselect(), _outRangeTableFunc(), _outRangeTableFuncCol(), _outRangeTableSample(), _outRangeTblEntry(), _outRangeTblFunction(), _outRangeTblRef(), _outRangeVar(), _outRecursiveUnion(), _outRecursiveUnionPath(), _outRelabelType(), _outRelOptInfo(), _outResTarget(), _outRestrictInfo(), _outResult(), _outResultPath(), _outRollupData(), _outRowCompareExpr(), _outRowExpr(), _outRowMarkClause(), _outSampleScan(), _outScalarArrayOpExpr(), _outScan(), _outSelectStmt(), _outSeqScan(), _outSetOp(), _outSetOperationStmt(), _outSetOpPath(), _outSetToDefault(), _outSort(), _outSortBy(), _outSortGroupClause(), _outSortPath(), _outSpecialJoinInfo(), _outSQLValueFunction(), _outStatisticExtInfo(), _outSubLink(), _outSubPlan(), _outSubqueryScan(), _outSubqueryScanPath(), _outTableFunc(), _outTableFuncScan(), _outTableLikeClause(), _outTableSampleClause(), _outTargetEntry(), _outTidPath(), _outTidScan(), _outTriggerTransition(), _outTypeCast(), _outTypeName(), _outUnique(), _outUniquePath(), _outUpperUniquePath(), _outValuesScan(), _outVar(), _outWindowAgg(), _outWindowAggPath(), _outWindowClause(), _outWindowDef(), _outWindowFunc(), _outWithCheckOption(), _outWithClause(), _outWorkTableScan(), _outXmlExpr(), and _outXmlSerialize().

Function Documentation

static void _outA_ArrayExpr ( StringInfo  str,
const A_ArrayExpr node 
)
static

Definition at line 3273 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3274 {
3275  WRITE_NODE_TYPE("A_ARRAYEXPR");
3276 
3277  WRITE_NODE_FIELD(elements);
3278  WRITE_LOCATION_FIELD(location);
3279 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outA_Indices ( StringInfo  str,
const A_Indices node 
)
static

Definition at line 3254 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3255 {
3256  WRITE_NODE_TYPE("A_INDICES");
3257 
3258  WRITE_BOOL_FIELD(is_slice);
3259  WRITE_NODE_FIELD(lidx);
3260  WRITE_NODE_FIELD(uidx);
3261 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outA_Indirection ( StringInfo  str,
const A_Indirection node 
)
static

Definition at line 3264 of file outfuncs.c.

References arg, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3265 {
3266  WRITE_NODE_TYPE("A_INDIRECTION");
3267 
3269  WRITE_NODE_FIELD(indirection);
3270 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outA_Star ( StringInfo  str,
const A_Star node 
)
static

Definition at line 3248 of file outfuncs.c.

References WRITE_NODE_TYPE.

Referenced by outNode().

3249 {
3250  WRITE_NODE_TYPE("A_STAR");
3251 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outAConst ( StringInfo  str,
const A_Const node 
)
static

Definition at line 3238 of file outfuncs.c.

References _outValue(), appendStringInfoString(), A_Const::val, WRITE_LOCATION_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3239 {
3240  WRITE_NODE_TYPE("A_CONST");
3241 
3242  appendStringInfoString(str, " :val ");
3243  _outValue(str, &(node->val));
3244  WRITE_LOCATION_FIELD(location);
3245 }
static void _outValue(StringInfo str, const Value *value)
Definition: outfuncs.c:3179
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
Value val
Definition: parsenodes.h:287
static void _outAExpr ( StringInfo  str,
const A_Expr node 
)
static

Definition at line 3097 of file outfuncs.c.

References AEXPR_BETWEEN, AEXPR_BETWEEN_SYM, AEXPR_DISTINCT, AEXPR_ILIKE, AEXPR_IN, AEXPR_LIKE, AEXPR_NOT_BETWEEN, AEXPR_NOT_BETWEEN_SYM, AEXPR_NOT_DISTINCT, AEXPR_NULLIF, AEXPR_OF, AEXPR_OP, AEXPR_OP_ALL, AEXPR_OP_ANY, AEXPR_PAREN, AEXPR_SIMILAR, appendStringInfoChar(), appendStringInfoString(), A_Expr::kind, name, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3098 {
3099  WRITE_NODE_TYPE("AEXPR");
3100 
3101  switch (node->kind)
3102  {
3103  case AEXPR_OP:
3104  appendStringInfoChar(str, ' ');
3106  break;
3107  case AEXPR_OP_ANY:
3108  appendStringInfoChar(str, ' ');
3110  appendStringInfoString(str, " ANY ");
3111  break;
3112  case AEXPR_OP_ALL:
3113  appendStringInfoChar(str, ' ');
3115  appendStringInfoString(str, " ALL ");
3116  break;
3117  case AEXPR_DISTINCT:
3118  appendStringInfoString(str, " DISTINCT ");
3120  break;
3121  case AEXPR_NOT_DISTINCT:
3122  appendStringInfoString(str, " NOT_DISTINCT ");
3124  break;
3125  case AEXPR_NULLIF:
3126  appendStringInfoString(str, " NULLIF ");
3128  break;
3129  case AEXPR_OF:
3130  appendStringInfoString(str, " OF ");
3132  break;
3133  case AEXPR_IN:
3134  appendStringInfoString(str, " IN ");
3136  break;
3137  case AEXPR_LIKE:
3138  appendStringInfoString(str, " LIKE ");
3140  break;
3141  case AEXPR_ILIKE:
3142  appendStringInfoString(str, " ILIKE ");
3144  break;
3145  case AEXPR_SIMILAR:
3146  appendStringInfoString(str, " SIMILAR ");
3148  break;
3149  case AEXPR_BETWEEN:
3150  appendStringInfoString(str, " BETWEEN ");
3152  break;
3153  case AEXPR_NOT_BETWEEN:
3154  appendStringInfoString(str, " NOT_BETWEEN ");
3156  break;
3157  case AEXPR_BETWEEN_SYM:
3158  appendStringInfoString(str, " BETWEEN_SYM ");
3160  break;
3161  case AEXPR_NOT_BETWEEN_SYM:
3162  appendStringInfoString(str, " NOT_BETWEEN_SYM ");
3164  break;
3165  case AEXPR_PAREN:
3166  appendStringInfoString(str, " PAREN");
3167  break;
3168  default:
3169  appendStringInfoString(str, " ??");
3170  break;
3171  }
3172 
3173  WRITE_NODE_FIELD(lexpr);
3174  WRITE_NODE_FIELD(rexpr);
3175  WRITE_LOCATION_FIELD(location);
3176 }
A_Expr_Kind kind
Definition: parsenodes.h:274
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
void appendStringInfoChar(StringInfo str, char ch)
Definition: stringinfo.c:169
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
const char * name
Definition: encode.c:521
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAgg ( StringInfo  str,
const Agg node 
)
static

Definition at line 754 of file outfuncs.c.

References _outPlanInfo(), appendStringInfo(), appendStringInfoString(), Agg::grpColIdx, Agg::grpOperators, i, Agg::numCols, WRITE_BITMAPSET_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LONG_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

755 {
756  int i;
757 
758  WRITE_NODE_TYPE("AGG");
759 
760  _outPlanInfo(str, (const Plan *) node);
761 
762  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
763  WRITE_ENUM_FIELD(aggsplit, AggSplit);
764  WRITE_INT_FIELD(numCols);
765 
766  appendStringInfoString(str, " :grpColIdx");
767  for (i = 0; i < node->numCols; i++)
768  appendStringInfo(str, " %d", node->grpColIdx[i]);
769 
770  appendStringInfoString(str, " :grpOperators");
771  for (i = 0; i < node->numCols; i++)
772  appendStringInfo(str, " %u", node->grpOperators[i]);
773 
774  WRITE_LONG_FIELD(numGroups);
775  WRITE_BITMAPSET_FIELD(aggParams);
776  WRITE_NODE_FIELD(groupingSets);
777  WRITE_NODE_FIELD(chain);
778 }
int numCols
Definition: plannodes.h:785
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
AttrNumber * grpColIdx
Definition: plannodes.h:786
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_LONG_FIELD(fldname)
Definition: outfuncs.c:60
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AggSplit
Definition: nodes.h:757
AggStrategy
Definition: nodes.h:735
Oid * grpOperators
Definition: plannodes.h:787
int i
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAggPath ( StringInfo  str,
const AggPath node 
)
static

Definition at line 1945 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_ENUM_FIELD, WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1946 {
1947  WRITE_NODE_TYPE("AGGPATH");
1948 
1949  _outPathInfo(str, (const Path *) node);
1950 
1952  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
1953  WRITE_ENUM_FIELD(aggsplit, AggSplit);
1954  WRITE_FLOAT_FIELD(numGroups, "%.0f");
1955  WRITE_NODE_FIELD(groupClause);
1956  WRITE_NODE_FIELD(qual);
1957 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AggSplit
Definition: nodes.h:757
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
AggStrategy
Definition: nodes.h:735
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAggref ( StringInfo  str,
const Aggref node 
)
static

Definition at line 1100 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

1101 {
1102  WRITE_NODE_TYPE("AGGREF");
1103 
1104  WRITE_OID_FIELD(aggfnoid);
1105  WRITE_OID_FIELD(aggtype);
1106  WRITE_OID_FIELD(aggcollid);
1107  WRITE_OID_FIELD(inputcollid);
1108  WRITE_OID_FIELD(aggtranstype);
1109  WRITE_NODE_FIELD(aggargtypes);
1110  WRITE_NODE_FIELD(aggdirectargs);
1112  WRITE_NODE_FIELD(aggorder);
1113  WRITE_NODE_FIELD(aggdistinct);
1114  WRITE_NODE_FIELD(aggfilter);
1115  WRITE_BOOL_FIELD(aggstar);
1116  WRITE_BOOL_FIELD(aggvariadic);
1117  WRITE_CHAR_FIELD(aggkind);
1118  WRITE_UINT_FIELD(agglevelsup);
1119  WRITE_ENUM_FIELD(aggsplit, AggSplit);
1120  WRITE_LOCATION_FIELD(location);
1121 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_CHAR_FIELD(fldname)
Definition: outfuncs.c:64
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AggSplit
Definition: nodes.h:757
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAlias ( StringInfo  str,
const Alias node 
)
static

Definition at line 991 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

992 {
993  WRITE_NODE_TYPE("ALIAS");
994 
995  WRITE_STRING_FIELD(aliasname);
996  WRITE_NODE_FIELD(colnames);
997 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAlternativeSubPlan ( StringInfo  str,
const AlternativeSubPlan node 
)
static

Definition at line 1316 of file outfuncs.c.

References WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1317 {
1318  WRITE_NODE_TYPE("ALTERNATIVESUBPLAN");
1319 
1320  WRITE_NODE_FIELD(subplans);
1321 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAppend ( StringInfo  str,
const Append node 
)
static

Definition at line 371 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

372 {
373  WRITE_NODE_TYPE("APPEND");
374 
375  _outPlanInfo(str, (const Plan *) node);
376 
377  WRITE_NODE_FIELD(partitioned_rels);
378  WRITE_NODE_FIELD(appendplans);
379 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAppendPath ( StringInfo  str,
const AppendPath node 
)
static

Definition at line 1823 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1824 {
1825  WRITE_NODE_TYPE("APPENDPATH");
1826 
1827  _outPathInfo(str, (const Path *) node);
1828 
1829  WRITE_NODE_FIELD(partitioned_rels);
1830  WRITE_NODE_FIELD(subpaths);
1831 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAppendRelInfo ( StringInfo  str,
const AppendRelInfo node 
)
static

Definition at line 2473 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

2474 {
2475  WRITE_NODE_TYPE("APPENDRELINFO");
2476 
2477  WRITE_UINT_FIELD(parent_relid);
2478  WRITE_UINT_FIELD(child_relid);
2479  WRITE_OID_FIELD(parent_reltype);
2480  WRITE_OID_FIELD(child_reltype);
2481  WRITE_NODE_FIELD(translated_vars);
2482  WRITE_OID_FIELD(parent_reloid);
2483 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outArrayCoerceExpr ( StringInfo  str,
const ArrayCoerceExpr node 
)
static

Definition at line 1372 of file outfuncs.c.

References arg, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1373 {
1374  WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
1375 
1377  WRITE_OID_FIELD(elemfuncid);
1378  WRITE_OID_FIELD(resulttype);
1379  WRITE_INT_FIELD(resulttypmod);
1380  WRITE_OID_FIELD(resultcollid);
1381  WRITE_BOOL_FIELD(isExplicit);
1382  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
1383  WRITE_LOCATION_FIELD(location);
1384 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
CoercionForm
Definition: primnodes.h:436
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outArrayExpr ( StringInfo  str,
const ArrayExpr node 
)
static

Definition at line 1441 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1442 {
1443  WRITE_NODE_TYPE("ARRAY");
1444 
1445  WRITE_OID_FIELD(array_typeid);
1446  WRITE_OID_FIELD(array_collid);
1447  WRITE_OID_FIELD(element_typeid);
1448  WRITE_NODE_FIELD(elements);
1449  WRITE_BOOL_FIELD(multidims);
1450  WRITE_LOCATION_FIELD(location);
1451 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outArrayRef ( StringInfo  str,
const ArrayRef node 
)
static

Definition at line 1153 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1154 {
1155  WRITE_NODE_TYPE("ARRAYREF");
1156 
1157  WRITE_OID_FIELD(refarraytype);
1158  WRITE_OID_FIELD(refelemtype);
1159  WRITE_INT_FIELD(reftypmod);
1160  WRITE_OID_FIELD(refcollid);
1161  WRITE_NODE_FIELD(refupperindexpr);
1162  WRITE_NODE_FIELD(reflowerindexpr);
1163  WRITE_NODE_FIELD(refexpr);
1164  WRITE_NODE_FIELD(refassgnexpr);
1165 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapAnd ( StringInfo  str,
const BitmapAnd node 
)
static

Definition at line 436 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

437 {
438  WRITE_NODE_TYPE("BITMAPAND");
439 
440  _outPlanInfo(str, (const Plan *) node);
441 
442  WRITE_NODE_FIELD(bitmapplans);
443 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapAndPath ( StringInfo  str,
const BitmapAndPath node 
)
static

Definition at line 1756 of file outfuncs.c.

References _outPathInfo(), WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1757 {
1758  WRITE_NODE_TYPE("BITMAPANDPATH");
1759 
1760  _outPathInfo(str, (const Path *) node);
1761 
1762  WRITE_NODE_FIELD(bitmapquals);
1763  WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
1764 }
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapHeapPath ( StringInfo  str,
const BitmapHeapPath node 
)
static

Definition at line 1746 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1747 {
1748  WRITE_NODE_TYPE("BITMAPHEAPPATH");
1749 
1750  _outPathInfo(str, (const Path *) node);
1751 
1752  WRITE_NODE_FIELD(bitmapqual);
1753 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapHeapScan ( StringInfo  str,
const BitmapHeapScan node 
)
static

Definition at line 567 of file outfuncs.c.

References _outScanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

568 {
569  WRITE_NODE_TYPE("BITMAPHEAPSCAN");
570 
571  _outScanInfo(str, (const Scan *) node);
572 
573  WRITE_NODE_FIELD(bitmapqualorig);
574 }
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapIndexScan ( StringInfo  str,
const BitmapIndexScan node 
)
static

Definition at line 554 of file outfuncs.c.

References _outScanInfo(), WRITE_BOOL_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

555 {
556  WRITE_NODE_TYPE("BITMAPINDEXSCAN");
557 
558  _outScanInfo(str, (const Scan *) node);
559 
560  WRITE_OID_FIELD(indexid);
561  WRITE_BOOL_FIELD(isshared);
562  WRITE_NODE_FIELD(indexqual);
563  WRITE_NODE_FIELD(indexqualorig);
564 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapOr ( StringInfo  str,
const BitmapOr node 
)
static

Definition at line 446 of file outfuncs.c.

References _outPlanInfo(), WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

447 {
448  WRITE_NODE_TYPE("BITMAPOR");
449 
450  _outPlanInfo(str, (const Plan *) node);
451 
452  WRITE_BOOL_FIELD(isshared);
453  WRITE_NODE_FIELD(bitmapplans);
454 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapOrPath ( StringInfo  str,
const BitmapOrPath node 
)
static

Definition at line 1767 of file outfuncs.c.

References _outPathInfo(), WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1768 {
1769  WRITE_NODE_TYPE("BITMAPORPATH");
1770 
1771  _outPathInfo(str, (const Path *) node);
1772 
1773  WRITE_NODE_FIELD(bitmapquals);
1774  WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
1775 }
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBooleanTest ( StringInfo  str,
const BooleanTest node 
)
static

Definition at line 1541 of file outfuncs.c.

References arg, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1542 {
1543  WRITE_NODE_TYPE("BOOLEANTEST");
1544 
1546  WRITE_ENUM_FIELD(booltesttype, BoolTestType);
1547  WRITE_LOCATION_FIELD(location);
1548 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
BoolTestType
Definition: primnodes.h:1195
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBoolExpr ( StringInfo  str,
const BoolExpr node 
)
static

Definition at line 1253 of file outfuncs.c.

References AND_EXPR, appendStringInfoString(), generate_unaccent_rules::args, BoolExpr::boolop, NOT_EXPR, NULL, OR_EXPR, outToken(), WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1254 {
1255  char *opstr = NULL;
1256 
1257  WRITE_NODE_TYPE("BOOLEXPR");
1258 
1259  /* do-it-yourself enum representation */
1260  switch (node->boolop)
1261  {
1262  case AND_EXPR:
1263  opstr = "and";
1264  break;
1265  case OR_EXPR:
1266  opstr = "or";
1267  break;
1268  case NOT_EXPR:
1269  opstr = "not";
1270  break;
1271  }
1272  appendStringInfoString(str, " :boolop ");
1273  outToken(str, opstr);
1274 
1276  WRITE_LOCATION_FIELD(location);
1277 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void outToken(StringInfo str, const char *s)
Definition: outfuncs.c:112
BoolExprType boolop
Definition: primnodes.h:562
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define NULL
Definition: c.h:229
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCaseExpr ( StringInfo  str,
const CaseExpr node 
)
static

Definition at line 1408 of file outfuncs.c.

References arg, generate_unaccent_rules::args, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1409 {
1410  WRITE_NODE_TYPE("CASE");
1411 
1412  WRITE_OID_FIELD(casetype);
1413  WRITE_OID_FIELD(casecollid);
1416  WRITE_NODE_FIELD(defresult);
1417  WRITE_LOCATION_FIELD(location);
1418 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCaseTestExpr ( StringInfo  str,
const CaseTestExpr node 
)
static

Definition at line 1431 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1432 {
1433  WRITE_NODE_TYPE("CASETESTEXPR");
1434 
1435  WRITE_OID_FIELD(typeId);
1436  WRITE_INT_FIELD(typeMod);
1437  WRITE_OID_FIELD(collation);
1438 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCaseWhen ( StringInfo  str,
const CaseWhen node 
)
static

Definition at line 1421 of file outfuncs.c.

References result, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1422 {
1423  WRITE_NODE_TYPE("WHEN");
1424 
1425  WRITE_NODE_FIELD(expr);
1427  WRITE_LOCATION_FIELD(location);
1428 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
return result
Definition: formatting.c:1633
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCoalesceExpr ( StringInfo  str,
const CoalesceExpr node 
)
static

Definition at line 1479 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1480 {
1481  WRITE_NODE_TYPE("COALESCE");
1482 
1483  WRITE_OID_FIELD(coalescetype);
1484  WRITE_OID_FIELD(coalescecollid);
1486  WRITE_LOCATION_FIELD(location);
1487 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCoerceToDomain ( StringInfo  str,
const CoerceToDomain node 
)
static

Definition at line 1551 of file outfuncs.c.

References arg, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1552 {
1553  WRITE_NODE_TYPE("COERCETODOMAIN");
1554 
1556  WRITE_OID_FIELD(resulttype);
1557  WRITE_INT_FIELD(resulttypmod);
1558  WRITE_OID_FIELD(resultcollid);
1559  WRITE_ENUM_FIELD(coercionformat, CoercionForm);
1560  WRITE_LOCATION_FIELD(location);
1561 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
CoercionForm
Definition: primnodes.h:436
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCoerceToDomainValue ( StringInfo  str,
const CoerceToDomainValue node 
)
static

Definition at line 1564 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1565 {
1566  WRITE_NODE_TYPE("COERCETODOMAINVALUE");
1567 
1568  WRITE_OID_FIELD(typeId);
1569  WRITE_INT_FIELD(typeMod);
1570  WRITE_OID_FIELD(collation);
1571  WRITE_LOCATION_FIELD(location);
1572 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCoerceViaIO ( StringInfo  str,
const CoerceViaIO node 
)
static

Definition at line 1360 of file outfuncs.c.

References arg, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1361 {
1362  WRITE_NODE_TYPE("COERCEVIAIO");
1363 
1365  WRITE_OID_FIELD(resulttype);
1366  WRITE_OID_FIELD(resultcollid);
1367  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
1368  WRITE_LOCATION_FIELD(location);
1369 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
CoercionForm
Definition: primnodes.h:436
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCollateClause ( StringInfo  str,
const CollateClause node 
)
static

Definition at line 2808 of file outfuncs.c.

References arg, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2809 {
2810  WRITE_NODE_TYPE("COLLATECLAUSE");
2811 
2813  WRITE_NODE_FIELD(collname);
2814  WRITE_LOCATION_FIELD(location);
2815 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCollateExpr ( StringInfo  str,
const CollateExpr node 
)
static

Definition at line 1398 of file outfuncs.c.

References arg, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1399 {
1400  WRITE_NODE_TYPE("COLLATE");
1401 
1403  WRITE_OID_FIELD(collOid);
1404  WRITE_LOCATION_FIELD(location);
1405 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outColumnDef ( StringInfo  str,
const ColumnDef node 
)
static

Definition at line 2760 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_STRING_FIELD.

Referenced by outNode().

2761 {
2762  WRITE_NODE_TYPE("COLUMNDEF");
2763 
2764  WRITE_STRING_FIELD(colname);
2765  WRITE_NODE_FIELD(typeName);
2766  WRITE_INT_FIELD(inhcount);
2767  WRITE_BOOL_FIELD(is_local);
2768  WRITE_BOOL_FIELD(is_not_null);
2769  WRITE_BOOL_FIELD(is_from_type);
2770  WRITE_BOOL_FIELD(is_from_parent);
2771  WRITE_CHAR_FIELD(storage);
2772  WRITE_NODE_FIELD(raw_default);
2773  WRITE_NODE_FIELD(cooked_default);
2774  WRITE_CHAR_FIELD(identity);
2775  WRITE_NODE_FIELD(collClause);
2776  WRITE_OID_FIELD(collOid);
2777  WRITE_NODE_FIELD(constraints);
2778  WRITE_NODE_FIELD(fdwoptions);
2779  WRITE_LOCATION_FIELD(location);
2780 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_CHAR_FIELD(fldname)
Definition: outfuncs.c:64
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outColumnRef ( StringInfo  str,
const ColumnRef node 
)
static

Definition at line 3220 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3221 {
3222  WRITE_NODE_TYPE("COLUMNREF");
3223 
3224  WRITE_NODE_FIELD(fields);
3225  WRITE_LOCATION_FIELD(location);
3226 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCommonTableExpr ( StringInfo  str,
const CommonTableExpr node 
)
static

Definition at line 2971 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2972 {
2973  WRITE_NODE_TYPE("COMMONTABLEEXPR");
2974 
2975  WRITE_STRING_FIELD(ctename);
2976  WRITE_NODE_FIELD(aliascolnames);
2977  WRITE_NODE_FIELD(ctequery);
2978  WRITE_LOCATION_FIELD(location);
2979  WRITE_BOOL_FIELD(cterecursive);
2980  WRITE_INT_FIELD(cterefcount);
2981  WRITE_NODE_FIELD(ctecolnames);
2982  WRITE_NODE_FIELD(ctecoltypes);
2983  WRITE_NODE_FIELD(ctecoltypmods);
2984  WRITE_NODE_FIELD(ctecolcollations);
2985 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outConst ( StringInfo  str,
const Const node 
)
static

Definition at line 1067 of file outfuncs.c.

References appendStringInfoString(), Const::constbyval, Const::constisnull, Const::constlen, Const::constvalue, outDatum(), WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1068 {
1069  WRITE_NODE_TYPE("CONST");
1070 
1071  WRITE_OID_FIELD(consttype);
1072  WRITE_INT_FIELD(consttypmod);
1073  WRITE_OID_FIELD(constcollid);
1074  WRITE_INT_FIELD(constlen);
1075  WRITE_BOOL_FIELD(constbyval);
1076  WRITE_BOOL_FIELD(constisnull);
1077  WRITE_LOCATION_FIELD(location);
1078 
1079  appendStringInfoString(str, " :constvalue ");
1080  if (node->constisnull)
1081  appendStringInfoString(str, "<>");
1082  else
1083  outDatum(str, node->constvalue, node->constlen, node->constbyval);
1084 }
Datum constvalue
Definition: primnodes.h:196
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
bool constbyval
Definition: primnodes.h:199
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void outDatum(StringInfo str, Datum value, int typlen, bool typbyval)
Definition: outfuncs.c:203
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
int constlen
Definition: primnodes.h:195
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
bool constisnull
Definition: primnodes.h:197
static void _outConstraint ( StringInfo  str,
const Constraint node 
)
static

Definition at line 3393 of file outfuncs.c.

References appendStringInfo(), appendStringInfoString(), CONSTR_ATTR_DEFERRABLE, CONSTR_ATTR_DEFERRED, CONSTR_ATTR_IMMEDIATE, CONSTR_ATTR_NOT_DEFERRABLE, CONSTR_CHECK, CONSTR_DEFAULT, CONSTR_EXCLUSION, CONSTR_FOREIGN, CONSTR_IDENTITY, CONSTR_NOTNULL, CONSTR_NULL, CONSTR_PRIMARY, CONSTR_UNIQUE, Constraint::contype, WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_STRING_FIELD.

Referenced by outNode().

3394 {
3395  WRITE_NODE_TYPE("CONSTRAINT");
3396 
3397  WRITE_STRING_FIELD(conname);
3398  WRITE_BOOL_FIELD(deferrable);
3399  WRITE_BOOL_FIELD(initdeferred);
3400  WRITE_LOCATION_FIELD(location);
3401 
3402  appendStringInfoString(str, " :contype ");
3403  switch (node->contype)
3404  {
3405  case CONSTR_NULL:
3406  appendStringInfoString(str, "NULL");
3407  break;
3408 
3409  case CONSTR_NOTNULL:
3410  appendStringInfoString(str, "NOT_NULL");
3411  break;
3412 
3413  case CONSTR_DEFAULT:
3414  appendStringInfoString(str, "DEFAULT");
3415  WRITE_NODE_FIELD(raw_expr);
3416  WRITE_STRING_FIELD(cooked_expr);
3417  break;
3418 
3419  case CONSTR_IDENTITY:
3420  appendStringInfoString(str, "IDENTITY");
3421  WRITE_NODE_FIELD(raw_expr);
3422  WRITE_STRING_FIELD(cooked_expr);
3423  WRITE_CHAR_FIELD(generated_when);
3424  break;
3425 
3426  case CONSTR_CHECK:
3427  appendStringInfoString(str, "CHECK");
3428  WRITE_BOOL_FIELD(is_no_inherit);
3429  WRITE_NODE_FIELD(raw_expr);
3430  WRITE_STRING_FIELD(cooked_expr);
3431  break;
3432 
3433  case CONSTR_PRIMARY:
3434  appendStringInfoString(str, "PRIMARY_KEY");
3435  WRITE_NODE_FIELD(keys);
3437  WRITE_STRING_FIELD(indexname);
3438  WRITE_STRING_FIELD(indexspace);
3439  /* access_method and where_clause not currently used */
3440  break;
3441 
3442  case CONSTR_UNIQUE:
3443  appendStringInfoString(str, "UNIQUE");
3444  WRITE_NODE_FIELD(keys);
3446  WRITE_STRING_FIELD(indexname);
3447  WRITE_STRING_FIELD(indexspace);
3448  /* access_method and where_clause not currently used */
3449  break;
3450 
3451  case CONSTR_EXCLUSION:
3452  appendStringInfoString(str, "EXCLUSION");
3453  WRITE_NODE_FIELD(exclusions);
3455  WRITE_STRING_FIELD(indexname);
3456  WRITE_STRING_FIELD(indexspace);
3457  WRITE_STRING_FIELD(access_method);
3458  WRITE_NODE_FIELD(where_clause);
3459  break;
3460 
3461  case CONSTR_FOREIGN:
3462  appendStringInfoString(str, "FOREIGN_KEY");
3463  WRITE_NODE_FIELD(pktable);
3464  WRITE_NODE_FIELD(fk_attrs);
3465  WRITE_NODE_FIELD(pk_attrs);
3466  WRITE_CHAR_FIELD(fk_matchtype);
3467  WRITE_CHAR_FIELD(fk_upd_action);
3468  WRITE_CHAR_FIELD(fk_del_action);
3469  WRITE_NODE_FIELD(old_conpfeqop);
3470  WRITE_OID_FIELD(old_pktable_oid);
3471  WRITE_BOOL_FIELD(skip_validation);
3472  WRITE_BOOL_FIELD(initially_valid);
3473  break;
3474 
3476  appendStringInfoString(str, "ATTR_DEFERRABLE");
3477  break;
3478 
3480  appendStringInfoString(str, "ATTR_NOT_DEFERRABLE");
3481  break;
3482 
3483  case CONSTR_ATTR_DEFERRED:
3484  appendStringInfoString(str, "ATTR_DEFERRED");
3485  break;
3486 
3487  case CONSTR_ATTR_IMMEDIATE:
3488  appendStringInfoString(str, "ATTR_IMMEDIATE");
3489  break;
3490 
3491  default:
3492  appendStringInfo(str, "<unrecognized_constraint %d>",
3493  (int) node->contype);
3494  break;
3495  }
3496 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_CHAR_FIELD(fldname)
Definition: outfuncs.c:64
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
ConstrType contype
Definition: parsenodes.h:2065
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outConvertRowtypeExpr ( StringInfo  str,
const ConvertRowtypeExpr node 
)
static

Definition at line 1387 of file outfuncs.c.

References arg, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1388 {
1389  WRITE_NODE_TYPE("CONVERTROWTYPEEXPR");
1390 
1392  WRITE_OID_FIELD(resulttype);
1393  WRITE_ENUM_FIELD(convertformat, CoercionForm);
1394  WRITE_LOCATION_FIELD(location);
1395 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
CoercionForm
Definition: primnodes.h:436
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCreateForeignTableStmt ( StringInfo  str,
const CreateForeignTableStmt node 
)
static

Definition at line 2585 of file outfuncs.c.

References _outCreateStmtInfo(), WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2586 {
2587  WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
2588 
2589  _outCreateStmtInfo(str, (const CreateStmt *) node);
2590 
2591  WRITE_STRING_FIELD(servername);
2593 }
static void _outCreateStmtInfo(StringInfo str, const CreateStmt *node)
Definition: outfuncs.c:2561
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCreateStatsStmt ( StringInfo  str,
const CreateStatsStmt node 
)
static

Definition at line 2635 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2636 {
2637  WRITE_NODE_TYPE("CREATESTATSSTMT");
2638 
2639  WRITE_NODE_FIELD(defnames);
2640  WRITE_NODE_FIELD(stat_types);
2641  WRITE_NODE_FIELD(exprs);
2642  WRITE_NODE_FIELD(relations);
2643  WRITE_BOOL_FIELD(if_not_exists);
2644 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCreateStmt ( StringInfo  str,
const CreateStmt node 
)
static

Definition at line 2577 of file outfuncs.c.

References _outCreateStmtInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

2578 {
2579  WRITE_NODE_TYPE("CREATESTMT");
2580 
2581  _outCreateStmtInfo(str, (const CreateStmt *) node);
2582 }
static void _outCreateStmtInfo(StringInfo str, const CreateStmt *node)
Definition: outfuncs.c:2561
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCreateStmtInfo ( StringInfo  str,
const CreateStmt node 
)
static

Definition at line 2561 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_NODE_FIELD, and WRITE_STRING_FIELD.

Referenced by _outCreateForeignTableStmt(), and _outCreateStmt().

2562 {
2563  WRITE_NODE_FIELD(relation);
2564  WRITE_NODE_FIELD(tableElts);
2565  WRITE_NODE_FIELD(inhRelations);
2566  WRITE_NODE_FIELD(partspec);
2567  WRITE_NODE_FIELD(partbound);
2568  WRITE_NODE_FIELD(ofTypename);
2569  WRITE_NODE_FIELD(constraints);
2571  WRITE_ENUM_FIELD(oncommit, OnCommitAction);
2572  WRITE_STRING_FIELD(tablespacename);
2573  WRITE_BOOL_FIELD(if_not_exists);
2574 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
OnCommitAction
Definition: primnodes.h:47
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCteScan ( StringInfo  str,
const CteScan node 
)
static

Definition at line 628 of file outfuncs.c.

References _outScanInfo(), WRITE_INT_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

629 {
630  WRITE_NODE_TYPE("CTESCAN");
631 
632  _outScanInfo(str, (const Scan *) node);
633 
634  WRITE_INT_FIELD(ctePlanId);
635  WRITE_INT_FIELD(cteParam);
636 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCurrentOfExpr ( StringInfo  str,
const CurrentOfExpr node 
)
static

Definition at line 1586 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, WRITE_STRING_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

1587 {
1588  WRITE_NODE_TYPE("CURRENTOFEXPR");
1589 
1590  WRITE_UINT_FIELD(cvarno);
1591  WRITE_STRING_FIELD(cursor_name);
1592  WRITE_INT_FIELD(cursor_param);
1593 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
static void _outCustomPath ( StringInfo  str,
const CustomPath node 
)
static

Definition at line 1809 of file outfuncs.c.

References _outPathInfo(), appendStringInfoString(), CustomPathMethods::CustomName, CustomPath::methods, outToken(), WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

1810 {
1811  WRITE_NODE_TYPE("CUSTOMPATH");
1812 
1813  _outPathInfo(str, (const Path *) node);
1814 
1815  WRITE_UINT_FIELD(flags);
1816  WRITE_NODE_FIELD(custom_paths);
1817  WRITE_NODE_FIELD(custom_private);
1818  appendStringInfoString(str, " :methods ");
1819  outToken(str, node->methods->CustomName);
1820 }
void outToken(StringInfo str, const char *s)
Definition: outfuncs.c:112
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
const struct CustomPathMethods * methods
Definition: relation.h:1163
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
const char * CustomName
Definition: extensible.h:90
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCustomScan ( StringInfo  str,
const CustomScan node 
)
static

Definition at line 676 of file outfuncs.c.

References _outScanInfo(), appendStringInfoString(), CustomScanMethods::CustomName, CustomScan::methods, outToken(), WRITE_BITMAPSET_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

677 {
678  WRITE_NODE_TYPE("CUSTOMSCAN");
679 
680  _outScanInfo(str, (const Scan *) node);
681 
682  WRITE_UINT_FIELD(flags);
683  WRITE_NODE_FIELD(custom_plans);
684  WRITE_NODE_FIELD(custom_exprs);
685  WRITE_NODE_FIELD(custom_private);
686  WRITE_NODE_FIELD(custom_scan_tlist);
687  WRITE_BITMAPSET_FIELD(custom_relids);
688  /* CustomName is a key to lookup CustomScanMethods */
689  appendStringInfoString(str, " :methods ");
690  outToken(str, node->methods->CustomName);
691 }
void outToken(StringInfo str, const char *s)
Definition: outfuncs.c:112
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
const struct CustomScanMethods * methods
Definition: plannodes.h:633
const char * CustomName
Definition: extensible.h:107
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outDeclareCursorStmt ( StringInfo  str,
const DeclareCursorStmt node 
)
static

Definition at line 2656 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2657 {
2658  WRITE_NODE_TYPE("DECLARECURSOR");
2659 
2660  WRITE_STRING_FIELD(portalname);
2662  WRITE_NODE_FIELD(query);
2663 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outDefElem ( StringInfo  str,
const DefElem node 
)
static

Definition at line 2708 of file outfuncs.c.

References arg, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2709 {
2710  WRITE_NODE_TYPE("DEFELEM");
2711 
2712  WRITE_STRING_FIELD(defnamespace);
2713  WRITE_STRING_FIELD(defname);
2715  WRITE_ENUM_FIELD(defaction, DefElemAction);
2716  WRITE_LOCATION_FIELD(location);
2717 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
DefElemAction
Definition: parsenodes.h:707
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outDistinctExpr ( StringInfo  str,
const DistinctExpr node 
)
static

Definition at line 1210 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1211 {
1212  WRITE_NODE_TYPE("DISTINCTEXPR");
1213 
1214  WRITE_OID_FIELD(opno);
1215  WRITE_OID_FIELD(opfuncid);
1216  WRITE_OID_FIELD(opresulttype);
1217  WRITE_BOOL_FIELD(opretset);
1218  WRITE_OID_FIELD(opcollid);
1219  WRITE_OID_FIELD(inputcollid);
1221  WRITE_LOCATION_FIELD(location);
1222 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outEquivalenceClass ( StringInfo  str,
const EquivalenceClass node 
)
static

Definition at line 2332 of file outfuncs.c.

References EquivalenceClass::ec_merged, WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

2333 {
2334  /*
2335  * To simplify reading, we just chase up to the topmost merged EC and
2336  * print that, without bothering to show the merge-ees separately.
2337  */
2338  while (node->ec_merged)
2339  node = node->ec_merged;
2340 
2341  WRITE_NODE_TYPE("EQUIVALENCECLASS");
2342 
2343  WRITE_NODE_FIELD(ec_opfamilies);
2344  WRITE_OID_FIELD(ec_collation);
2345  WRITE_NODE_FIELD(ec_members);
2346  WRITE_NODE_FIELD(ec_sources);
2347  WRITE_NODE_FIELD(ec_derives);
2348  WRITE_BITMAPSET_FIELD(ec_relids);
2349  WRITE_BOOL_FIELD(ec_has_const);
2350  WRITE_BOOL_FIELD(ec_has_volatile);
2351  WRITE_BOOL_FIELD(ec_below_outer_join);
2352  WRITE_BOOL_FIELD(ec_broken);
2353  WRITE_UINT_FIELD(ec_sortref);
2354  WRITE_UINT_FIELD(ec_min_security);
2355  WRITE_UINT_FIELD(ec_max_security);
2356 }
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
struct EquivalenceClass * ec_merged
Definition: relation.h:786
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outEquivalenceMember ( StringInfo  str,
const EquivalenceMember node 
)
static

Definition at line 2359 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

2360 {
2361  WRITE_NODE_TYPE("EQUIVALENCEMEMBER");
2362 
2363  WRITE_NODE_FIELD(em_expr);
2364  WRITE_BITMAPSET_FIELD(em_relids);
2365  WRITE_BITMAPSET_FIELD(em_nullable_relids);
2366  WRITE_BOOL_FIELD(em_is_const);
2367  WRITE_BOOL_FIELD(em_is_child);
2368  WRITE_OID_FIELD(em_datatype);
2369 }
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outExtensibleNode ( StringInfo  str,
const ExtensibleNode node 
)
static

Definition at line 2537 of file outfuncs.c.

References ExtensibleNode::extnodename, GetExtensibleNodeMethods(), ExtensibleNodeMethods::nodeOut, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2538 {
2539  const ExtensibleNodeMethods *methods;
2540 
2541  methods = GetExtensibleNodeMethods(node->extnodename, false);
2542 
2543  WRITE_NODE_TYPE("EXTENSIBLENODE");
2544 
2545  WRITE_STRING_FIELD(extnodename);
2546 
2547  /* serialize the private fields */
2548  methods->nodeOut(str, node);
2549 }
void(* nodeOut)(struct StringInfoData *str, const struct ExtensibleNode *node)
Definition: extensible.h:68
const char * extnodename
Definition: extensible.h:35
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
Definition: extensible.c:125
static void _outFieldSelect ( StringInfo  str,
const FieldSelect node 
)
static

Definition at line 1324 of file outfuncs.c.

References arg, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1325 {
1326  WRITE_NODE_TYPE("FIELDSELECT");
1327 
1329  WRITE_INT_FIELD(fieldnum);
1330  WRITE_OID_FIELD(resulttype);
1331  WRITE_INT_FIELD(resulttypmod);
1332  WRITE_OID_FIELD(resultcollid);
1333 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFieldStore ( StringInfo  str,
const FieldStore node 
)
static

Definition at line 1336 of file outfuncs.c.

References arg, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1337 {
1338  WRITE_NODE_TYPE("FIELDSTORE");
1339 
1341  WRITE_NODE_FIELD(newvals);
1342  WRITE_NODE_FIELD(fieldnums);
1343  WRITE_OID_FIELD(resulttype);
1344 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outForeignKeyCacheInfo ( StringInfo  str,
const ForeignKeyCacheInfo node 
)
static

Definition at line 3499 of file outfuncs.c.

References appendStringInfo(), appendStringInfoString(), ForeignKeyCacheInfo::confkey, ForeignKeyCacheInfo::conkey, ForeignKeyCacheInfo::conpfeqop, i, ForeignKeyCacheInfo::nkeys, WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

3500 {
3501  int i;
3502 
3503  WRITE_NODE_TYPE("FOREIGNKEYCACHEINFO");
3504 
3505  WRITE_OID_FIELD(conrelid);
3506  WRITE_OID_FIELD(confrelid);
3507  WRITE_INT_FIELD(nkeys);
3508  appendStringInfoString(str, " :conkey");
3509  for (i = 0; i < node->nkeys; i++)
3510  appendStringInfo(str, " %d", node->conkey[i]);
3511  appendStringInfoString(str, " :confkey");
3512  for (i = 0; i < node->nkeys; i++)
3513  appendStringInfo(str, " %d", node->confkey[i]);
3514  appendStringInfoString(str, " :conpfeqop");
3515  for (i = 0; i < node->nkeys; i++)
3516  appendStringInfo(str, " %u", node->conpfeqop[i]);
3517 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: rel.h:243
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: rel.h:245
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AttrNumber confkey[INDEX_MAX_KEYS]
Definition: rel.h:244
int i
static void _outForeignKeyOptInfo ( StringInfo  str,
const ForeignKeyOptInfo node 
)
static

Definition at line 2289 of file outfuncs.c.

References appendStringInfo(), appendStringInfoString(), ForeignKeyOptInfo::confkey, ForeignKeyOptInfo::conkey, ForeignKeyOptInfo::conpfeqop, ForeignKeyOptInfo::eclass, i, list_length(), ForeignKeyOptInfo::nkeys, NULL, ForeignKeyOptInfo::rinfos, WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2290 {
2291  int i;
2292 
2293  WRITE_NODE_TYPE("FOREIGNKEYOPTINFO");
2294 
2295  WRITE_UINT_FIELD(con_relid);
2296  WRITE_UINT_FIELD(ref_relid);
2297  WRITE_INT_FIELD(nkeys);
2298  appendStringInfoString(str, " :conkey");
2299  for (i = 0; i < node->nkeys; i++)
2300  appendStringInfo(str, " %d", node->conkey[i]);
2301  appendStringInfoString(str, " :confkey");
2302  for (i = 0; i < node->nkeys; i++)
2303  appendStringInfo(str, " %d", node->confkey[i]);
2304  appendStringInfoString(str, " :conpfeqop");
2305  for (i = 0; i < node->nkeys; i++)
2306  appendStringInfo(str, " %u", node->conpfeqop[i]);
2307  WRITE_INT_FIELD(nmatched_ec);
2308  WRITE_INT_FIELD(nmatched_rcols);
2309  WRITE_INT_FIELD(nmatched_ri);
2310  /* for compactness, just print the number of matches per column: */
2311  appendStringInfoString(str, " :eclass");
2312  for (i = 0; i < node->nkeys; i++)
2313  appendStringInfo(str, " %d", (node->eclass[i] != NULL));
2314  appendStringInfoString(str, " :rinfos");
2315  for (i = 0; i < node->nkeys; i++)
2316  appendStringInfo(str, " %d", list_length(node->rinfos[i]));
2317 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: relation.h:699
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
struct EquivalenceClass * eclass[INDEX_MAX_KEYS]
Definition: relation.h:706
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: relation.h:697
#define NULL
Definition: c.h:229
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static int list_length(const List *l)
Definition: pg_list.h:89
int i
AttrNumber confkey[INDEX_MAX_KEYS]
Definition: relation.h:698
List * rinfos[INDEX_MAX_KEYS]
Definition: relation.h:708
static void _outForeignPath ( StringInfo  str,
const ForeignPath node 
)
static

Definition at line 1798 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1799 {
1800  WRITE_NODE_TYPE("FOREIGNPATH");
1801 
1802  _outPathInfo(str, (const Path *) node);
1803 
1804  WRITE_NODE_FIELD(fdw_outerpath);
1805  WRITE_NODE_FIELD(fdw_private);
1806 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outForeignScan ( StringInfo  str,
const ForeignScan node 
)
static

Definition at line 659 of file outfuncs.c.

References _outScanInfo(), WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

660 {
661  WRITE_NODE_TYPE("FOREIGNSCAN");
662 
663  _outScanInfo(str, (const Scan *) node);
664 
665  WRITE_ENUM_FIELD(operation, CmdType);
666  WRITE_OID_FIELD(fs_server);
667  WRITE_NODE_FIELD(fdw_exprs);
668  WRITE_NODE_FIELD(fdw_private);
669  WRITE_NODE_FIELD(fdw_scan_tlist);
670  WRITE_NODE_FIELD(fdw_recheck_quals);
671  WRITE_BITMAPSET_FIELD(fs_relids);
672  WRITE_BOOL_FIELD(fsSystemCol);
673 }
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
CmdType
Definition: nodes.h:649
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFromExpr ( StringInfo  str,
const FromExpr node 
)
static

Definition at line 1643 of file outfuncs.c.

References WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1644 {
1645  WRITE_NODE_TYPE("FROMEXPR");
1646 
1647  WRITE_NODE_FIELD(fromlist);
1648  WRITE_NODE_FIELD(quals);
1649 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFuncCall ( StringInfo  str,
const FuncCall node 
)
static

Definition at line 2691 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2692 {
2693  WRITE_NODE_TYPE("FUNCCALL");
2694 
2695  WRITE_NODE_FIELD(funcname);
2697  WRITE_NODE_FIELD(agg_order);
2698  WRITE_NODE_FIELD(agg_filter);
2699  WRITE_BOOL_FIELD(agg_within_group);
2700  WRITE_BOOL_FIELD(agg_star);
2701  WRITE_BOOL_FIELD(agg_distinct);
2702  WRITE_BOOL_FIELD(func_variadic);
2703  WRITE_NODE_FIELD(over);
2704  WRITE_LOCATION_FIELD(location);
2705 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFuncExpr ( StringInfo  str,
const FuncExpr node 
)
static

Definition at line 1168 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1169 {
1170  WRITE_NODE_TYPE("FUNCEXPR");
1171 
1172  WRITE_OID_FIELD(funcid);
1173  WRITE_OID_FIELD(funcresulttype);
1174  WRITE_BOOL_FIELD(funcretset);
1175  WRITE_BOOL_FIELD(funcvariadic);
1176  WRITE_ENUM_FIELD(funcformat, CoercionForm);
1177  WRITE_OID_FIELD(funccollid);
1178  WRITE_OID_FIELD(inputcollid);
1180  WRITE_LOCATION_FIELD(location);
1181 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
CoercionForm
Definition: primnodes.h:436
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFunctionScan ( StringInfo  str,
const FunctionScan node 
)
static

Definition at line 597 of file outfuncs.c.

References _outScanInfo(), functions, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

598 {
599  WRITE_NODE_TYPE("FUNCTIONSCAN");
600 
601  _outScanInfo(str, (const Scan *) node);
602 
604  WRITE_BOOL_FIELD(funcordinality);
605 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static const struct fns functions
Definition: regcomp.c:299
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGather ( StringInfo  str,
const Gather node 
)
static

Definition at line 457 of file outfuncs.c.

References _outPlanInfo(), WRITE_BOOL_FIELD, WRITE_INT_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

458 {
459  WRITE_NODE_TYPE("GATHER");
460 
461  _outPlanInfo(str, (const Plan *) node);
462 
463  WRITE_INT_FIELD(num_workers);
464  WRITE_BOOL_FIELD(single_copy);
465  WRITE_BOOL_FIELD(invisible);
466 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outGatherMerge ( StringInfo  str,
const GatherMerge node 
)
static

Definition at line 469 of file outfuncs.c.

References _outPlanInfo(), appendStringInfo(), appendStringInfoString(), booltostr, GatherMerge::collations, i, GatherMerge::nullsFirst, GatherMerge::numCols, GatherMerge::sortColIdx, GatherMerge::sortOperators, WRITE_INT_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

470 {
471  int i;
472 
473  WRITE_NODE_TYPE("GATHERMERGE");
474 
475  _outPlanInfo(str, (const Plan *) node);
476 
477  WRITE_INT_FIELD(num_workers);
478  WRITE_INT_FIELD(numCols);
479 
480  appendStringInfoString(str, " :sortColIdx");
481  for (i = 0; i < node->numCols; i++)
482  appendStringInfo(str, " %d", node->sortColIdx[i]);
483 
484  appendStringInfoString(str, " :sortOperators");
485  for (i = 0; i < node->numCols; i++)
486  appendStringInfo(str, " %u", node->sortOperators[i]);
487 
488  appendStringInfoString(str, " :collations");
489  for (i = 0; i < node->numCols; i++)
490  appendStringInfo(str, " %u", node->collations[i]);
491 
492  appendStringInfoString(str, " :nullsFirst");
493  for (i = 0; i < node->numCols; i++)
494  appendStringInfo(str, " %s", booltostr(node->nullsFirst[i]));
495 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
Oid * collations
Definition: plannodes.h:850
AttrNumber * sortColIdx
Definition: plannodes.h:848
#define booltostr(x)
Definition: outfuncs.c:101
bool * nullsFirst
Definition: plannodes.h:851
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
Oid * sortOperators
Definition: plannodes.h:849
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
int i
static void _outGatherMergePath ( StringInfo  str,
const GatherMergePath node 
)
static

Definition at line 2093 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2094 {
2095  WRITE_NODE_TYPE("GATHERMERGEPATH");
2096 
2097  _outPathInfo(str, (const Path *) node);
2098 
2100  WRITE_INT_FIELD(num_workers);
2101 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGatherPath ( StringInfo  str,
const GatherPath node 
)
static

Definition at line 1879 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1880 {
1881  WRITE_NODE_TYPE("GATHERPATH");
1882 
1883  _outPathInfo(str, (const Path *) node);
1884 
1886  WRITE_BOOL_FIELD(single_copy);
1887  WRITE_INT_FIELD(num_workers);
1888 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroup ( StringInfo  str,
const Group node 
)
static

Definition at line 816 of file outfuncs.c.

References _outPlanInfo(), appendStringInfo(), appendStringInfoString(), Group::grpColIdx, Group::grpOperators, i, Group::numCols, WRITE_INT_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

817 {
818  int i;
819 
820  WRITE_NODE_TYPE("GROUP");
821 
822  _outPlanInfo(str, (const Plan *) node);
823 
824  WRITE_INT_FIELD(numCols);
825 
826  appendStringInfoString(str, " :grpColIdx");
827  for (i = 0; i < node->numCols; i++)
828  appendStringInfo(str, " %d", node->grpColIdx[i]);
829 
830  appendStringInfoString(str, " :grpOperators");
831  for (i = 0; i < node->numCols; i++)
832  appendStringInfo(str, " %u", node->grpOperators[i]);
833 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
int numCols
Definition: plannodes.h:761
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
int i
AttrNumber * grpColIdx
Definition: plannodes.h:762
Oid * grpOperators
Definition: plannodes.h:763
static void _outGroupingFunc ( StringInfo  str,
const GroupingFunc node 
)
static

Definition at line 1124 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

1125 {
1126  WRITE_NODE_TYPE("GROUPINGFUNC");
1127 
1129  WRITE_NODE_FIELD(refs);
1130  WRITE_NODE_FIELD(cols);
1131  WRITE_UINT_FIELD(agglevelsup);
1132  WRITE_LOCATION_FIELD(location);
1133 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroupingSet ( StringInfo  str,
const GroupingSet node 
)
static

Definition at line 2924 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2925 {
2926  WRITE_NODE_TYPE("GROUPINGSET");
2927 
2929  WRITE_NODE_FIELD(content);
2930  WRITE_LOCATION_FIELD(location);
2931 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
GroupingSetKind
Definition: parsenodes.h:1233
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroupingSetData ( StringInfo  str,
const GroupingSetData node 
)
static

Definition at line 1973 of file outfuncs.c.

References WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1974 {
1975  WRITE_NODE_TYPE("GSDATA");
1976 
1977  WRITE_NODE_FIELD(set);
1978  WRITE_FLOAT_FIELD(numGroups, "%.0f");
1979 }
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroupingSetsPath ( StringInfo  str,
const GroupingSetsPath node 
)
static

Definition at line 1982 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_ENUM_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1983 {
1984  WRITE_NODE_TYPE("GROUPINGSETSPATH");
1985 
1986  _outPathInfo(str, (const Path *) node);
1987 
1989  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
1990  WRITE_NODE_FIELD(rollups);
1991  WRITE_NODE_FIELD(qual);
1992 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
AggStrategy
Definition: nodes.h:735
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroupPath ( StringInfo  str,
const GroupPath node 
)
static

Definition at line 1922 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1923 {
1924  WRITE_NODE_TYPE("GROUPPATH");
1925 
1926  _outPathInfo(str, (const Path *) node);
1927 
1929  WRITE_NODE_FIELD(groupClause);
1930  WRITE_NODE_FIELD(qual);
1931 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outHash ( StringInfo  str,
const Hash node 
)
static

Definition at line 892 of file outfuncs.c.

References _outPlanInfo(), WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

893 {
894  WRITE_NODE_TYPE("HASH");
895 
896  _outPlanInfo(str, (const Plan *) node);
897 
898  WRITE_OID_FIELD(skewTable);
899  WRITE_INT_FIELD(skewColumn);
900  WRITE_BOOL_FIELD(skewInherit);
901 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outHashJoin ( StringInfo  str,
const HashJoin node 
)
static

Definition at line 744 of file outfuncs.c.

References _outJoinPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

745 {
746  WRITE_NODE_TYPE("HASHJOIN");
747 
748  _outJoinPlanInfo(str, (const Join *) node);
749 
750  WRITE_NODE_FIELD(hashclauses);
751 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:305
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outHashPath ( StringInfo  str,
const HashPath node 
)
static

Definition at line 2126 of file outfuncs.c.

References _outJoinPathInfo(), WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2127 {
2128  WRITE_NODE_TYPE("HASHPATH");
2129 
2130  _outJoinPathInfo(str, (const JoinPath *) node);
2131 
2132  WRITE_NODE_FIELD(path_hashclauses);
2133  WRITE_INT_FIELD(num_batches);
2134 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1708
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outImportForeignSchemaStmt ( StringInfo  str,
const ImportForeignSchemaStmt node 
)
static

Definition at line 2596 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2597 {
2598  WRITE_NODE_TYPE("IMPORTFOREIGNSCHEMASTMT");
2599 
2600  WRITE_STRING_FIELD(server_name);
2601  WRITE_STRING_FIELD(remote_schema);
2602  WRITE_STRING_FIELD(local_schema);
2604  WRITE_NODE_FIELD(table_list);
2606 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
ImportForeignSchemaType
Definition: parsenodes.h:2271
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexElem ( StringInfo  str,
const IndexElem node 
)
static

Definition at line 2818 of file outfuncs.c.

References name, WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2819 {
2820  WRITE_NODE_TYPE("INDEXELEM");
2821 
2823  WRITE_NODE_FIELD(expr);
2824  WRITE_STRING_FIELD(indexcolname);
2825  WRITE_NODE_FIELD(collation);
2826  WRITE_NODE_FIELD(opclass);
2827  WRITE_ENUM_FIELD(ordering, SortByDir);
2828  WRITE_ENUM_FIELD(nulls_ordering, SortByNulls);
2829 }
SortByDir
Definition: parsenodes.h:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
SortByNulls
Definition: parsenodes.h:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
const char * name
Definition: encode.c:521
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexOnlyScan ( StringInfo  str,
const IndexOnlyScan node 
)
static

Definition at line 540 of file outfuncs.c.

References _outScanInfo(), WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

541 {
542  WRITE_NODE_TYPE("INDEXONLYSCAN");
543 
544  _outScanInfo(str, (const Scan *) node);
545 
546  WRITE_OID_FIELD(indexid);
547  WRITE_NODE_FIELD(indexqual);
548  WRITE_NODE_FIELD(indexorderby);
549  WRITE_NODE_FIELD(indextlist);
550  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
551 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
ScanDirection
Definition: sdir.h:22
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexOptInfo ( StringInfo  str,
const IndexOptInfo node 
)
static

Definition at line 2264 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

2265 {
2266  WRITE_NODE_TYPE("INDEXOPTINFO");
2267 
2268  /* NB: this isn't a complete set of fields */
2269  WRITE_OID_FIELD(indexoid);
2270  /* Do NOT print rel field, else infinite recursion */
2271  WRITE_UINT_FIELD(pages);
2272  WRITE_FLOAT_FIELD(tuples, "%.0f");
2273  WRITE_INT_FIELD(tree_height);
2274  WRITE_INT_FIELD(ncolumns);
2275  /* array fields aren't really worth the trouble to print */
2276  WRITE_OID_FIELD(relam);
2277  /* indexprs is redundant since we print indextlist */
2278  WRITE_NODE_FIELD(indpred);
2279  WRITE_NODE_FIELD(indextlist);
2280  WRITE_NODE_FIELD(indrestrictinfo);
2281  WRITE_BOOL_FIELD(predOK);
2282  WRITE_BOOL_FIELD(unique);
2283  WRITE_BOOL_FIELD(immediate);
2284  WRITE_BOOL_FIELD(hypothetical);
2285  /* we don't bother with fields copied from the index AM's API struct */
2286 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexPath ( StringInfo  str,
const IndexPath node 
)
static

Definition at line 1728 of file outfuncs.c.

References _outPathInfo(), WRITE_ENUM_FIELD, WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1729 {
1730  WRITE_NODE_TYPE("INDEXPATH");
1731 
1732  _outPathInfo(str, (const Path *) node);
1733 
1734  WRITE_NODE_FIELD(indexinfo);
1735  WRITE_NODE_FIELD(indexclauses);
1736  WRITE_NODE_FIELD(indexquals);
1737  WRITE_NODE_FIELD(indexqualcols);
1738  WRITE_NODE_FIELD(indexorderbys);
1739  WRITE_NODE_FIELD(indexorderbycols);
1740  WRITE_ENUM_FIELD(indexscandir, ScanDirection);
1741  WRITE_FLOAT_FIELD(indextotalcost, "%.2f");
1742  WRITE_FLOAT_FIELD(indexselectivity, "%.4f");
1743 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
ScanDirection
Definition: sdir.h:22
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexScan ( StringInfo  str,
const IndexScan node 
)
static

Definition at line 524 of file outfuncs.c.

References _outScanInfo(), WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

525 {
526  WRITE_NODE_TYPE("INDEXSCAN");
527 
528  _outScanInfo(str, (const Scan *) node);
529 
530  WRITE_OID_FIELD(indexid);
531  WRITE_NODE_FIELD(indexqual);
532  WRITE_NODE_FIELD(indexqualorig);
533  WRITE_NODE_FIELD(indexorderby);
534  WRITE_NODE_FIELD(indexorderbyorig);
535  WRITE_NODE_FIELD(indexorderbyops);
536  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
537 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
ScanDirection
Definition: sdir.h:22
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexStmt ( StringInfo  str,
const IndexStmt node 
)
static

Definition at line 2609 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_STRING_FIELD.

Referenced by outNode().

2610 {
2611  WRITE_NODE_TYPE("INDEXSTMT");
2612 
2613  WRITE_STRING_FIELD(idxname);
2614  WRITE_NODE_FIELD(relation);
2615  WRITE_STRING_FIELD(accessMethod);
2616  WRITE_STRING_FIELD(tableSpace);
2617  WRITE_NODE_FIELD(indexParams);
2619  WRITE_NODE_FIELD(whereClause);
2620  WRITE_NODE_FIELD(excludeOpNames);
2621  WRITE_STRING_FIELD(idxcomment);
2622  WRITE_OID_FIELD(indexOid);
2623  WRITE_OID_FIELD(oldNode);
2624  WRITE_BOOL_FIELD(unique);
2625  WRITE_BOOL_FIELD(primary);
2626  WRITE_BOOL_FIELD(isconstraint);
2627  WRITE_BOOL_FIELD(deferrable);
2628  WRITE_BOOL_FIELD(initdeferred);
2629  WRITE_BOOL_FIELD(transformed);
2630  WRITE_BOOL_FIELD(concurrent);
2631  WRITE_BOOL_FIELD(if_not_exists);
2632 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outInferenceElem ( StringInfo  str,
const InferenceElem node 
)
static

Definition at line 1596 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1597 {
1598  WRITE_NODE_TYPE("INFERENCEELEM");
1599 
1600  WRITE_NODE_FIELD(expr);
1601  WRITE_OID_FIELD(infercollid);
1602  WRITE_OID_FIELD(inferopclass);
1603 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIntoClause ( StringInfo  str,
const IntoClause node 
)
static

Definition at line 1037 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

1038 {
1039  WRITE_NODE_TYPE("INTOCLAUSE");
1040 
1041  WRITE_NODE_FIELD(rel);
1042  WRITE_NODE_FIELD(colNames);
1044  WRITE_ENUM_FIELD(onCommit, OnCommitAction);
1045  WRITE_STRING_FIELD(tableSpaceName);
1046  WRITE_NODE_FIELD(viewQuery);
1047  WRITE_BOOL_FIELD(skipData);
1048 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
OnCommitAction
Definition: primnodes.h:47
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outJoin ( StringInfo  str,
const Join node 
)
static

Definition at line 694 of file outfuncs.c.

References _outJoinPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

695 {
696  WRITE_NODE_TYPE("JOIN");
697 
698  _outJoinPlanInfo(str, (const Join *) node);
699 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:305
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outJoinExpr ( StringInfo  str,
const JoinExpr node 
)
static

Definition at line 1628 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1629 {
1630  WRITE_NODE_TYPE("JOINEXPR");
1631 
1632  WRITE_ENUM_FIELD(jointype, JoinType);
1633  WRITE_BOOL_FIELD(isNatural);
1634  WRITE_NODE_FIELD(larg);
1635  WRITE_NODE_FIELD(rarg);
1636  WRITE_NODE_FIELD(usingClause);
1637  WRITE_NODE_FIELD(quals);
1638  WRITE_NODE_FIELD(alias);
1639  WRITE_INT_FIELD(rtindex);
1640 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
JoinType
Definition: nodes.h:673
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outJoinPathInfo ( StringInfo  str,
const JoinPath node 
)
static

Definition at line 1708 of file outfuncs.c.

References _outPathInfo(), WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, and WRITE_NODE_FIELD.

Referenced by _outHashPath(), _outMergePath(), and _outNestPath().

1709 {
1710  _outPathInfo(str, (const Path *) node);
1711 
1712  WRITE_ENUM_FIELD(jointype, JoinType);
1713  WRITE_BOOL_FIELD(inner_unique);
1714  WRITE_NODE_FIELD(outerjoinpath);
1715  WRITE_NODE_FIELD(innerjoinpath);
1716  WRITE_NODE_FIELD(joinrestrictinfo);
1717 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
JoinType
Definition: nodes.h:673
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outJoinPlanInfo ( StringInfo  str,
const Join node 
)
static

Definition at line 305 of file outfuncs.c.

References _outPlanInfo(), WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, and WRITE_NODE_FIELD.

Referenced by _outHashJoin(), _outJoin(), _outMergeJoin(), and _outNestLoop().

306 {
307  _outPlanInfo(str, (const Plan *) node);
308 
309  WRITE_ENUM_FIELD(jointype, JoinType);
310  WRITE_BOOL_FIELD(inner_unique);
311  WRITE_NODE_FIELD(joinqual);
312 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
JoinType
Definition: nodes.h:673
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outLimit ( StringInfo  str,
const Limit node 
)
static

Definition at line 941 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

942 {
943  WRITE_NODE_TYPE("LIMIT");
944 
945  _outPlanInfo(str, (const Plan *) node);
946 
947  WRITE_NODE_FIELD(limitOffset);
948  WRITE_NODE_FIELD(limitCount);
949 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outLimitPath ( StringInfo  str,
const LimitPath node 
)
static

Definition at line 2081 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2082 {
2083  WRITE_NODE_TYPE("LIMITPATH");
2084 
2085  _outPathInfo(str, (const Path *) node);
2086 
2088  WRITE_NODE_FIELD(limitOffset);
2089  WRITE_NODE_FIELD(limitCount);
2090 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outList ( StringInfo  str,
const List node 
)
static

Definition at line 144 of file outfuncs.c.

References appendStringInfo(), appendStringInfoChar(), elog, ERROR, IsA, lfirst, lfirst_int, lfirst_oid, lnext, outNode(), and List::type.

Referenced by outNode().

145 {
146  const ListCell *lc;
147 
148  appendStringInfoChar(str, '(');
149 
150  if (IsA(node, IntList))
151  appendStringInfoChar(str, 'i');
152  else if (IsA(node, OidList))
153  appendStringInfoChar(str, 'o');
154 
155  foreach(lc, node)
156  {
157  /*
158  * For the sake of backward compatibility, we emit a slightly
159  * different whitespace format for lists of nodes vs. other types of
160  * lists. XXX: is this necessary?
161  */
162  if (IsA(node, List))
163  {
164  outNode(str, lfirst(lc));
165  if (lnext(lc))
166  appendStringInfoChar(str, ' ');
167  }
168  else if (IsA(node, IntList))
169  appendStringInfo(str, " %d", lfirst_int(lc));
170  else if (IsA(node, OidList))
171  appendStringInfo(str, " %u", lfirst_oid(lc));
172  else
173  elog(ERROR, "unrecognized list node type: %d",
174  (int) node->type);
175  }
176 
177  appendStringInfoChar(str, ')');
178 }
#define IsA(nodeptr, _type_)
Definition: nodes.h:560
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
#define ERROR
Definition: elog.h:43
#define lfirst_int(lc)
Definition: pg_list.h:107
#define lnext(lc)
Definition: pg_list.h:105
void appendStringInfoChar(StringInfo str, char ch)
Definition: stringinfo.c:169
void outNode(StringInfo str, const void *obj)
Definition: outfuncs.c:3568
#define lfirst(lc)
Definition: pg_list.h:106
NodeTag type
Definition: pg_list.h:47
#define elog
Definition: elog.h:219
Definition: pg_list.h:45
#define lfirst_oid(lc)
Definition: pg_list.h:108
static void _outLockingClause ( StringInfo  str,
const LockingClause node 
)
static

Definition at line 2729 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2730 {
2731  WRITE_NODE_TYPE("LOCKINGCLAUSE");
2732 
2733  WRITE_NODE_FIELD(lockedRels);
2735  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
2736 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
LockClauseStrength
Definition: lockoptions.h:21
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
LockWaitPolicy
Definition: lockoptions.h:36
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outLockRows ( StringInfo  str,
const LockRows node 
)
static

Definition at line 930 of file outfuncs.c.

References _outPlanInfo(), WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

931 {
932  WRITE_NODE_TYPE("LOCKROWS");
933 
934  _outPlanInfo(str, (const Plan *) node);
935 
936  WRITE_NODE_FIELD(rowMarks);
937  WRITE_INT_FIELD(epqParam);
938 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outLockRowsPath ( StringInfo  str,
const LockRowsPath node 
)
static

Definition at line 2048 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2049 {
2050  WRITE_NODE_TYPE("LOCKROWSPATH");
2051 
2052  _outPathInfo(str, (const Path *) node);
2053 
2055  WRITE_NODE_FIELD(rowMarks);
2056  WRITE_INT_FIELD(epqParam);
2057 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMaterial ( StringInfo  str,
const Material node 
)
static

Definition at line 836 of file outfuncs.c.

References _outPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

837 {
838  WRITE_NODE_TYPE("MATERIAL");
839 
840  _outPlanInfo(str, (const Plan *) node);
841 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outMaterialPath ( StringInfo  str,
const MaterialPath node 
)
static

Definition at line 1856 of file outfuncs.c.

References _outPathInfo(), subpath(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1857 {
1858  WRITE_NODE_TYPE("MATERIALPATH");
1859 
1860  _outPathInfo(str, (const Path *) node);
1861 
1863 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergeAppend ( StringInfo  str,
const MergeAppend node 
)
static

Definition at line 382 of file outfuncs.c.

References _outPlanInfo(), appendStringInfo(), appendStringInfoString(), booltostr, MergeAppend::collations, i, MergeAppend::nullsFirst, MergeAppend::numCols, MergeAppend::sortColIdx, MergeAppend::sortOperators, WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

383 {
384  int i;
385 
386  WRITE_NODE_TYPE("MERGEAPPEND");
387 
388  _outPlanInfo(str, (const Plan *) node);
389 
390  WRITE_NODE_FIELD(partitioned_rels);
391  WRITE_NODE_FIELD(mergeplans);
392 
393  WRITE_INT_FIELD(numCols);
394 
395  appendStringInfoString(str, " :sortColIdx");
396  for (i = 0; i < node->numCols; i++)
397  appendStringInfo(str, " %d", node->sortColIdx[i]);
398 
399  appendStringInfoString(str, " :sortOperators");
400  for (i = 0; i < node->numCols; i++)
401  appendStringInfo(str, " %u", node->sortOperators[i]);
402 
403  appendStringInfoString(str, " :collations");
404  for (i = 0; i < node->numCols; i++)
405  appendStringInfo(str, " %u", node->collations[i]);
406 
407  appendStringInfoString(str, " :nullsFirst");
408  for (i = 0; i < node->numCols; i++)
409  appendStringInfo(str, " %s", booltostr(node->nullsFirst[i]));
410 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
Oid * collations
Definition: plannodes.h:268
#define booltostr(x)
Definition: outfuncs.c:101
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AttrNumber * sortColIdx
Definition: plannodes.h:266
bool * nullsFirst
Definition: plannodes.h:269
int i
Oid * sortOperators
Definition: plannodes.h:267
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergeAppendPath ( StringInfo  str,
const MergeAppendPath node 
)
static

Definition at line 1834 of file outfuncs.c.

References _outPathInfo(), WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1835 {
1836  WRITE_NODE_TYPE("MERGEAPPENDPATH");
1837 
1838  _outPathInfo(str, (const Path *) node);
1839 
1840  WRITE_NODE_FIELD(partitioned_rels);
1841  WRITE_NODE_FIELD(subpaths);
1842  WRITE_FLOAT_FIELD(limit_tuples, "%.0f");
1843 }
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergeJoin ( StringInfo  str,
const MergeJoin node 
)
static

Definition at line 712 of file outfuncs.c.

References _outJoinPlanInfo(), appendStringInfo(), appendStringInfoString(), booltostr, i, list_length(), MergeJoin::mergeclauses, MergeJoin::mergeCollations, MergeJoin::mergeFamilies, MergeJoin::mergeNullsFirst, MergeJoin::mergeStrategies, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

713 {
714  int numCols;
715  int i;
716 
717  WRITE_NODE_TYPE("MERGEJOIN");
718 
719  _outJoinPlanInfo(str, (const Join *) node);
720 
721  WRITE_BOOL_FIELD(skip_mark_restore);
722  WRITE_NODE_FIELD(mergeclauses);
723 
724  numCols = list_length(node->mergeclauses);
725 
726  appendStringInfoString(str, " :mergeFamilies");
727  for (i = 0; i < numCols; i++)
728  appendStringInfo(str, " %u", node->mergeFamilies[i]);
729 
730  appendStringInfoString(str, " :mergeCollations");
731  for (i = 0; i < numCols; i++)
732  appendStringInfo(str, " %u", node->mergeCollations[i]);
733 
734  appendStringInfoString(str, " :mergeStrategies");
735  for (i = 0; i < numCols; i++)
736  appendStringInfo(str, " %d", node->mergeStrategies[i]);
737 
738  appendStringInfoString(str, " :mergeNullsFirst");
739  for (i = 0; i < numCols; i++)
740  appendStringInfo(str, " %s", booltostr(node->mergeNullsFirst[i]));
741 }
#define booltostr(x)
Definition: outfuncs.c:101
List * mergeclauses
Definition: plannodes.h:711
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:305
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
Oid * mergeFamilies
Definition: plannodes.h:713
Oid * mergeCollations
Definition: plannodes.h:714
bool * mergeNullsFirst
Definition: plannodes.h:716
int * mergeStrategies
Definition: plannodes.h:715
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static int list_length(const List *l)
Definition: pg_list.h:89
int i
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergePath ( StringInfo  str,
const MergePath node 
)
static

Definition at line 2112 of file outfuncs.c.

References _outJoinPathInfo(), WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2113 {
2114  WRITE_NODE_TYPE("MERGEPATH");
2115 
2116  _outJoinPathInfo(str, (const JoinPath *) node);
2117 
2118  WRITE_NODE_FIELD(path_mergeclauses);
2119  WRITE_NODE_FIELD(outersortkeys);
2120  WRITE_NODE_FIELD(innersortkeys);
2121  WRITE_BOOL_FIELD(skip_mark_restore);
2122  WRITE_BOOL_FIELD(materialize_inner);
2123 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1708
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMinMaxAggInfo ( StringInfo  str,
const MinMaxAggInfo node 
)
static

Definition at line 2508 of file outfuncs.c.

References WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

2509 {
2510  WRITE_NODE_TYPE("MINMAXAGGINFO");
2511 
2512  WRITE_OID_FIELD(aggfnoid);
2513  WRITE_OID_FIELD(aggsortop);
2514  WRITE_NODE_FIELD(target);
2515  /* We intentionally omit subroot --- too large, not interesting enough */
2516  WRITE_NODE_FIELD(path);
2517  WRITE_FLOAT_FIELD(pathcost, "%.2f");
2518  WRITE_NODE_FIELD(param);
2519 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMinMaxAggPath ( StringInfo  str,
const MinMaxAggPath node 
)
static

Definition at line 1995 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1996 {
1997  WRITE_NODE_TYPE("MINMAXAGGPATH");
1998 
1999  _outPathInfo(str, (const Path *) node);
2000 
2001  WRITE_NODE_FIELD(mmaggregates);
2002  WRITE_NODE_FIELD(quals);
2003 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMinMaxExpr ( StringInfo  str,
const MinMaxExpr node 
)
static

Definition at line 1490 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1491 {
1492  WRITE_NODE_TYPE("MINMAX");
1493 
1494  WRITE_OID_FIELD(minmaxtype);
1495  WRITE_OID_FIELD(minmaxcollid);
1496  WRITE_OID_FIELD(inputcollid);
1499  WRITE_LOCATION_FIELD(location);
1500 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
MinMaxOp
Definition: primnodes.h:1054
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outModifyTable ( StringInfo  str,
const ModifyTable node 
)
static

Definition at line 342 of file outfuncs.c.

References _outPlanInfo(), WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

343 {
344  WRITE_NODE_TYPE("MODIFYTABLE");
345 
346  _outPlanInfo(str, (const Plan *) node);
347 
348  WRITE_ENUM_FIELD(operation, CmdType);
349  WRITE_BOOL_FIELD(canSetTag);
350  WRITE_UINT_FIELD(nominalRelation);
351  WRITE_NODE_FIELD(partitioned_rels);
352  WRITE_NODE_FIELD(resultRelations);
353  WRITE_INT_FIELD(resultRelIndex);
354  WRITE_INT_FIELD(rootResultRelIndex);
355  WRITE_NODE_FIELD(plans);
356  WRITE_NODE_FIELD(withCheckOptionLists);
357  WRITE_NODE_FIELD(returningLists);
358  WRITE_NODE_FIELD(fdwPrivLists);
359  WRITE_BITMAPSET_FIELD(fdwDirectModifyPlans);
360  WRITE_NODE_FIELD(rowMarks);
361  WRITE_INT_FIELD(epqParam);
362  WRITE_ENUM_FIELD(onConflictAction, OnConflictAction);
363  WRITE_NODE_FIELD(arbiterIndexes);
364  WRITE_NODE_FIELD(onConflictSet);
365  WRITE_NODE_FIELD(onConflictWhere);
366  WRITE_UINT_FIELD(exclRelRTI);
367  WRITE_NODE_FIELD(exclRelTlist);
368 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
OnConflictAction
Definition: nodes.h:799
CmdType
Definition: nodes.h:649
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outModifyTablePath ( StringInfo  str,
const ModifyTablePath node 
)
static

Definition at line 2060 of file outfuncs.c.

References _outPathInfo(), WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2061 {
2062  WRITE_NODE_TYPE("MODIFYTABLEPATH");
2063 
2064  _outPathInfo(str, (const Path *) node);
2065 
2066  WRITE_ENUM_FIELD(operation, CmdType);
2067  WRITE_BOOL_FIELD(canSetTag);
2068  WRITE_UINT_FIELD(nominalRelation);
2069  WRITE_NODE_FIELD(partitioned_rels);
2070  WRITE_NODE_FIELD(resultRelations);
2071  WRITE_NODE_FIELD(subpaths);
2072  WRITE_NODE_FIELD(subroots);
2073  WRITE_NODE_FIELD(withCheckOptionLists);
2074  WRITE_NODE_FIELD(returningLists);
2075  WRITE_NODE_FIELD(rowMarks);
2076  WRITE_NODE_FIELD(onconflict);
2077  WRITE_INT_FIELD(epqParam);
2078 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
CmdType
Definition: nodes.h:649
Definition: relation.h:948
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMultiAssignRef ( StringInfo  str,
const MultiAssignRef node 
)
static

Definition at line 3293 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3294 {
3295  WRITE_NODE_TYPE("MULTIASSIGNREF");
3296 
3297  WRITE_NODE_FIELD(source);
3298  WRITE_INT_FIELD(colno);
3299  WRITE_INT_FIELD(ncolumns);
3300 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outNamedArgExpr ( StringInfo  str,
const NamedArgExpr node 
)
static

Definition at line 1184 of file outfuncs.c.

References arg, name, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

1185 {
1186  WRITE_NODE_TYPE("NAMEDARGEXPR");
1187 
1190  WRITE_INT_FIELD(argnumber);
1191  WRITE_LOCATION_FIELD(location);
1192 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
const char * name
Definition: encode.c:521
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outNamedTuplestoreScan ( StringInfo  str,
const NamedTuplestoreScan node 
)
static

Definition at line 639 of file outfuncs.c.

References _outScanInfo(), WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

640 {
641  WRITE_NODE_TYPE("NAMEDTUPLESTORESCAN");
642 
643  _outScanInfo(str, (const Scan *) node);
644 
645  WRITE_STRING_FIELD(enrname);
646 }
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:294
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
static void _outNestLoop ( StringInfo  str,
const NestLoop node 
)
static

Definition at line 702 of file outfuncs.c.

References _outJoinPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

703 {
704  WRITE_NODE_TYPE("NESTLOOP");
705 
706  _outJoinPlanInfo(str, (const Join *) node);
707 
708  WRITE_NODE_FIELD(nestParams);
709 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:305
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outNestLoopParam ( StringInfo  str,
const NestLoopParam node 
)
static

Definition at line 952 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

953 {
954  WRITE_NODE_TYPE("NESTLOOPPARAM");
955 
956  WRITE_INT_FIELD(paramno);
957  WRITE_NODE_FIELD(paramval);
958 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outNestPath ( StringInfo  str,
const NestPath node 
)
static

Definition at line 2104 of file outfuncs.c.

References _outJoinPathInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

2105 {
2106  WRITE_NODE_TYPE("NESTPATH");
2107 
2108  _outJoinPathInfo(str, (const JoinPath *) node);
2109 }
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1708
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outNotifyStmt ( StringInfo  str,
const NotifyStmt node 
)
static

Definition at line 2647 of file outfuncs.c.

References WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2648 {
2649  WRITE_NODE_TYPE("NOTIFY");
2650 
2651  WRITE_STRING_FIELD(conditionname);
2652  WRITE_STRING_FIELD(payload);
2653 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
static void _outNullIfExpr ( StringInfo  str,
const NullIfExpr node 
)
static

Definition at line 1225 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1226 {
1227  WRITE_NODE_TYPE("NULLIFEXPR");
1228 
1229  WRITE_OID_FIELD(opno);
1230  WRITE_OID_FIELD(opfuncid);
1231  WRITE_OID_FIELD(opresulttype);
1232  WRITE_BOOL_FIELD(opretset);
1233  WRITE_OID_FIELD(opcollid);
1234  WRITE_OID_FIELD(inputcollid);
1236  WRITE_LOCATION_FIELD(location);
1237 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outNullTest ( StringInfo  str,
const NullTest node 
)
static

Definition at line 1530 of file outfuncs.c.

References arg, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1531 {
1532  WRITE_NODE_TYPE("NULLTEST");
1533 
1535  WRITE_ENUM_FIELD(nulltesttype, NullTestType);
1536  WRITE_BOOL_FIELD(argisrow);
1537  WRITE_LOCATION_FIELD(location);
1538 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
NullTestType
Definition: primnodes.h:1172
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outOnConflictExpr ( StringInfo  str,
const OnConflictExpr node 
)
static

Definition at line 1652 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1653 {
1654  WRITE_NODE_TYPE("ONCONFLICTEXPR");
1655 
1657  WRITE_NODE_FIELD(arbiterElems);
1658  WRITE_NODE_FIELD(arbiterWhere);
1659  WRITE_OID_FIELD(constraint);
1660  WRITE_NODE_FIELD(onConflictSet);
1661  WRITE_NODE_FIELD(onConflictWhere);
1662  WRITE_INT_FIELD(exclRelIndex);
1663  WRITE_NODE_FIELD(exclRelTlist);
1664 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
OnConflictAction
Definition: nodes.h:799
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outOpExpr ( StringInfo  str,
const OpExpr node 
)
static

Definition at line 1195 of file outfuncs.c.

References generate_unaccent_rules::args, WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1196 {
1197  WRITE_NODE_TYPE("OPEXPR");
1198 
1199  WRITE_OID_FIELD(opno);
1200  WRITE_OID_FIELD(opfuncid);
1201  WRITE_OID_FIELD(opresulttype);
1202  WRITE_BOOL_FIELD(opretset);
1203  WRITE_OID_FIELD(opcollid);
1204  WRITE_OID_FIELD(inputcollid);
1206  WRITE_LOCATION_FIELD(location);
1207 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outParam ( StringInfo  str,
const Param node 
)
static

Definition at line 1087 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1088 {
1089  WRITE_NODE_TYPE("PARAM");
1090 
1091  WRITE_ENUM_FIELD(paramkind, ParamKind);
1092  WRITE_INT_FIELD(paramid);
1093  WRITE_OID_FIELD(paramtype);
1094  WRITE_INT_FIELD(paramtypmod);
1095  WRITE_OID_FIELD(paramcollid);
1096  WRITE_LOCATION_FIELD(location);
1097 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
ParamKind
Definition: primnodes.h:233
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outParamPathInfo ( StringInfo  str,
const ParamPathInfo node 
)
static

Definition at line 2402 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2403 {
2404  WRITE_NODE_TYPE("PARAMPATHINFO");
2405 
2406  WRITE_BITMAPSET_FIELD(ppi_req_outer);
2407  WRITE_FLOAT_FIELD(ppi_rows, "%.0f");
2408  WRITE_NODE_FIELD(ppi_clauses);
2409 }
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outParamRef ( StringInfo  str,
const ParamRef node 
)
static

Definition at line 3229 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_LOCATION_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3230 {
3231  WRITE_NODE_TYPE("PARAMREF");
3232 
3233  WRITE_INT_FIELD(number);
3234  WRITE_LOCATION_FIELD(location);
3235 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPartitionBoundSpec ( StringInfo  str,
const PartitionBoundSpec node 
)
static

Definition at line 3542 of file outfuncs.c.

References WRITE_CHAR_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3543 {
3544  WRITE_NODE_TYPE("PARTITIONBOUNDSPEC");
3545 
3546  WRITE_CHAR_FIELD(strategy);
3547  WRITE_NODE_FIELD(listdatums);
3548  WRITE_NODE_FIELD(lowerdatums);
3549  WRITE_NODE_FIELD(upperdatums);
3550  WRITE_LOCATION_FIELD(location);
3551 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_CHAR_FIELD(fldname)
Definition: outfuncs.c:64
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPartitionedChildRelInfo ( StringInfo  str,
const PartitionedChildRelInfo node 
)
static

Definition at line 2486 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2487 {
2488  WRITE_NODE_TYPE("PARTITIONEDCHILDRELINFO");
2489 
2490  WRITE_UINT_FIELD(parent_relid);
2491  WRITE_NODE_FIELD(child_rels);
2492 }
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPartitionElem ( StringInfo  str,
const PartitionElem node 
)
static

Definition at line 3520 of file outfuncs.c.

References name, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

3521 {
3522  WRITE_NODE_TYPE("PARTITIONELEM");
3523 
3525  WRITE_NODE_FIELD(expr);
3526  WRITE_NODE_FIELD(collation);
3527  WRITE_NODE_FIELD(opclass);
3528  WRITE_LOCATION_FIELD(location);
3529 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
const char * name
Definition: encode.c:521
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPartitionRangeDatum ( StringInfo  str,
const PartitionRangeDatum node 
)
static

Definition at line 3554 of file outfuncs.c.

References value, WRITE_BOOL_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3555 {
3556  WRITE_NODE_TYPE("PARTITIONRANGEDATUM");
3557 
3558  WRITE_BOOL_FIELD(infinite);
3560  WRITE_LOCATION_FIELD(location);
3561 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
static struct @121 value
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPartitionSpec ( StringInfo  str,
const PartitionSpec node 
)
static

Definition at line 3532 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

3533 {
3534  WRITE_NODE_TYPE("PARTITIONSPEC");
3535 
3536  WRITE_STRING_FIELD(strategy);
3537  WRITE_NODE_FIELD(partParams);
3538  WRITE_LOCATION_FIELD(location);
3539 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_STRING_FIELD(fldname)
Definition: outfuncs.c:82
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPath ( StringInfo  str,
const Path node 
)
static

Definition at line 1720 of file outfuncs.c.

References _outPathInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

1721 {
1722  WRITE_NODE_TYPE("PATH");
1723 
1724  _outPathInfo(str, (const Path *) node);
1725 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1683
Definition: relation.h:948
static void _outPathInfo ( StringInfo  str,
const Path node 
)
static

Definition at line 1683 of file outfuncs.c.

References appendStringInfoString(), NULL, outBitmapset(), Path::param_info, Path::parent, Path::pathtarget, ParamPathInfo::ppi_req_outer, RelOptInfo::relids, RelOptInfo::reltarget, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, and WRITE_NODE_FIELD.

Referenced by _outAggPath(), _outAppendPath(), _outBitmapAndPath(), _outBitmapHeapPath(), _outBitmapOrPath(), _outCustomPath(), _outForeignPath(), _outGatherMergePath(), _outGatherPath(), _outGroupingSetsPath(), _outGroupPath(), _outIndexPath(), _outJoinPathInfo(), _outLimitPath(), _outLockRowsPath(), _outMaterialPath(), _outMergeAppendPath(), _outMinMaxAggPath(), _outModifyTablePath(), _outPath(), _outProjectionPath(), _outProjectSetPath(), _outRecursiveUnionPath(), _outResultPath(), _outSetOpPath(), _outSortPath(), _outSubqueryScanPath(), _outTidPath(), _outUniquePath(), _outUpperUniquePath(), and _outWindowAggPath().

1684 {
1685  WRITE_ENUM_FIELD(pathtype, NodeTag);
1686  appendStringInfoString(str, " :parent_relids ");
1687  outBitmapset(str, node->parent->relids);
1688  if (node->pathtarget != node->parent->reltarget)
1689  WRITE_NODE_FIELD(pathtarget);
1690  appendStringInfoString(str, " :required_outer ");
1691  if (node->param_info)
1692  outBitmapset(str, node->param_info->ppi_req_outer);
1693  else
1694  outBitmapset(str, NULL);
1695  WRITE_BOOL_FIELD(parallel_aware);
1696  WRITE_BOOL_FIELD(parallel_safe);
1697  WRITE_INT_FIELD(parallel_workers);
1698  WRITE_FLOAT_FIELD(rows, "%.0f");
1699  WRITE_FLOAT_FIELD(startup_cost, "%.2f");
1700  WRITE_FLOAT_FIELD(total_cost, "%.2f");
1701  WRITE_NODE_FIELD(pathkeys);
1702 }
PathTarget * pathtarget
Definition: relation.h:955
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
ParamPathInfo * param_info
Definition: relation.h:957
NodeTag
Definition: nodes.h:26
RelOptInfo * parent
Definition: relation.h:954
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
Relids relids
Definition: relation.h:525
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define NULL
Definition: c.h:229
void outBitmapset(StringInfo str, const Bitmapset *bms)
Definition: outfuncs.c:187
Relids ppi_req_outer
Definition: relation.h:913
struct PathTarget * reltarget
Definition: relation.h:536
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPathKey ( StringInfo  str,
const PathKey node 
)
static

Definition at line 2372 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

2373 {
2374  WRITE_NODE_TYPE("PATHKEY");
2375 
2376  WRITE_NODE_FIELD(pk_eclass);
2377  WRITE_OID_FIELD(pk_opfamily);
2378  WRITE_INT_FIELD(pk_strategy);
2379  WRITE_BOOL_FIELD(pk_nulls_first);
2380 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPathTarget ( StringInfo  str,
const PathTarget node 
)
static

Definition at line 2383 of file outfuncs.c.

References appendStringInfo(), appendStringInfoString(), PathTarget::exprs, i, list_length(), PathTarget::sortgrouprefs, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2384 {
2385  WRITE_NODE_TYPE("PATHTARGET");
2386 
2387  WRITE_NODE_FIELD(exprs);
2388  if (node->sortgrouprefs)
2389  {
2390  int i;
2391 
2392  appendStringInfoString(str, " :sortgrouprefs");
2393  for (i = 0; i < list_length(node->exprs); i++)
2394  appendStringInfo(str, " %u", node->sortgrouprefs[i]);
2395  }
2396  WRITE_FLOAT_FIELD(cost.startup, "%.2f");
2397  WRITE_FLOAT_FIELD(cost.per_tuple, "%.2f");
2398  WRITE_INT_FIELD(width);
2399 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:78
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:157
Index * sortgrouprefs
Definition: relation.h:885
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
List * exprs
Definition: relation.h:884
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static int list_length(const List *l)
Definition: pg_list.h:89
int i
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlaceHolderInfo ( StringInfo  str,
const PlaceHolderInfo node 
)
static

Definition at line 2495 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2496 {
2497  WRITE_NODE_TYPE("PLACEHOLDERINFO");
2498 
2499  WRITE_UINT_FIELD(phid);
2500  WRITE_NODE_FIELD(ph_var);
2501  WRITE_BITMAPSET_FIELD(ph_eval_at);
2502  WRITE_BITMAPSET_FIELD(ph_lateral);
2503  WRITE_BITMAPSET_FIELD(ph_needed);
2504  WRITE_INT_FIELD(ph_width);
2505 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlaceHolderVar ( StringInfo  str,
const PlaceHolderVar node 
)
static

Definition at line 2444 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2445 {
2446  WRITE_NODE_TYPE("PLACEHOLDERVAR");
2447 
2448  WRITE_NODE_FIELD(phexpr);
2449  WRITE_BITMAPSET_FIELD(phrels);
2450  WRITE_UINT_FIELD(phid);
2451  WRITE_UINT_FIELD(phlevelsup);
2452 }
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlan ( StringInfo  str,
const Plan node 
)
static

Definition at line 316 of file outfuncs.c.

References _outPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

317 {
318  WRITE_NODE_TYPE("PLAN");
319 
320  _outPlanInfo(str, (const Plan *) node);
321 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:272
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPlanInfo ( StringInfo  str,
const Plan node 
)
static

Definition at line 272 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, and WRITE_NODE_FIELD.

Referenced by _outAgg(), _outAppend(), _outBitmapAnd(), _outBitmapOr(), _outGather(), _outGatherMerge(), _outGroup(), _outHash(), _outJoinPlanInfo(), _outLimit(), _outLockRows(), _outMaterial(), _outMergeAppend(), _outModifyTable(), _outPlan(), _outProjectSet(), _outRecursiveUnion(), _outResult(), _outScanInfo(), _outSetOp(), _outSort(), _outUnique(), and _outWindowAgg().

273 {
274  WRITE_FLOAT_FIELD(startup_cost, "%.2f");
275  WRITE_FLOAT_FIELD(total_cost, "%.2f");
276  WRITE_FLOAT_FIELD(plan_rows, "%.0f");
277  WRITE_INT_FIELD(plan_width);
278  WRITE_BOOL_FIELD(parallel_aware);
279  WRITE_BOOL_FIELD(parallel_safe);
280  WRITE_INT_FIELD(plan_node_id);
281  WRITE_NODE_FIELD(targetlist);
282  WRITE_NODE_FIELD(qual);
283  WRITE_NODE_FIELD(lefttree);
284  WRITE_NODE_FIELD(righttree);
285  WRITE_NODE_FIELD(initPlan);
286  WRITE_BITMAPSET_FIELD(extParam);
287  WRITE_BITMAPSET_FIELD(allParam);
288 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlanInvalItem ( StringInfo  str,
const PlanInvalItem node 
)
static

Definition at line 976 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

977 {
978  WRITE_NODE_TYPE("PLANINVALITEM");
979 
980  WRITE_INT_FIELD(cacheId);
981  WRITE_UINT_FIELD(hashValue);
982 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPlannedStmt ( StringInfo  str,
const PlannedStmt node 
)
static

Definition at line 240 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

241 {
242  WRITE_NODE_TYPE("PLANNEDSTMT");
243 
244  WRITE_ENUM_FIELD(commandType, CmdType);
245  WRITE_UINT_FIELD(queryId);
246  WRITE_BOOL_FIELD(hasReturning);
247  WRITE_BOOL_FIELD(hasModifyingCTE);
248  WRITE_BOOL_FIELD(canSetTag);
249  WRITE_BOOL_FIELD(transientPlan);
250  WRITE_BOOL_FIELD(dependsOnRole);
251  WRITE_BOOL_FIELD(parallelModeNeeded);
252  WRITE_NODE_FIELD(planTree);
253  WRITE_NODE_FIELD(rtable);
254  WRITE_NODE_FIELD(resultRelations);
255  WRITE_NODE_FIELD(nonleafResultRelations);
256  WRITE_NODE_FIELD(rootResultRelations);
257  WRITE_NODE_FIELD(subplans);
258  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
259  WRITE_NODE_FIELD(rowMarks);
260  WRITE_NODE_FIELD(relationOids);
261  WRITE_NODE_FIELD(invalItems);
262  WRITE_INT_FIELD(nParamExec);
263  WRITE_NODE_FIELD(utilityStmt);
264  WRITE_LOCATION_FIELD(stmt_location);
265  WRITE_LOCATION_FIELD(stmt_len);
266 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
CmdType
Definition: nodes.h:649
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlannerGlobal ( StringInfo  str,
const PlannerGlobal node 
)
static

Definition at line 2137 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_CHAR_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2138 {
2139  WRITE_NODE_TYPE("PLANNERGLOBAL");
2140 
2141  /* NB: this isn't a complete set of fields */
2142  WRITE_NODE_FIELD(subplans);
2143  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
2144  WRITE_NODE_FIELD(finalrtable);
2145  WRITE_NODE_FIELD(finalrowmarks);
2146  WRITE_NODE_FIELD(resultRelations);
2147  WRITE_NODE_FIELD(nonleafResultRelations);
2148  WRITE_NODE_FIELD(rootResultRelations);
2149  WRITE_NODE_FIELD(relationOids);
2150  WRITE_NODE_FIELD(invalItems);
2151  WRITE_INT_FIELD(nParamExec);
2152  WRITE_UINT_FIELD(lastPHId);
2153  WRITE_UINT_FIELD(lastRowMarkId);
2154  WRITE_INT_FIELD(lastPlanNodeId);
2155  WRITE_BOOL_FIELD(transientPlan);
2156  WRITE_BOOL_FIELD(dependsOnRole);
2157  WRITE_BOOL_FIELD(parallelModeOK);
2158  WRITE_BOOL_FIELD(parallelModeNeeded);
2159  WRITE_CHAR_FIELD(maxParallelHazard);
2160 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_BITMAPSET_FIELD(fldname)
Definition: outfuncs.c:96
#define WRITE_UINT_FIELD(fldname)
Definition: outfuncs.c:52
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_CHAR_FIELD(fldname)
Definition: outfuncs.c:64