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 _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 _outValuesScan (StringInfo str, const ValuesScan *node)
 
static void _outCteScan (StringInfo str, const CteScan *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 _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 _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 _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 _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 _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 _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 _outConstraint (StringInfo str, const Constraint *node)
 
static void _outForeignKeyCacheInfo (StringInfo str, const ForeignKeyCacheInfo *node)
 
static void _outPartitionSpec (StringInfo str, const PartitionSpec *node)
 
static void _outPartitionElem (StringInfo str, const PartitionElem *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 _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:110
void outBitmapset(StringInfo str, const Bitmapset *bms)
Definition: outfuncs.c:187
#define CppAsString(identifier)
Definition: c.h:159

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(), and _outSpecialJoinInfo().

#define WRITE_BOOL_FIELD (   fldname)
#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:110
void outNode(StringInfo str, const void *obj)
Definition: outfuncs.c:3361
#define CppAsString(identifier)
Definition: c.h:159

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(), _outCreateStmtInfo(), _outCustomPath(), _outCustomScan(), _outDeclareCursorStmt(), _outDefElem(), _outDistinctExpr(), _outEquivalenceClass(), _outEquivalenceMember(), _outFieldSelect(), _outFieldStore(), _outForeignPath(), _outForeignScan(), _outFromExpr(), _outFuncCall(), _outFuncExpr(), _outFunctionScan(), _outGatherPath(), _outGroupingFunc(), _outGroupingSet(), _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(), _outPartitionElem(), _outPartitionRangeDatum(), _outPartitionSpec(), _outPathInfo(), _outPathKey(), _outPathTarget(), _outPlaceHolderInfo(), _outPlaceHolderVar(), _outPlanInfo(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outPlannerParamItem(), _outProjectionPath(), _outProjectSetPath(), _outQuery(), _outRangeFunction(), _outRangeSubselect(), _outRangeTableSample(), _outRangeTblEntry(), _outRangeTblFunction(), _outRangeVar(), _outRecursiveUnionPath(), _outRelabelType(), _outRelOptInfo(), _outResTarget(), _outRestrictInfo(), _outResult(), _outResultPath(), _outRowCompareExpr(), _outRowExpr(), _outSampleScan(), _outScalarArrayOpExpr(), _outSelectStmt(), _outSetOperationStmt(), _outSetOpPath(), _outSortBy(), _outSortPath(), _outSpecialJoinInfo(), _outSubLink(), _outSubPlan(), _outSubqueryScan(), _outSubqueryScanPath(), _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(), _outCreateStmt(), _outCteScan(), _outCurrentOfExpr(), _outCustomPath(), _outCustomScan(), _outDeclareCursorStmt(), _outDefElem(), _outDistinctExpr(), _outEquivalenceClass(), _outEquivalenceMember(), _outExtensibleNode(), _outFieldSelect(), _outFieldStore(), _outForeignKeyCacheInfo(), _outForeignKeyOptInfo(), _outForeignPath(), _outForeignScan(), _outFromExpr(), _outFuncCall(), _outFuncExpr(), _outFunctionScan(), _outGather(), _outGatherPath(), _outGroup(), _outGroupingFunc(), _outGroupingSet(), _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(), _outNestLoop(), _outNestLoopParam(), _outNestPath(), _outNotifyStmt(), _outNullIfExpr(), _outNullTest(), _outOnConflictExpr(), _outOpExpr(), _outParam(), _outParamPathInfo(), _outParamRef(), _outPartitionBoundSpec(), _outPartitionElem(), _outPartitionRangeDatum(), _outPartitionSpec(), _outPath(), _outPathKey(), _outPathTarget(), _outPlaceHolderInfo(), _outPlaceHolderVar(), _outPlan(), _outPlanInvalItem(), _outPlannedStmt(), _outPlannerGlobal(), _outPlannerInfo(), _outPlannerParamItem(), _outPlanRowMark(), _outProjectionPath(), _outProjectSet(), _outProjectSetPath(), _outQuery(), _outRangeFunction(), _outRangeSubselect(), _outRangeTableSample(), _outRangeTblEntry(), _outRangeTblFunction(), _outRangeTblRef(), _outRangeVar(), _outRecursiveUnion(), _outRecursiveUnionPath(), _outRelabelType(), _outRelOptInfo(), _outResTarget(), _outRestrictInfo(), _outResult(), _outResultPath(), _outRowCompareExpr(), _outRowExpr(), _outRowMarkClause(), _outSampleScan(), _outScalarArrayOpExpr(), _outScan(), _outSelectStmt(), _outSeqScan(), _outSetOp(), _outSetOperationStmt(), _outSetOpPath(), _outSetToDefault(), _outSort(), _outSortBy(), _outSortGroupClause(), _outSortPath(), _outSpecialJoinInfo(), _outSQLValueFunction(), _outSubLink(), _outSubPlan(), _outSubqueryScan(), _outSubqueryScanPath(), _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 3103 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3104 {
3105  WRITE_NODE_TYPE("A_ARRAYEXPR");
3106 
3107  WRITE_NODE_FIELD(elements);
3108  WRITE_LOCATION_FIELD(location);
3109 }
#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 3084 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3085 {
3086  WRITE_NODE_TYPE("A_INDICES");
3087 
3088  WRITE_BOOL_FIELD(is_slice);
3089  WRITE_NODE_FIELD(lidx);
3090  WRITE_NODE_FIELD(uidx);
3091 }
#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 3094 of file outfuncs.c.

References arg, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3095 {
3096  WRITE_NODE_TYPE("A_INDIRECTION");
3097 
3099  WRITE_NODE_FIELD(indirection);
3100 }
#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 3078 of file outfuncs.c.

References WRITE_NODE_TYPE.

Referenced by outNode().

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

Definition at line 3068 of file outfuncs.c.

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

Referenced by outNode().

3069 {
3070  WRITE_NODE_TYPE("A_CONST");
3071 
3072  appendStringInfoString(str, " :val ");
3073  _outValue(str, &(node->val));
3074  WRITE_LOCATION_FIELD(location);
3075 }
static void _outValue(StringInfo str, const Value *value)
Definition: outfuncs.c:3009
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
Value val
Definition: parsenodes.h:279
static void _outAExpr ( StringInfo  str,
const A_Expr node 
)
static

Definition at line 2927 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().

2928 {
2929  WRITE_NODE_TYPE("AEXPR");
2930 
2931  switch (node->kind)
2932  {
2933  case AEXPR_OP:
2934  appendStringInfoChar(str, ' ');
2936  break;
2937  case AEXPR_OP_ANY:
2938  appendStringInfoChar(str, ' ');
2940  appendStringInfoString(str, " ANY ");
2941  break;
2942  case AEXPR_OP_ALL:
2943  appendStringInfoChar(str, ' ');
2945  appendStringInfoString(str, " ALL ");
2946  break;
2947  case AEXPR_DISTINCT:
2948  appendStringInfoString(str, " DISTINCT ");
2950  break;
2951  case AEXPR_NOT_DISTINCT:
2952  appendStringInfoString(str, " NOT_DISTINCT ");
2954  break;
2955  case AEXPR_NULLIF:
2956  appendStringInfoString(str, " NULLIF ");
2958  break;
2959  case AEXPR_OF:
2960  appendStringInfoString(str, " OF ");
2962  break;
2963  case AEXPR_IN:
2964  appendStringInfoString(str, " IN ");
2966  break;
2967  case AEXPR_LIKE:
2968  appendStringInfoString(str, " LIKE ");
2970  break;
2971  case AEXPR_ILIKE:
2972  appendStringInfoString(str, " ILIKE ");
2974  break;
2975  case AEXPR_SIMILAR:
2976  appendStringInfoString(str, " SIMILAR ");
2978  break;
2979  case AEXPR_BETWEEN:
2980  appendStringInfoString(str, " BETWEEN ");
2982  break;
2983  case AEXPR_NOT_BETWEEN:
2984  appendStringInfoString(str, " NOT_BETWEEN ");
2986  break;
2987  case AEXPR_BETWEEN_SYM:
2988  appendStringInfoString(str, " BETWEEN_SYM ");
2990  break;
2991  case AEXPR_NOT_BETWEEN_SYM:
2992  appendStringInfoString(str, " NOT_BETWEEN_SYM ");
2994  break;
2995  case AEXPR_PAREN:
2996  appendStringInfoString(str, " PAREN");
2997  break;
2998  default:
2999  appendStringInfoString(str, " ??");
3000  break;
3001  }
3002 
3003  WRITE_NODE_FIELD(lexpr);
3004  WRITE_NODE_FIELD(rexpr);
3005  WRITE_LOCATION_FIELD(location);
3006 }
A_Expr_Kind kind
Definition: parsenodes.h:266
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
void appendStringInfoChar(StringInfo str, char ch)
Definition: stringinfo.c:201
#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 694 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().

695 {
696  int i;
697 
698  WRITE_NODE_TYPE("AGG");
699 
700  _outPlanInfo(str, (const Plan *) node);
701 
702  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
703  WRITE_ENUM_FIELD(aggsplit, AggSplit);
704  WRITE_INT_FIELD(numCols);
705 
706  appendStringInfoString(str, " :grpColIdx");
707  for (i = 0; i < node->numCols; i++)
708  appendStringInfo(str, " %d", node->grpColIdx[i]);
709 
710  appendStringInfoString(str, " :grpOperators");
711  for (i = 0; i < node->numCols; i++)
712  appendStringInfo(str, " %u", node->grpOperators[i]);
713 
714  WRITE_LONG_FIELD(numGroups);
715  WRITE_BITMAPSET_FIELD(aggParams);
716  WRITE_NODE_FIELD(groupingSets);
717  WRITE_NODE_FIELD(chain);
718 }
int numCols
Definition: plannodes.h:735
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
AttrNumber * grpColIdx
Definition: plannodes.h:736
#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:270
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AggSplit
Definition: nodes.h:748
AggStrategy
Definition: nodes.h:727
Oid * grpOperators
Definition: plannodes.h:737
int i
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAggPath ( StringInfo  str,
const AggPath node 
)
static

Definition at line 1863 of file outfuncs.c.

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

Referenced by outNode().

1864 {
1865  WRITE_NODE_TYPE("AGGPATH");
1866 
1867  _outPathInfo(str, (const Path *) node);
1868 
1870  WRITE_ENUM_FIELD(aggstrategy, AggStrategy);
1871  WRITE_ENUM_FIELD(aggsplit, AggSplit);
1872  WRITE_FLOAT_FIELD(numGroups, "%.0f");
1873  WRITE_NODE_FIELD(groupClause);
1874  WRITE_NODE_FIELD(qual);
1875 }
#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:748
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
AggStrategy
Definition: nodes.h:727
Definition: relation.h:888
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 1022 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().

1023 {
1024  WRITE_NODE_TYPE("AGGREF");
1025 
1026  WRITE_OID_FIELD(aggfnoid);
1027  WRITE_OID_FIELD(aggtype);
1028  WRITE_OID_FIELD(aggcollid);
1029  WRITE_OID_FIELD(inputcollid);
1030  WRITE_OID_FIELD(aggtranstype);
1031  WRITE_NODE_FIELD(aggargtypes);
1032  WRITE_NODE_FIELD(aggdirectargs);
1034  WRITE_NODE_FIELD(aggorder);
1035  WRITE_NODE_FIELD(aggdistinct);
1036  WRITE_NODE_FIELD(aggfilter);
1037  WRITE_BOOL_FIELD(aggstar);
1038  WRITE_BOOL_FIELD(aggvariadic);
1039  WRITE_CHAR_FIELD(aggkind);
1040  WRITE_UINT_FIELD(agglevelsup);
1041  WRITE_ENUM_FIELD(aggsplit, AggSplit);
1042  WRITE_LOCATION_FIELD(location);
1043 }
#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:748
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAlias ( StringInfo  str,
const Alias node 
)
static

Definition at line 933 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

934 {
935  WRITE_NODE_TYPE("ALIAS");
936 
937  WRITE_STRING_FIELD(aliasname);
938  WRITE_NODE_FIELD(colnames);
939 }
#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 1238 of file outfuncs.c.

References WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1239 {
1240  WRITE_NODE_TYPE("ALTERNATIVESUBPLAN");
1241 
1242  WRITE_NODE_FIELD(subplans);
1243 }
#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 365 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

366 {
367  WRITE_NODE_TYPE("APPEND");
368 
369  _outPlanInfo(str, (const Plan *) node);
370 
371  WRITE_NODE_FIELD(appendplans);
372 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#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 1744 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1745 {
1746  WRITE_NODE_TYPE("APPENDPATH");
1747 
1748  _outPathInfo(str, (const Path *) node);
1749 
1750  WRITE_NODE_FIELD(subpaths);
1751 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outAppendRelInfo ( StringInfo  str,
const AppendRelInfo node 
)
static

Definition at line 2338 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, WRITE_OID_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

2339 {
2340  WRITE_NODE_TYPE("APPENDRELINFO");
2341 
2342  WRITE_UINT_FIELD(parent_relid);
2343  WRITE_UINT_FIELD(child_relid);
2344  WRITE_OID_FIELD(parent_reltype);
2345  WRITE_OID_FIELD(child_reltype);
2346  WRITE_NODE_FIELD(translated_vars);
2347  WRITE_OID_FIELD(parent_reloid);
2348 }
#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 1294 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().

1295 {
1296  WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
1297 
1299  WRITE_OID_FIELD(elemfuncid);
1300  WRITE_OID_FIELD(resulttype);
1301  WRITE_INT_FIELD(resulttypmod);
1302  WRITE_OID_FIELD(resultcollid);
1303  WRITE_BOOL_FIELD(isExplicit);
1304  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
1305  WRITE_LOCATION_FIELD(location);
1306 }
#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:413
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outArrayExpr ( StringInfo  str,
const ArrayExpr node 
)
static

Definition at line 1363 of file outfuncs.c.

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

Referenced by outNode().

1364 {
1365  WRITE_NODE_TYPE("ARRAY");
1366 
1367  WRITE_OID_FIELD(array_typeid);
1368  WRITE_OID_FIELD(array_collid);
1369  WRITE_OID_FIELD(element_typeid);
1370  WRITE_NODE_FIELD(elements);
1371  WRITE_BOOL_FIELD(multidims);
1372  WRITE_LOCATION_FIELD(location);
1373 }
#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 1075 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1076 {
1077  WRITE_NODE_TYPE("ARRAYREF");
1078 
1079  WRITE_OID_FIELD(refarraytype);
1080  WRITE_OID_FIELD(refelemtype);
1081  WRITE_INT_FIELD(reftypmod);
1082  WRITE_OID_FIELD(refcollid);
1083  WRITE_NODE_FIELD(refupperindexpr);
1084  WRITE_NODE_FIELD(reflowerindexpr);
1085  WRITE_NODE_FIELD(refexpr);
1086  WRITE_NODE_FIELD(refassgnexpr);
1087 }
#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 428 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

429 {
430  WRITE_NODE_TYPE("BITMAPAND");
431 
432  _outPlanInfo(str, (const Plan *) node);
433 
434  WRITE_NODE_FIELD(bitmapplans);
435 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#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 1677 of file outfuncs.c.

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

Referenced by outNode().

1678 {
1679  WRITE_NODE_TYPE("BITMAPANDPATH");
1680 
1681  _outPathInfo(str, (const Path *) node);
1682 
1683  WRITE_NODE_FIELD(bitmapquals);
1684  WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
1685 }
#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:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapHeapPath ( StringInfo  str,
const BitmapHeapPath node 
)
static

Definition at line 1667 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1668 {
1669  WRITE_NODE_TYPE("BITMAPHEAPPATH");
1670 
1671  _outPathInfo(str, (const Path *) node);
1672 
1673  WRITE_NODE_FIELD(bitmapqual);
1674 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBitmapHeapScan ( StringInfo  str,
const BitmapHeapScan node 
)
static

Definition at line 528 of file outfuncs.c.

References _outScanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

529 {
530  WRITE_NODE_TYPE("BITMAPHEAPSCAN");
531 
532  _outScanInfo(str, (const Scan *) node);
533 
534  WRITE_NODE_FIELD(bitmapqualorig);
535 }
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:291
#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 516 of file outfuncs.c.

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

Referenced by outNode().

517 {
518  WRITE_NODE_TYPE("BITMAPINDEXSCAN");
519 
520  _outScanInfo(str, (const Scan *) node);
521 
522  WRITE_OID_FIELD(indexid);
523  WRITE_NODE_FIELD(indexqual);
524  WRITE_NODE_FIELD(indexqualorig);
525 }
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:291
#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 438 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

439 {
440  WRITE_NODE_TYPE("BITMAPOR");
441 
442  _outPlanInfo(str, (const Plan *) node);
443 
444  WRITE_NODE_FIELD(bitmapplans);
445 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#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 1688 of file outfuncs.c.

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

Referenced by outNode().

1689 {
1690  WRITE_NODE_TYPE("BITMAPORPATH");
1691 
1692  _outPathInfo(str, (const Path *) node);
1693 
1694  WRITE_NODE_FIELD(bitmapquals);
1695  WRITE_FLOAT_FIELD(bitmapselectivity, "%.4f");
1696 }
#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:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outBooleanTest ( StringInfo  str,
const BooleanTest node 
)
static

Definition at line 1463 of file outfuncs.c.

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

Referenced by outNode().

1464 {
1465  WRITE_NODE_TYPE("BOOLEANTEST");
1466 
1468  WRITE_ENUM_FIELD(booltesttype, BoolTestType);
1469  WRITE_LOCATION_FIELD(location);
1470 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
BoolTestType
Definition: primnodes.h:1171
#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 1175 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().

1176 {
1177  char *opstr = NULL;
1178 
1179  WRITE_NODE_TYPE("BOOLEXPR");
1180 
1181  /* do-it-yourself enum representation */
1182  switch (node->boolop)
1183  {
1184  case AND_EXPR:
1185  opstr = "and";
1186  break;
1187  case OR_EXPR:
1188  opstr = "or";
1189  break;
1190  case NOT_EXPR:
1191  opstr = "not";
1192  break;
1193  }
1194  appendStringInfoString(str, " :boolop ");
1195  outToken(str, opstr);
1196 
1198  WRITE_LOCATION_FIELD(location);
1199 }
#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:539
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define NULL
Definition: c.h:226
#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 1330 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().

1331 {
1332  WRITE_NODE_TYPE("CASE");
1333 
1334  WRITE_OID_FIELD(casetype);
1335  WRITE_OID_FIELD(casecollid);
1338  WRITE_NODE_FIELD(defresult);
1339  WRITE_LOCATION_FIELD(location);
1340 }
#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 1353 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1354 {
1355  WRITE_NODE_TYPE("CASETESTEXPR");
1356 
1357  WRITE_OID_FIELD(typeId);
1358  WRITE_INT_FIELD(typeMod);
1359  WRITE_OID_FIELD(collation);
1360 }
#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 1343 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1344 {
1345  WRITE_NODE_TYPE("WHEN");
1346 
1347  WRITE_NODE_FIELD(expr);
1348  WRITE_NODE_FIELD(result);
1349  WRITE_LOCATION_FIELD(location);
1350 }
#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 _outCoalesceExpr ( StringInfo  str,
const CoalesceExpr node 
)
static

Definition at line 1401 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().

1402 {
1403  WRITE_NODE_TYPE("COALESCE");
1404 
1405  WRITE_OID_FIELD(coalescetype);
1406  WRITE_OID_FIELD(coalescecollid);
1408  WRITE_LOCATION_FIELD(location);
1409 }
#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 1473 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().

1474 {
1475  WRITE_NODE_TYPE("COERCETODOMAIN");
1476 
1478  WRITE_OID_FIELD(resulttype);
1479  WRITE_INT_FIELD(resulttypmod);
1480  WRITE_OID_FIELD(resultcollid);
1481  WRITE_ENUM_FIELD(coercionformat, CoercionForm);
1482  WRITE_LOCATION_FIELD(location);
1483 }
#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:413
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCoerceToDomainValue ( StringInfo  str,
const CoerceToDomainValue node 
)
static

Definition at line 1486 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1487 {
1488  WRITE_NODE_TYPE("COERCETODOMAINVALUE");
1489 
1490  WRITE_OID_FIELD(typeId);
1491  WRITE_INT_FIELD(typeMod);
1492  WRITE_OID_FIELD(collation);
1493  WRITE_LOCATION_FIELD(location);
1494 }
#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 1282 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().

1283 {
1284  WRITE_NODE_TYPE("COERCEVIAIO");
1285 
1287  WRITE_OID_FIELD(resulttype);
1288  WRITE_OID_FIELD(resultcollid);
1289  WRITE_ENUM_FIELD(coerceformat, CoercionForm);
1290  WRITE_LOCATION_FIELD(location);
1291 }
#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:413
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCollateClause ( StringInfo  str,
const CollateClause node 
)
static

Definition at line 2650 of file outfuncs.c.

References arg, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2651 {
2652  WRITE_NODE_TYPE("COLLATECLAUSE");
2653 
2655  WRITE_NODE_FIELD(collname);
2656  WRITE_LOCATION_FIELD(location);
2657 }
#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 1320 of file outfuncs.c.

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

Referenced by outNode().

1321 {
1322  WRITE_NODE_TYPE("COLLATE");
1323 
1325  WRITE_OID_FIELD(collOid);
1326  WRITE_LOCATION_FIELD(location);
1327 }
#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 2604 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().

2605 {
2606  WRITE_NODE_TYPE("COLUMNDEF");
2607 
2608  WRITE_STRING_FIELD(colname);
2609  WRITE_NODE_FIELD(typeName);
2610  WRITE_INT_FIELD(inhcount);
2611  WRITE_BOOL_FIELD(is_local);
2612  WRITE_BOOL_FIELD(is_not_null);
2613  WRITE_BOOL_FIELD(is_from_type);
2614  WRITE_CHAR_FIELD(storage);
2615  WRITE_NODE_FIELD(raw_default);
2616  WRITE_NODE_FIELD(cooked_default);
2617  WRITE_NODE_FIELD(collClause);
2618  WRITE_OID_FIELD(collOid);
2619  WRITE_NODE_FIELD(constraints);
2620  WRITE_NODE_FIELD(fdwoptions);
2621  WRITE_LOCATION_FIELD(location);
2622 }
#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 3050 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3051 {
3052  WRITE_NODE_TYPE("COLUMNREF");
3053 
3054  WRITE_NODE_FIELD(fields);
3055  WRITE_LOCATION_FIELD(location);
3056 }
#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 2812 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().

2813 {
2814  WRITE_NODE_TYPE("COMMONTABLEEXPR");
2815 
2816  WRITE_STRING_FIELD(ctename);
2817  WRITE_NODE_FIELD(aliascolnames);
2818  WRITE_NODE_FIELD(ctequery);
2819  WRITE_LOCATION_FIELD(location);
2820  WRITE_BOOL_FIELD(cterecursive);
2821  WRITE_INT_FIELD(cterefcount);
2822  WRITE_NODE_FIELD(ctecolnames);
2823  WRITE_NODE_FIELD(ctecoltypes);
2824  WRITE_NODE_FIELD(ctecoltypmods);
2825  WRITE_NODE_FIELD(ctecolcollations);
2826 }
#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 989 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().

990 {
991  WRITE_NODE_TYPE("CONST");
992 
993  WRITE_OID_FIELD(consttype);
994  WRITE_INT_FIELD(consttypmod);
995  WRITE_OID_FIELD(constcollid);
996  WRITE_INT_FIELD(constlen);
997  WRITE_BOOL_FIELD(constbyval);
998  WRITE_BOOL_FIELD(constisnull);
999  WRITE_LOCATION_FIELD(location);
1000 
1001  appendStringInfoString(str, " :constvalue ");
1002  if (node->constisnull)
1003  appendStringInfoString(str, "<>");
1004  else
1005  outDatum(str, node->constvalue, node->constlen, node->constbyval);
1006 }
Datum constvalue
Definition: primnodes.h:174
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
bool constbyval
Definition: primnodes.h:177
#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:173
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
bool constisnull
Definition: primnodes.h:175
static void _outConstraint ( StringInfo  str,
const Constraint node 
)
static

Definition at line 3195 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_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().

3196 {
3197  WRITE_NODE_TYPE("CONSTRAINT");
3198 
3199  WRITE_STRING_FIELD(conname);
3200  WRITE_BOOL_FIELD(deferrable);
3201  WRITE_BOOL_FIELD(initdeferred);
3202  WRITE_LOCATION_FIELD(location);
3203 
3204  appendStringInfoString(str, " :contype ");
3205  switch (node->contype)
3206  {
3207  case CONSTR_NULL:
3208  appendStringInfoString(str, "NULL");
3209  break;
3210 
3211  case CONSTR_NOTNULL:
3212  appendStringInfoString(str, "NOT_NULL");
3213  break;
3214 
3215  case CONSTR_DEFAULT:
3216  appendStringInfoString(str, "DEFAULT");
3217  WRITE_NODE_FIELD(raw_expr);
3218  WRITE_STRING_FIELD(cooked_expr);
3219  break;
3220 
3221  case CONSTR_CHECK:
3222  appendStringInfoString(str, "CHECK");
3223  WRITE_BOOL_FIELD(is_no_inherit);
3224  WRITE_NODE_FIELD(raw_expr);
3225  WRITE_STRING_FIELD(cooked_expr);
3226  break;
3227 
3228  case CONSTR_PRIMARY:
3229  appendStringInfoString(str, "PRIMARY_KEY");
3230  WRITE_NODE_FIELD(keys);
3232  WRITE_STRING_FIELD(indexname);
3233  WRITE_STRING_FIELD(indexspace);
3234  /* access_method and where_clause not currently used */
3235  break;
3236 
3237  case CONSTR_UNIQUE:
3238  appendStringInfoString(str, "UNIQUE");
3239  WRITE_NODE_FIELD(keys);
3241  WRITE_STRING_FIELD(indexname);
3242  WRITE_STRING_FIELD(indexspace);
3243  /* access_method and where_clause not currently used */
3244  break;
3245 
3246  case CONSTR_EXCLUSION:
3247  appendStringInfoString(str, "EXCLUSION");
3248  WRITE_NODE_FIELD(exclusions);
3250  WRITE_STRING_FIELD(indexname);
3251  WRITE_STRING_FIELD(indexspace);
3252  WRITE_STRING_FIELD(access_method);
3253  WRITE_NODE_FIELD(where_clause);
3254  break;
3255 
3256  case CONSTR_FOREIGN:
3257  appendStringInfoString(str, "FOREIGN_KEY");
3258  WRITE_NODE_FIELD(pktable);
3259  WRITE_NODE_FIELD(fk_attrs);
3260  WRITE_NODE_FIELD(pk_attrs);
3261  WRITE_CHAR_FIELD(fk_matchtype);
3262  WRITE_CHAR_FIELD(fk_upd_action);
3263  WRITE_CHAR_FIELD(fk_del_action);
3264  WRITE_NODE_FIELD(old_conpfeqop);
3265  WRITE_OID_FIELD(old_pktable_oid);
3266  WRITE_BOOL_FIELD(skip_validation);
3267  WRITE_BOOL_FIELD(initially_valid);
3268  break;
3269 
3271  appendStringInfoString(str, "ATTR_DEFERRABLE");
3272  break;
3273 
3275  appendStringInfoString(str, "ATTR_NOT_DEFERRABLE");
3276  break;
3277 
3278  case CONSTR_ATTR_DEFERRED:
3279  appendStringInfoString(str, "ATTR_DEFERRED");
3280  break;
3281 
3282  case CONSTR_ATTR_IMMEDIATE:
3283  appendStringInfoString(str, "ATTR_IMMEDIATE");
3284  break;
3285 
3286  default:
3287  appendStringInfo(str, "<unrecognized_constraint %d>",
3288  (int) node->contype);
3289  break;
3290  }
3291 }
#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:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#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:1971
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outConvertRowtypeExpr ( StringInfo  str,
const ConvertRowtypeExpr node 
)
static

Definition at line 1309 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().

1310 {
1311  WRITE_NODE_TYPE("CONVERTROWTYPEEXPR");
1312 
1314  WRITE_OID_FIELD(resulttype);
1315  WRITE_ENUM_FIELD(convertformat, CoercionForm);
1316  WRITE_LOCATION_FIELD(location);
1317 }
#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:413
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCreateForeignTableStmt ( StringInfo  str,
const CreateForeignTableStmt node 
)
static

Definition at line 2441 of file outfuncs.c.

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

Referenced by outNode().

2442 {
2443  WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
2444 
2445  _outCreateStmtInfo(str, (const CreateStmt *) node);
2446 
2447  WRITE_STRING_FIELD(servername);
2449 }
static void _outCreateStmtInfo(StringInfo str, const CreateStmt *node)
Definition: outfuncs.c:2417
#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 _outCreateStmt ( StringInfo  str,
const CreateStmt node 
)
static

Definition at line 2433 of file outfuncs.c.

References _outCreateStmtInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

2434 {
2435  WRITE_NODE_TYPE("CREATESTMT");
2436 
2437  _outCreateStmtInfo(str, (const CreateStmt *) node);
2438 }
static void _outCreateStmtInfo(StringInfo str, const CreateStmt *node)
Definition: outfuncs.c:2417
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCreateStmtInfo ( StringInfo  str,
const CreateStmt node 
)
static

Definition at line 2417 of file outfuncs.c.

References WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_NODE_FIELD, and WRITE_STRING_FIELD.

Referenced by _outCreateForeignTableStmt(), and _outCreateStmt().

2418 {
2419  WRITE_NODE_FIELD(relation);
2420  WRITE_NODE_FIELD(tableElts);
2421  WRITE_NODE_FIELD(inhRelations);
2422  WRITE_NODE_FIELD(partspec);
2423  WRITE_NODE_FIELD(partbound);
2424  WRITE_NODE_FIELD(ofTypename);
2425  WRITE_NODE_FIELD(constraints);
2427  WRITE_ENUM_FIELD(oncommit, OnCommitAction);
2428  WRITE_STRING_FIELD(tablespacename);
2429  WRITE_BOOL_FIELD(if_not_exists);
2430 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
OnCommitAction
Definition: primnodes.h:46
#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 579 of file outfuncs.c.

References _outScanInfo(), WRITE_INT_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

580 {
581  WRITE_NODE_TYPE("CTESCAN");
582 
583  _outScanInfo(str, (const Scan *) node);
584 
585  WRITE_INT_FIELD(ctePlanId);
586  WRITE_INT_FIELD(cteParam);
587 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:291
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outCurrentOfExpr ( StringInfo  str,
const CurrentOfExpr node 
)
static

Definition at line 1508 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, WRITE_STRING_FIELD, and WRITE_UINT_FIELD.

Referenced by outNode().

1509 {
1510  WRITE_NODE_TYPE("CURRENTOFEXPR");
1511 
1512  WRITE_UINT_FIELD(cvarno);
1513  WRITE_STRING_FIELD(cursor_name);
1514  WRITE_INT_FIELD(cursor_param);
1515 }
#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 1730 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().

1731 {
1732  WRITE_NODE_TYPE("CUSTOMPATH");
1733 
1734  _outPathInfo(str, (const Path *) node);
1735 
1736  WRITE_UINT_FIELD(flags);
1737  WRITE_NODE_FIELD(custom_paths);
1738  WRITE_NODE_FIELD(custom_private);
1739  appendStringInfoString(str, " :methods ");
1740  outToken(str, node->methods->CustomName);
1741 }
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:1104
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
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:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outCustomScan ( StringInfo  str,
const CustomScan node 
)
static

Definition at line 617 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().

618 {
619  WRITE_NODE_TYPE("CUSTOMSCAN");
620 
621  _outScanInfo(str, (const Scan *) node);
622 
623  WRITE_UINT_FIELD(flags);
624  WRITE_NODE_FIELD(custom_plans);
625  WRITE_NODE_FIELD(custom_exprs);
626  WRITE_NODE_FIELD(custom_private);
627  WRITE_NODE_FIELD(custom_scan_tlist);
628  WRITE_BITMAPSET_FIELD(custom_relids);
629  /* CustomName is a key to lookup CustomScanMethods */
630  appendStringInfoString(str, " :methods ");
631  outToken(str, node->methods->CustomName);
632 }
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:189
const struct CustomScanMethods * methods
Definition: plannodes.h:591
const char * CustomName
Definition: extensible.h:107
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:291
#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 2500 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2501 {
2502  WRITE_NODE_TYPE("DECLARECURSOR");
2503 
2504  WRITE_STRING_FIELD(portalname);
2506  WRITE_NODE_FIELD(query);
2507 }
#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 2552 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().

2553 {
2554  WRITE_NODE_TYPE("DEFELEM");
2555 
2556  WRITE_STRING_FIELD(defnamespace);
2557  WRITE_STRING_FIELD(defname);
2559  WRITE_ENUM_FIELD(defaction, DefElemAction);
2560  WRITE_LOCATION_FIELD(location);
2561 }
#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:663
void * arg
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outDistinctExpr ( StringInfo  str,
const DistinctExpr node 
)
static

Definition at line 1132 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().

1133 {
1134  WRITE_NODE_TYPE("DISTINCTEXPR");
1135 
1136  WRITE_OID_FIELD(opno);
1137  WRITE_OID_FIELD(opfuncid);
1138  WRITE_OID_FIELD(opresulttype);
1139  WRITE_BOOL_FIELD(opretset);
1140  WRITE_OID_FIELD(opcollid);
1141  WRITE_OID_FIELD(inputcollid);
1143  WRITE_LOCATION_FIELD(location);
1144 }
#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 2197 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().

2198 {
2199  /*
2200  * To simplify reading, we just chase up to the topmost merged EC and
2201  * print that, without bothering to show the merge-ees separately.
2202  */
2203  while (node->ec_merged)
2204  node = node->ec_merged;
2205 
2206  WRITE_NODE_TYPE("EQUIVALENCECLASS");
2207 
2208  WRITE_NODE_FIELD(ec_opfamilies);
2209  WRITE_OID_FIELD(ec_collation);
2210  WRITE_NODE_FIELD(ec_members);
2211  WRITE_NODE_FIELD(ec_sources);
2212  WRITE_NODE_FIELD(ec_derives);
2213  WRITE_BITMAPSET_FIELD(ec_relids);
2214  WRITE_BOOL_FIELD(ec_has_const);
2215  WRITE_BOOL_FIELD(ec_has_volatile);
2216  WRITE_BOOL_FIELD(ec_below_outer_join);
2217  WRITE_BOOL_FIELD(ec_broken);
2218  WRITE_UINT_FIELD(ec_sortref);
2219  WRITE_UINT_FIELD(ec_min_security);
2220  WRITE_UINT_FIELD(ec_max_security);
2221 }
#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:726
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outEquivalenceMember ( StringInfo  str,
const EquivalenceMember node 
)
static

Definition at line 2224 of file outfuncs.c.

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

Referenced by outNode().

2225 {
2226  WRITE_NODE_TYPE("EQUIVALENCEMEMBER");
2227 
2228  WRITE_NODE_FIELD(em_expr);
2229  WRITE_BITMAPSET_FIELD(em_relids);
2230  WRITE_BITMAPSET_FIELD(em_nullable_relids);
2231  WRITE_BOOL_FIELD(em_is_const);
2232  WRITE_BOOL_FIELD(em_is_child);
2233  WRITE_OID_FIELD(em_datatype);
2234 }
#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 2393 of file outfuncs.c.

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

Referenced by outNode().

2394 {
2395  const ExtensibleNodeMethods *methods;
2396 
2397  methods = GetExtensibleNodeMethods(node->extnodename, false);
2398 
2399  WRITE_NODE_TYPE("EXTENSIBLENODE");
2400 
2401  WRITE_STRING_FIELD(extnodename);
2402 
2403  /* serialize the private fields */
2404  methods->nodeOut(str, node);
2405 }
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 1246 of file outfuncs.c.

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

Referenced by outNode().

1247 {
1248  WRITE_NODE_TYPE("FIELDSELECT");
1249 
1251  WRITE_INT_FIELD(fieldnum);
1252  WRITE_OID_FIELD(resulttype);
1253  WRITE_INT_FIELD(resulttypmod);
1254  WRITE_OID_FIELD(resultcollid);
1255 }
#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 1258 of file outfuncs.c.

References arg, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1259 {
1260  WRITE_NODE_TYPE("FIELDSTORE");
1261 
1263  WRITE_NODE_FIELD(newvals);
1264  WRITE_NODE_FIELD(fieldnums);
1265  WRITE_OID_FIELD(resulttype);
1266 }
#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 3294 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().

3295 {
3296  int i;
3297 
3298  WRITE_NODE_TYPE("FOREIGNKEYCACHEINFO");
3299 
3300  WRITE_OID_FIELD(conrelid);
3301  WRITE_OID_FIELD(confrelid);
3302  WRITE_INT_FIELD(nkeys);
3303  appendStringInfoString(str, " :conkey");
3304  for (i = 0; i < node->nkeys; i++)
3305  appendStringInfo(str, " %d", node->conkey[i]);
3306  appendStringInfoString(str, " :confkey");
3307  for (i = 0; i < node->nkeys; i++)
3308  appendStringInfo(str, " %d", node->confkey[i]);
3309  appendStringInfoString(str, " :conpfeqop");
3310  for (i = 0; i < node->nkeys; i++)
3311  appendStringInfo(str, " %u", node->conpfeqop[i]);
3312 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: rel.h:239
#define WRITE_OID_FIELD(fldname)
Definition: outfuncs.c:56
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: rel.h:241
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AttrNumber confkey[INDEX_MAX_KEYS]
Definition: rel.h:240
int i
static void _outForeignKeyOptInfo ( StringInfo  str,
const ForeignKeyOptInfo node 
)
static

Definition at line 2166 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().

2167 {
2168  int i;
2169 
2170  WRITE_NODE_TYPE("FOREIGNKEYOPTINFO");
2171 
2172  WRITE_UINT_FIELD(con_relid);
2173  WRITE_UINT_FIELD(ref_relid);
2174  WRITE_INT_FIELD(nkeys);
2175  appendStringInfoString(str, " :conkey");
2176  for (i = 0; i < node->nkeys; i++)
2177  appendStringInfo(str, " %d", node->conkey[i]);
2178  appendStringInfoString(str, " :confkey");
2179  for (i = 0; i < node->nkeys; i++)
2180  appendStringInfo(str, " %d", node->confkey[i]);
2181  appendStringInfoString(str, " :conpfeqop");
2182  for (i = 0; i < node->nkeys; i++)
2183  appendStringInfo(str, " %u", node->conpfeqop[i]);
2184  WRITE_INT_FIELD(nmatched_ec);
2185  WRITE_INT_FIELD(nmatched_rcols);
2186  WRITE_INT_FIELD(nmatched_ri);
2187  /* for compactness, just print the number of matches per column: */
2188  appendStringInfoString(str, " :eclass");
2189  for (i = 0; i < node->nkeys; i++)
2190  appendStringInfo(str, " %d", (node->eclass[i] != NULL));
2191  appendStringInfoString(str, " :rinfos");
2192  for (i = 0; i < node->nkeys; i++)
2193  appendStringInfo(str, " %d", list_length(node->rinfos[i]));
2194 }
#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:110
Oid conpfeqop[INDEX_MAX_KEYS]
Definition: relation.h:655
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
struct EquivalenceClass * eclass[INDEX_MAX_KEYS]
Definition: relation.h:662
AttrNumber conkey[INDEX_MAX_KEYS]
Definition: relation.h:653
#define NULL
Definition: c.h:226
#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:654
List * rinfos[INDEX_MAX_KEYS]
Definition: relation.h:664
static void _outForeignPath ( StringInfo  str,
const ForeignPath node 
)
static

Definition at line 1719 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1720 {
1721  WRITE_NODE_TYPE("FOREIGNPATH");
1722 
1723  _outPathInfo(str, (const Path *) node);
1724 
1725  WRITE_NODE_FIELD(fdw_outerpath);
1726  WRITE_NODE_FIELD(fdw_private);
1727 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outForeignScan ( StringInfo  str,
const ForeignScan node 
)
static

Definition at line 600 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().

601 {
602  WRITE_NODE_TYPE("FOREIGNSCAN");
603 
604  _outScanInfo(str, (const Scan *) node);
605 
606  WRITE_ENUM_FIELD(operation, CmdType);
607  WRITE_OID_FIELD(fs_server);
608  WRITE_NODE_FIELD(fdw_exprs);
609  WRITE_NODE_FIELD(fdw_private);
610  WRITE_NODE_FIELD(fdw_scan_tlist);
611  WRITE_NODE_FIELD(fdw_recheck_quals);
612  WRITE_BITMAPSET_FIELD(fs_relids);
613  WRITE_BOOL_FIELD(fsSystemCol);
614 }
#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:291
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
CmdType
Definition: nodes.h:641
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFromExpr ( StringInfo  str,
const FromExpr node 
)
static

Definition at line 1565 of file outfuncs.c.

References WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1566 {
1567  WRITE_NODE_TYPE("FROMEXPR");
1568 
1569  WRITE_NODE_FIELD(fromlist);
1570  WRITE_NODE_FIELD(quals);
1571 }
#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 2535 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().

2536 {
2537  WRITE_NODE_TYPE("FUNCCALL");
2538 
2539  WRITE_NODE_FIELD(funcname);
2541  WRITE_NODE_FIELD(agg_order);
2542  WRITE_NODE_FIELD(agg_filter);
2543  WRITE_BOOL_FIELD(agg_within_group);
2544  WRITE_BOOL_FIELD(agg_star);
2545  WRITE_BOOL_FIELD(agg_distinct);
2546  WRITE_BOOL_FIELD(func_variadic);
2547  WRITE_NODE_FIELD(over);
2548  WRITE_LOCATION_FIELD(location);
2549 }
#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 1090 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().

1091 {
1092  WRITE_NODE_TYPE("FUNCEXPR");
1093 
1094  WRITE_OID_FIELD(funcid);
1095  WRITE_OID_FIELD(funcresulttype);
1096  WRITE_BOOL_FIELD(funcretset);
1097  WRITE_BOOL_FIELD(funcvariadic);
1098  WRITE_ENUM_FIELD(funcformat, CoercionForm);
1099  WRITE_OID_FIELD(funccollid);
1100  WRITE_OID_FIELD(inputcollid);
1102  WRITE_LOCATION_FIELD(location);
1103 }
#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:413
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outFunctionScan ( StringInfo  str,
const FunctionScan node 
)
static

Definition at line 558 of file outfuncs.c.

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

Referenced by outNode().

559 {
560  WRITE_NODE_TYPE("FUNCTIONSCAN");
561 
562  _outScanInfo(str, (const Scan *) node);
563 
565  WRITE_BOOL_FIELD(funcordinality);
566 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outScanInfo(StringInfo str, const Scan *node)
Definition: outfuncs.c:291
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static const struct fns functions
Definition: regcomp.c:301
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGather ( StringInfo  str,
const Gather node 
)
static

Definition at line 448 of file outfuncs.c.

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

Referenced by outNode().

449 {
450  WRITE_NODE_TYPE("GATHER");
451 
452  _outPlanInfo(str, (const Plan *) node);
453 
454  WRITE_INT_FIELD(num_workers);
455  WRITE_BOOL_FIELD(single_copy);
456  WRITE_BOOL_FIELD(invisible);
457 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outGatherPath ( StringInfo  str,
const GatherPath node 
)
static

Definition at line 1798 of file outfuncs.c.

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

Referenced by outNode().

1799 {
1800  WRITE_NODE_TYPE("GATHERPATH");
1801 
1802  _outPathInfo(str, (const Path *) node);
1803 
1805  WRITE_BOOL_FIELD(single_copy);
1806 }
#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:1605
Definition: relation.h:888
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 756 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().

757 {
758  int i;
759 
760  WRITE_NODE_TYPE("GROUP");
761 
762  _outPlanInfo(str, (const Plan *) node);
763 
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 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
int numCols
Definition: plannodes.h:711
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
int i
AttrNumber * grpColIdx
Definition: plannodes.h:712
Oid * grpOperators
Definition: plannodes.h:713
static void _outGroupingFunc ( StringInfo  str,
const GroupingFunc node 
)
static

Definition at line 1046 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().

1047 {
1048  WRITE_NODE_TYPE("GROUPINGFUNC");
1049 
1051  WRITE_NODE_FIELD(refs);
1052  WRITE_NODE_FIELD(cols);
1053  WRITE_UINT_FIELD(agglevelsup);
1054  WRITE_LOCATION_FIELD(location);
1055 }
#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 2765 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2766 {
2767  WRITE_NODE_TYPE("GROUPINGSET");
2768 
2770  WRITE_NODE_FIELD(content);
2771  WRITE_LOCATION_FIELD(location);
2772 }
#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:1159
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outGroupingSetsPath ( StringInfo  str,
const GroupingSetsPath node 
)
static

Definition at line 1878 of file outfuncs.c.

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

Referenced by outNode().

1879 {
1880  WRITE_NODE_TYPE("GROUPINGSETSPATH");
1881 
1882  _outPathInfo(str, (const Path *) node);
1883 
1885  WRITE_NODE_FIELD(rollup_groupclauses);
1886  WRITE_NODE_FIELD(rollup_lists);
1887  WRITE_NODE_FIELD(qual);
1888 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
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 1840 of file outfuncs.c.

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

Referenced by outNode().

1841 {
1842  WRITE_NODE_TYPE("GROUPPATH");
1843 
1844  _outPathInfo(str, (const Path *) node);
1845 
1847  WRITE_NODE_FIELD(groupClause);
1848  WRITE_NODE_FIELD(qual);
1849 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
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 832 of file outfuncs.c.

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

Referenced by outNode().

833 {
834  WRITE_NODE_TYPE("HASH");
835 
836  _outPlanInfo(str, (const Plan *) node);
837 
838  WRITE_OID_FIELD(skewTable);
839  WRITE_INT_FIELD(skewColumn);
840  WRITE_BOOL_FIELD(skewInherit);
841  WRITE_OID_FIELD(skewColType);
842  WRITE_INT_FIELD(skewColTypmod);
843 }
#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:270
#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 684 of file outfuncs.c.

References _outJoinPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

685 {
686  WRITE_NODE_TYPE("HASHJOIN");
687 
688  _outJoinPlanInfo(str, (const Join *) node);
689 
690  WRITE_NODE_FIELD(hashclauses);
691 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:302
#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 2009 of file outfuncs.c.

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

Referenced by outNode().

2010 {
2011  WRITE_NODE_TYPE("HASHPATH");
2012 
2013  _outJoinPathInfo(str, (const JoinPath *) node);
2014 
2015  WRITE_NODE_FIELD(path_hashclauses);
2016  WRITE_INT_FIELD(num_batches);
2017 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1630
#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 2452 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2453 {
2454  WRITE_NODE_TYPE("IMPORTFOREIGNSCHEMASTMT");
2455 
2456  WRITE_STRING_FIELD(server_name);
2457  WRITE_STRING_FIELD(remote_schema);
2458  WRITE_STRING_FIELD(local_schema);
2460  WRITE_NODE_FIELD(table_list);
2462 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
ImportForeignSchemaType
Definition: parsenodes.h:2174
#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 2660 of file outfuncs.c.

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

Referenced by outNode().

2661 {
2662  WRITE_NODE_TYPE("INDEXELEM");
2663 
2665  WRITE_NODE_FIELD(expr);
2666  WRITE_STRING_FIELD(indexcolname);
2667  WRITE_NODE_FIELD(collation);
2668  WRITE_NODE_FIELD(opclass);
2669  WRITE_ENUM_FIELD(ordering, SortByDir);
2670  WRITE_ENUM_FIELD(nulls_ordering, SortByNulls);
2671 }
SortByDir
Definition: parsenodes.h:41
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
SortByNulls
Definition: parsenodes.h:49
#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 502 of file outfuncs.c.

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

Referenced by outNode().

503 {
504  WRITE_NODE_TYPE("INDEXONLYSCAN");
505 
506  _outScanInfo(str, (const Scan *) node);
507 
508  WRITE_OID_FIELD(indexid);
509  WRITE_NODE_FIELD(indexqual);
510  WRITE_NODE_FIELD(indexorderby);
511  WRITE_NODE_FIELD(indextlist);
512  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
513 }
#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:291
#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 2141 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().

2142 {
2143  WRITE_NODE_TYPE("INDEXOPTINFO");
2144 
2145  /* NB: this isn't a complete set of fields */
2146  WRITE_OID_FIELD(indexoid);
2147  /* Do NOT print rel field, else infinite recursion */
2148  WRITE_UINT_FIELD(pages);
2149  WRITE_FLOAT_FIELD(tuples, "%.0f");
2150  WRITE_INT_FIELD(tree_height);
2151  WRITE_INT_FIELD(ncolumns);
2152  /* array fields aren't really worth the trouble to print */
2153  WRITE_OID_FIELD(relam);
2154  /* indexprs is redundant since we print indextlist */
2155  WRITE_NODE_FIELD(indpred);
2156  WRITE_NODE_FIELD(indextlist);
2157  WRITE_NODE_FIELD(indrestrictinfo);
2158  WRITE_BOOL_FIELD(predOK);
2159  WRITE_BOOL_FIELD(unique);
2160  WRITE_BOOL_FIELD(immediate);
2161  WRITE_BOOL_FIELD(hypothetical);
2162  /* we don't bother with fields copied from the index AM's API struct */
2163 }
#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 1649 of file outfuncs.c.

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

Referenced by outNode().

1650 {
1651  WRITE_NODE_TYPE("INDEXPATH");
1652 
1653  _outPathInfo(str, (const Path *) node);
1654 
1655  WRITE_NODE_FIELD(indexinfo);
1656  WRITE_NODE_FIELD(indexclauses);
1657  WRITE_NODE_FIELD(indexquals);
1658  WRITE_NODE_FIELD(indexqualcols);
1659  WRITE_NODE_FIELD(indexorderbys);
1660  WRITE_NODE_FIELD(indexorderbycols);
1661  WRITE_ENUM_FIELD(indexscandir, ScanDirection);
1662  WRITE_FLOAT_FIELD(indextotalcost, "%.2f");
1663  WRITE_FLOAT_FIELD(indexselectivity, "%.4f");
1664 }
#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:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outIndexScan ( StringInfo  str,
const IndexScan node 
)
static

Definition at line 486 of file outfuncs.c.

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

Referenced by outNode().

487 {
488  WRITE_NODE_TYPE("INDEXSCAN");
489 
490  _outScanInfo(str, (const Scan *) node);
491 
492  WRITE_OID_FIELD(indexid);
493  WRITE_NODE_FIELD(indexqual);
494  WRITE_NODE_FIELD(indexqualorig);
495  WRITE_NODE_FIELD(indexorderby);
496  WRITE_NODE_FIELD(indexorderbyorig);
497  WRITE_NODE_FIELD(indexorderbyops);
498  WRITE_ENUM_FIELD(indexorderdir, ScanDirection);
499 }
#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:291
#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 2465 of file outfuncs.c.

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

Referenced by outNode().

2466 {
2467  WRITE_NODE_TYPE("INDEXSTMT");
2468 
2469  WRITE_STRING_FIELD(idxname);
2470  WRITE_NODE_FIELD(relation);
2471  WRITE_STRING_FIELD(accessMethod);
2472  WRITE_STRING_FIELD(tableSpace);
2473  WRITE_NODE_FIELD(indexParams);
2475  WRITE_NODE_FIELD(whereClause);
2476  WRITE_NODE_FIELD(excludeOpNames);
2477  WRITE_STRING_FIELD(idxcomment);
2478  WRITE_OID_FIELD(indexOid);
2479  WRITE_OID_FIELD(oldNode);
2480  WRITE_BOOL_FIELD(unique);
2481  WRITE_BOOL_FIELD(primary);
2482  WRITE_BOOL_FIELD(isconstraint);
2483  WRITE_BOOL_FIELD(deferrable);
2484  WRITE_BOOL_FIELD(initdeferred);
2485  WRITE_BOOL_FIELD(transformed);
2486  WRITE_BOOL_FIELD(concurrent);
2487  WRITE_BOOL_FIELD(if_not_exists);
2488 }
#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 1518 of file outfuncs.c.

References WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

1519 {
1520  WRITE_NODE_TYPE("INFERENCEELEM");
1521 
1522  WRITE_NODE_FIELD(expr);
1523  WRITE_OID_FIELD(infercollid);
1524  WRITE_OID_FIELD(inferopclass);
1525 }
#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 959 of file outfuncs.c.

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

Referenced by outNode().

960 {
961  WRITE_NODE_TYPE("INTOCLAUSE");
962 
963  WRITE_NODE_FIELD(rel);
964  WRITE_NODE_FIELD(colNames);
966  WRITE_ENUM_FIELD(onCommit, OnCommitAction);
967  WRITE_STRING_FIELD(tableSpaceName);
968  WRITE_NODE_FIELD(viewQuery);
969  WRITE_BOOL_FIELD(skipData);
970 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
OnCommitAction
Definition: primnodes.h:46
#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 635 of file outfuncs.c.

References _outJoinPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

636 {
637  WRITE_NODE_TYPE("JOIN");
638 
639  _outJoinPlanInfo(str, (const Join *) node);
640 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:302
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outJoinExpr ( StringInfo  str,
const JoinExpr node 
)
static

Definition at line 1550 of file outfuncs.c.

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

Referenced by outNode().

1551 {
1552  WRITE_NODE_TYPE("JOINEXPR");
1553 
1554  WRITE_ENUM_FIELD(jointype, JoinType);
1555  WRITE_BOOL_FIELD(isNatural);
1556  WRITE_NODE_FIELD(larg);
1557  WRITE_NODE_FIELD(rarg);
1558  WRITE_NODE_FIELD(usingClause);
1559  WRITE_NODE_FIELD(quals);
1560  WRITE_NODE_FIELD(alias);
1561  WRITE_INT_FIELD(rtindex);
1562 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
JoinType
Definition: nodes.h:665
#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 1630 of file outfuncs.c.

References _outPathInfo(), WRITE_ENUM_FIELD, and WRITE_NODE_FIELD.

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

1631 {
1632  _outPathInfo(str, (const Path *) node);
1633 
1634  WRITE_ENUM_FIELD(jointype, JoinType);
1635  WRITE_NODE_FIELD(outerjoinpath);
1636  WRITE_NODE_FIELD(innerjoinpath);
1637  WRITE_NODE_FIELD(joinrestrictinfo);
1638 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
JoinType
Definition: nodes.h:665
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outJoinPlanInfo ( StringInfo  str,
const Join node 
)
static

Definition at line 302 of file outfuncs.c.

References _outPlanInfo(), WRITE_ENUM_FIELD, and WRITE_NODE_FIELD.

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

303 {
304  _outPlanInfo(str, (const Plan *) node);
305 
306  WRITE_ENUM_FIELD(jointype, JoinType);
307  WRITE_NODE_FIELD(joinqual);
308 }
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
JoinType
Definition: nodes.h:665
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outLimit ( StringInfo  str,
const Limit node 
)
static

Definition at line 883 of file outfuncs.c.

References _outPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

884 {
885  WRITE_NODE_TYPE("LIMIT");
886 
887  _outPlanInfo(str, (const Plan *) node);
888 
889  WRITE_NODE_FIELD(limitOffset);
890  WRITE_NODE_FIELD(limitCount);
891 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#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 1976 of file outfuncs.c.

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

Referenced by outNode().

1977 {
1978  WRITE_NODE_TYPE("LIMITPATH");
1979 
1980  _outPathInfo(str, (const Path *) node);
1981 
1983  WRITE_NODE_FIELD(limitOffset);
1984  WRITE_NODE_FIELD(limitCount);
1985 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
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:559
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
#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:201
void outNode(StringInfo str, const void *obj)
Definition: outfuncs.c:3361
#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 2573 of file outfuncs.c.

References WRITE_ENUM_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2574 {
2575  WRITE_NODE_TYPE("LOCKINGCLAUSE");
2576 
2577  WRITE_NODE_FIELD(lockedRels);
2579  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
2580 }
#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 872 of file outfuncs.c.

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

Referenced by outNode().

873 {
874  WRITE_NODE_TYPE("LOCKROWS");
875 
876  _outPlanInfo(str, (const Plan *) node);
877 
878  WRITE_NODE_FIELD(rowMarks);
879  WRITE_INT_FIELD(epqParam);
880 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#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 1944 of file outfuncs.c.

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

Referenced by outNode().

1945 {
1946  WRITE_NODE_TYPE("LOCKROWSPATH");
1947 
1948  _outPathInfo(str, (const Path *) node);
1949 
1951  WRITE_NODE_FIELD(rowMarks);
1952  WRITE_INT_FIELD(epqParam);
1953 }
#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:1605
Definition: relation.h:888
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 776 of file outfuncs.c.

References _outPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

777 {
778  WRITE_NODE_TYPE("MATERIAL");
779 
780  _outPlanInfo(str, (const Plan *) node);
781 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outMaterialPath ( StringInfo  str,
const MaterialPath node 
)
static

Definition at line 1775 of file outfuncs.c.

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

Referenced by outNode().

1776 {
1777  WRITE_NODE_TYPE("MATERIALPATH");
1778 
1779  _outPathInfo(str, (const Path *) node);
1780 
1782 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
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 375 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().

376 {
377  int i;
378 
379  WRITE_NODE_TYPE("MERGEAPPEND");
380 
381  _outPlanInfo(str, (const Plan *) node);
382 
383  WRITE_NODE_FIELD(mergeplans);
384 
385  WRITE_INT_FIELD(numCols);
386 
387  appendStringInfoString(str, " :sortColIdx");
388  for (i = 0; i < node->numCols; i++)
389  appendStringInfo(str, " %d", node->sortColIdx[i]);
390 
391  appendStringInfoString(str, " :sortOperators");
392  for (i = 0; i < node->numCols; i++)
393  appendStringInfo(str, " %u", node->sortOperators[i]);
394 
395  appendStringInfoString(str, " :collations");
396  for (i = 0; i < node->numCols; i++)
397  appendStringInfo(str, " %u", node->collations[i]);
398 
399  appendStringInfoString(str, " :nullsFirst");
400  for (i = 0; i < node->numCols; i++)
401  appendStringInfo(str, " %s", booltostr(node->nullsFirst[i]));
402 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
Oid * collations
Definition: plannodes.h:246
#define booltostr(x)
Definition: outfuncs.c:101
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
AttrNumber * sortColIdx
Definition: plannodes.h:244
bool * nullsFirst
Definition: plannodes.h:247
int i
Oid * sortOperators
Definition: plannodes.h:245
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergeAppendPath ( StringInfo  str,
const MergeAppendPath node 
)
static

Definition at line 1754 of file outfuncs.c.

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

Referenced by outNode().

1755 {
1756  WRITE_NODE_TYPE("MERGEAPPENDPATH");
1757 
1758  _outPathInfo(str, (const Path *) node);
1759 
1760  WRITE_NODE_FIELD(subpaths);
1761  WRITE_FLOAT_FIELD(limit_tuples, "%.0f");
1762 }
#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:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMergeJoin ( StringInfo  str,
const MergeJoin node 
)
static

Definition at line 653 of file outfuncs.c.

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

Referenced by outNode().

654 {
655  int numCols;
656  int i;
657 
658  WRITE_NODE_TYPE("MERGEJOIN");
659 
660  _outJoinPlanInfo(str, (const Join *) node);
661 
662  WRITE_NODE_FIELD(mergeclauses);
663 
664  numCols = list_length(node->mergeclauses);
665 
666  appendStringInfoString(str, " :mergeFamilies");
667  for (i = 0; i < numCols; i++)
668  appendStringInfo(str, " %u", node->mergeFamilies[i]);
669 
670  appendStringInfoString(str, " :mergeCollations");
671  for (i = 0; i < numCols; i++)
672  appendStringInfo(str, " %u", node->mergeCollations[i]);
673 
674  appendStringInfoString(str, " :mergeStrategies");
675  for (i = 0; i < numCols; i++)
676  appendStringInfo(str, " %d", node->mergeStrategies[i]);
677 
678  appendStringInfoString(str, " :mergeNullsFirst");
679  for (i = 0; i < numCols; i++)
680  appendStringInfo(str, " %s", booltostr(node->mergeNullsFirst[i]));
681 }
#define booltostr(x)
Definition: outfuncs.c:101
List * mergeclauses
Definition: plannodes.h:661
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:302
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
Oid * mergeFamilies
Definition: plannodes.h:663
Oid * mergeCollations
Definition: plannodes.h:664
bool * mergeNullsFirst
Definition: plannodes.h:666
int * mergeStrategies
Definition: plannodes.h:665
#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 1996 of file outfuncs.c.

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

Referenced by outNode().

1997 {
1998  WRITE_NODE_TYPE("MERGEPATH");
1999 
2000  _outJoinPathInfo(str, (const JoinPath *) node);
2001 
2002  WRITE_NODE_FIELD(path_mergeclauses);
2003  WRITE_NODE_FIELD(outersortkeys);
2004  WRITE_NODE_FIELD(innersortkeys);
2005  WRITE_BOOL_FIELD(materialize_inner);
2006 }
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1630
#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 2364 of file outfuncs.c.

References WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_OID_FIELD.

Referenced by outNode().

2365 {
2366  WRITE_NODE_TYPE("MINMAXAGGINFO");
2367 
2368  WRITE_OID_FIELD(aggfnoid);
2369  WRITE_OID_FIELD(aggsortop);
2370  WRITE_NODE_FIELD(target);
2371  /* We intentionally omit subroot --- too large, not interesting enough */
2372  WRITE_NODE_FIELD(path);
2373  WRITE_FLOAT_FIELD(pathcost, "%.2f");
2374  WRITE_NODE_FIELD(param);
2375 }
#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 1891 of file outfuncs.c.

References _outPathInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

1892 {
1893  WRITE_NODE_TYPE("MINMAXAGGPATH");
1894 
1895  _outPathInfo(str, (const Path *) node);
1896 
1897  WRITE_NODE_FIELD(mmaggregates);
1898  WRITE_NODE_FIELD(quals);
1899 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMinMaxExpr ( StringInfo  str,
const MinMaxExpr node 
)
static

Definition at line 1412 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().

1413 {
1414  WRITE_NODE_TYPE("MINMAX");
1415 
1416  WRITE_OID_FIELD(minmaxtype);
1417  WRITE_OID_FIELD(minmaxcollid);
1418  WRITE_OID_FIELD(inputcollid);
1421  WRITE_LOCATION_FIELD(location);
1422 }
#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:1030
#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 338 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().

339 {
340  WRITE_NODE_TYPE("MODIFYTABLE");
341 
342  _outPlanInfo(str, (const Plan *) node);
343 
344  WRITE_ENUM_FIELD(operation, CmdType);
345  WRITE_BOOL_FIELD(canSetTag);
346  WRITE_UINT_FIELD(nominalRelation);
347  WRITE_NODE_FIELD(resultRelations);
348  WRITE_INT_FIELD(resultRelIndex);
349  WRITE_NODE_FIELD(plans);
350  WRITE_NODE_FIELD(withCheckOptionLists);
351  WRITE_NODE_FIELD(returningLists);
352  WRITE_NODE_FIELD(fdwPrivLists);
353  WRITE_BITMAPSET_FIELD(fdwDirectModifyPlans);
354  WRITE_NODE_FIELD(rowMarks);
355  WRITE_INT_FIELD(epqParam);
356  WRITE_ENUM_FIELD(onConflictAction, OnConflictAction);
357  WRITE_NODE_FIELD(arbiterIndexes);
358  WRITE_NODE_FIELD(onConflictSet);
359  WRITE_NODE_FIELD(onConflictWhere);
360  WRITE_UINT_FIELD(exclRelRTI);
361  WRITE_NODE_FIELD(exclRelTlist);
362 }
#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:270
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
OnConflictAction
Definition: nodes.h:790
CmdType
Definition: nodes.h:641
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outModifyTablePath ( StringInfo  str,
const ModifyTablePath node 
)
static

Definition at line 1956 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().

1957 {
1958  WRITE_NODE_TYPE("MODIFYTABLEPATH");
1959 
1960  _outPathInfo(str, (const Path *) node);
1961 
1962  WRITE_ENUM_FIELD(operation, CmdType);
1963  WRITE_BOOL_FIELD(canSetTag);
1964  WRITE_UINT_FIELD(nominalRelation);
1965  WRITE_NODE_FIELD(resultRelations);
1966  WRITE_NODE_FIELD(subpaths);
1967  WRITE_NODE_FIELD(subroots);
1968  WRITE_NODE_FIELD(withCheckOptionLists);
1969  WRITE_NODE_FIELD(returningLists);
1970  WRITE_NODE_FIELD(rowMarks);
1971  WRITE_NODE_FIELD(onconflict);
1972  WRITE_INT_FIELD(epqParam);
1973 }
#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:1605
CmdType
Definition: nodes.h:641
Definition: relation.h:888
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outMultiAssignRef ( StringInfo  str,
const MultiAssignRef node 
)
static

Definition at line 3123 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3124 {
3125  WRITE_NODE_TYPE("MULTIASSIGNREF");
3126 
3127  WRITE_NODE_FIELD(source);
3128  WRITE_INT_FIELD(colno);
3129  WRITE_INT_FIELD(ncolumns);
3130 }
#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 1106 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().

1107 {
1108  WRITE_NODE_TYPE("NAMEDARGEXPR");
1109 
1112  WRITE_INT_FIELD(argnumber);
1113  WRITE_LOCATION_FIELD(location);
1114 }
#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 _outNestLoop ( StringInfo  str,
const NestLoop node 
)
static

Definition at line 643 of file outfuncs.c.

References _outJoinPlanInfo(), WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

644 {
645  WRITE_NODE_TYPE("NESTLOOP");
646 
647  _outJoinPlanInfo(str, (const Join *) node);
648 
649  WRITE_NODE_FIELD(nestParams);
650 }
static void _outJoinPlanInfo(StringInfo str, const Join *node)
Definition: outfuncs.c:302
#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 894 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

895 {
896  WRITE_NODE_TYPE("NESTLOOPPARAM");
897 
898  WRITE_INT_FIELD(paramno);
899  WRITE_NODE_FIELD(paramval);
900 }
#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 1988 of file outfuncs.c.

References _outJoinPathInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

1989 {
1990  WRITE_NODE_TYPE("NESTPATH");
1991 
1992  _outJoinPathInfo(str, (const JoinPath *) node);
1993 }
static void _outJoinPathInfo(StringInfo str, const JoinPath *node)
Definition: outfuncs.c:1630
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outNotifyStmt ( StringInfo  str,
const NotifyStmt node 
)
static

Definition at line 2491 of file outfuncs.c.

References WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

2492 {
2493  WRITE_NODE_TYPE("NOTIFY");
2494 
2495  WRITE_STRING_FIELD(conditionname);
2496  WRITE_STRING_FIELD(payload);
2497 }
#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 1147 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().

1148 {
1149  WRITE_NODE_TYPE("NULLIFEXPR");
1150 
1151  WRITE_OID_FIELD(opno);
1152  WRITE_OID_FIELD(opfuncid);
1153  WRITE_OID_FIELD(opresulttype);
1154  WRITE_BOOL_FIELD(opretset);
1155  WRITE_OID_FIELD(opcollid);
1156  WRITE_OID_FIELD(inputcollid);
1158  WRITE_LOCATION_FIELD(location);
1159 }
#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 1452 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().

1453 {
1454  WRITE_NODE_TYPE("NULLTEST");
1455 
1457  WRITE_ENUM_FIELD(nulltesttype, NullTestType);
1458  WRITE_BOOL_FIELD(argisrow);
1459  WRITE_LOCATION_FIELD(location);
1460 }
#define WRITE_LOCATION_FIELD(fldname)
Definition: outfuncs.c:87
#define WRITE_ENUM_FIELD(fldname, enumtype)
Definition: outfuncs.c:68
NullTestType
Definition: primnodes.h:1148
#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 1574 of file outfuncs.c.

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

Referenced by outNode().

1575 {
1576  WRITE_NODE_TYPE("ONCONFLICTEXPR");
1577 
1579  WRITE_NODE_FIELD(arbiterElems);
1580  WRITE_NODE_FIELD(arbiterWhere);
1581  WRITE_OID_FIELD(constraint);
1582  WRITE_NODE_FIELD(onConflictSet);
1583  WRITE_NODE_FIELD(onConflictWhere);
1584  WRITE_INT_FIELD(exclRelIndex);
1585  WRITE_NODE_FIELD(exclRelTlist);
1586 }
#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:790
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outOpExpr ( StringInfo  str,
const OpExpr node 
)
static

Definition at line 1117 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().

1118 {
1119  WRITE_NODE_TYPE("OPEXPR");
1120 
1121  WRITE_OID_FIELD(opno);
1122  WRITE_OID_FIELD(opfuncid);
1123  WRITE_OID_FIELD(opresulttype);
1124  WRITE_BOOL_FIELD(opretset);
1125  WRITE_OID_FIELD(opcollid);
1126  WRITE_OID_FIELD(inputcollid);
1128  WRITE_LOCATION_FIELD(location);
1129 }
#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 1009 of file outfuncs.c.

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

Referenced by outNode().

1010 {
1011  WRITE_NODE_TYPE("PARAM");
1012 
1013  WRITE_ENUM_FIELD(paramkind, ParamKind);
1014  WRITE_INT_FIELD(paramid);
1015  WRITE_OID_FIELD(paramtype);
1016  WRITE_INT_FIELD(paramtypmod);
1017  WRITE_OID_FIELD(paramcollid);
1018  WRITE_LOCATION_FIELD(location);
1019 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
ParamKind
Definition: primnodes.h:211
#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 2267 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_FLOAT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2268 {
2269  WRITE_NODE_TYPE("PARAMPATHINFO");
2270 
2271  WRITE_BITMAPSET_FIELD(ppi_req_outer);
2272  WRITE_FLOAT_FIELD(ppi_rows, "%.0f");
2273  WRITE_NODE_FIELD(ppi_clauses);
2274 }
#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 3059 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_LOCATION_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3060 {
3061  WRITE_NODE_TYPE("PARAMREF");
3062 
3063  WRITE_INT_FIELD(number);
3064  WRITE_LOCATION_FIELD(location);
3065 }
#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 3337 of file outfuncs.c.

References WRITE_CHAR_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3338 {
3339  WRITE_NODE_TYPE("PARTITIONBOUND");
3340 
3341  WRITE_CHAR_FIELD(strategy);
3342  WRITE_NODE_FIELD(listdatums);
3343  WRITE_NODE_FIELD(lowerdatums);
3344  WRITE_NODE_FIELD(upperdatums);
3345 }
#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 _outPartitionElem ( StringInfo  str,
const PartitionElem node 
)
static

Definition at line 3325 of file outfuncs.c.

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

Referenced by outNode().

3326 {
3327  WRITE_NODE_TYPE("PARTITIONELEM");
3328 
3330  WRITE_NODE_FIELD(expr);
3331  WRITE_NODE_FIELD(collation);
3332  WRITE_NODE_FIELD(opclass);
3333  WRITE_LOCATION_FIELD(location);
3334 }
#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 3348 of file outfuncs.c.

References value, WRITE_BOOL_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

3349 {
3350  WRITE_NODE_TYPE("PARTRANGEDATUM");
3351 
3352  WRITE_BOOL_FIELD(infinite);
3354 }
static struct @76 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 3315 of file outfuncs.c.

References WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_STRING_FIELD.

Referenced by outNode().

3316 {
3317  WRITE_NODE_TYPE("PARTITIONBY");
3318 
3319  WRITE_STRING_FIELD(strategy);
3320  WRITE_NODE_FIELD(partParams);
3321  WRITE_LOCATION_FIELD(location);
3322 }
#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 1641 of file outfuncs.c.

References _outPathInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

1642 {
1643  WRITE_NODE_TYPE("PATH");
1644 
1645  _outPathInfo(str, (const Path *) node);
1646 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
static void _outPathInfo ( StringInfo  str,
const Path node 
)
static

Definition at line 1605 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(), _outGatherPath(), _outGroupingSetsPath(), _outGroupPath(), _outIndexPath(), _outJoinPathInfo(), _outLimitPath(), _outLockRowsPath(), _outMaterialPath(), _outMergeAppendPath(), _outMinMaxAggPath(), _outModifyTablePath(), _outPath(), _outProjectionPath(), _outProjectSetPath(), _outRecursiveUnionPath(), _outResultPath(), _outSetOpPath(), _outSortPath(), _outSubqueryScanPath(), _outTidPath(), _outUniquePath(), _outUpperUniquePath(), and _outWindowAggPath().

1606 {
1607  WRITE_ENUM_FIELD(pathtype, NodeTag);
1608  appendStringInfoString(str, " :parent_relids ");
1609  outBitmapset(str, node->parent->relids);
1610  if (node->pathtarget != node->parent->reltarget)
1611  WRITE_NODE_FIELD(pathtarget);
1612  appendStringInfoString(str, " :required_outer ");
1613  if (node->param_info)
1614  outBitmapset(str, node->param_info->ppi_req_outer);
1615  else
1616  outBitmapset(str, NULL);
1617  WRITE_BOOL_FIELD(parallel_aware);
1618  WRITE_BOOL_FIELD(parallel_safe);
1619  WRITE_INT_FIELD(parallel_workers);
1620  WRITE_FLOAT_FIELD(rows, "%.0f");
1621  WRITE_FLOAT_FIELD(startup_cost, "%.2f");
1622  WRITE_FLOAT_FIELD(total_cost, "%.2f");
1623  WRITE_NODE_FIELD(pathkeys);
1624 }
PathTarget * pathtarget
Definition: relation.h:895
#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:897
NodeTag
Definition: nodes.h:26
RelOptInfo * parent
Definition: relation.h:894
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
#define WRITE_BOOL_FIELD(fldname)
Definition: outfuncs.c:77
Relids relids
Definition: relation.h:490
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define NULL
Definition: c.h:226
void outBitmapset(StringInfo str, const Bitmapset *bms)
Definition: outfuncs.c:187
Relids ppi_req_outer
Definition: relation.h:853
struct PathTarget * reltarget
Definition: relation.h:501
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPathKey ( StringInfo  str,
const PathKey node 
)
static

Definition at line 2237 of file outfuncs.c.

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

Referenced by outNode().

2238 {
2239  WRITE_NODE_TYPE("PATHKEY");
2240 
2241  WRITE_NODE_FIELD(pk_eclass);
2242  WRITE_OID_FIELD(pk_opfamily);
2243  WRITE_INT_FIELD(pk_strategy);
2244  WRITE_BOOL_FIELD(pk_nulls_first);
2245 }
#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 2248 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().

2249 {
2250  WRITE_NODE_TYPE("PATHTARGET");
2251 
2252  WRITE_NODE_FIELD(exprs);
2253  if (node->sortgrouprefs)
2254  {
2255  int i;
2256 
2257  appendStringInfoString(str, " :sortgrouprefs");
2258  for (i = 0; i < list_length(node->exprs); i++)
2259  appendStringInfo(str, " %u", node->sortgrouprefs[i]);
2260  }
2261  WRITE_FLOAT_FIELD(cost.startup, "%.2f");
2262  WRITE_FLOAT_FIELD(cost.per_tuple, "%.2f");
2263  WRITE_INT_FIELD(width);
2264 }
#define WRITE_INT_FIELD(fldname)
Definition: outfuncs.c:48
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
void appendStringInfoString(StringInfo str, const char *s)
Definition: stringinfo.c:189
Index * sortgrouprefs
Definition: relation.h:825
#define WRITE_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
List * exprs
Definition: relation.h:824
#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 2351 of file outfuncs.c.

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

Referenced by outNode().

2352 {
2353  WRITE_NODE_TYPE("PLACEHOLDERINFO");
2354 
2355  WRITE_UINT_FIELD(phid);
2356  WRITE_NODE_FIELD(ph_var);
2357  WRITE_BITMAPSET_FIELD(ph_eval_at);
2358  WRITE_BITMAPSET_FIELD(ph_lateral);
2359  WRITE_BITMAPSET_FIELD(ph_needed);
2360  WRITE_INT_FIELD(ph_width);
2361 }
#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 2309 of file outfuncs.c.

References WRITE_BITMAPSET_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2310 {
2311  WRITE_NODE_TYPE("PLACEHOLDERVAR");
2312 
2313  WRITE_NODE_FIELD(phexpr);
2314  WRITE_BITMAPSET_FIELD(phrels);
2315  WRITE_UINT_FIELD(phid);
2316  WRITE_UINT_FIELD(phlevelsup);
2317 }
#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 312 of file outfuncs.c.

References _outPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

313 {
314  WRITE_NODE_TYPE("PLAN");
315 
316  _outPlanInfo(str, (const Plan *) node);
317 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPlanInfo ( StringInfo  str,
const Plan node 
)
static

Definition at line 270 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(), _outGroup(), _outHash(), _outJoinPlanInfo(), _outLimit(), _outLockRows(), _outMaterial(), _outMergeAppend(), _outModifyTable(), _outPlan(), _outProjectSet(), _outRecursiveUnion(), _outResult(), _outScanInfo(), _outSetOp(), _outSort(), _outUnique(), and _outWindowAgg().

271 {
272  WRITE_FLOAT_FIELD(startup_cost, "%.2f");
273  WRITE_FLOAT_FIELD(total_cost, "%.2f");
274  WRITE_FLOAT_FIELD(plan_rows, "%.0f");
275  WRITE_INT_FIELD(plan_width);
276  WRITE_BOOL_FIELD(parallel_aware);
277  WRITE_INT_FIELD(plan_node_id);
278  WRITE_NODE_FIELD(targetlist);
279  WRITE_NODE_FIELD(qual);
280  WRITE_NODE_FIELD(lefttree);
281  WRITE_NODE_FIELD(righttree);
282  WRITE_NODE_FIELD(initPlan);
283  WRITE_BITMAPSET_FIELD(extParam);
284  WRITE_BITMAPSET_FIELD(allParam);
285 }
#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 918 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

919 {
920  WRITE_NODE_TYPE("PLANINVALITEM");
921 
922  WRITE_INT_FIELD(cacheId);
923  WRITE_UINT_FIELD(hashValue);
924 }
#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(subplans);
256  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
257  WRITE_NODE_FIELD(rowMarks);
258  WRITE_NODE_FIELD(relationOids);
259  WRITE_NODE_FIELD(invalItems);
260  WRITE_INT_FIELD(nParamExec);
261  WRITE_NODE_FIELD(utilityStmt);
262  WRITE_LOCATION_FIELD(stmt_location);
263  WRITE_LOCATION_FIELD(stmt_len);
264 }
#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:641
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlannerGlobal ( StringInfo  str,
const PlannerGlobal node 
)
static

Definition at line 2020 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().

2021 {
2022  WRITE_NODE_TYPE("PLANNERGLOBAL");
2023 
2024  /* NB: this isn't a complete set of fields */
2025  WRITE_NODE_FIELD(subplans);
2026  WRITE_BITMAPSET_FIELD(rewindPlanIDs);
2027  WRITE_NODE_FIELD(finalrtable);
2028  WRITE_NODE_FIELD(finalrowmarks);
2029  WRITE_NODE_FIELD(resultRelations);
2030  WRITE_NODE_FIELD(relationOids);
2031  WRITE_NODE_FIELD(invalItems);
2032  WRITE_INT_FIELD(nParamExec);
2033  WRITE_UINT_FIELD(lastPHId);
2034  WRITE_UINT_FIELD(lastRowMarkId);
2035  WRITE_INT_FIELD(lastPlanNodeId);
2036  WRITE_BOOL_FIELD(transientPlan);
2037  WRITE_BOOL_FIELD(dependsOnRole);
2038  WRITE_BOOL_FIELD(parallelModeOK);
2039  WRITE_BOOL_FIELD(parallelModeNeeded);
2040  WRITE_CHAR_FIELD(maxParallelHazard);
2041 }
#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
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlannerInfo ( StringInfo  str,
const PlannerInfo node 
)
static

Definition at line 2044 of file outfuncs.c.

References parse(), WRITE_BITMAPSET_FIELD, WRITE_BOOL_FIELD, WRITE_FLOAT_FIELD, WRITE_INT_FIELD, WRITE_NODE_FIELD, WRITE_NODE_TYPE, and WRITE_UINT_FIELD.

Referenced by outNode().

2045 {
2046  WRITE_NODE_TYPE("PLANNERINFO");
2047 
2048  /* NB: this isn't a complete set of fields */
2050  WRITE_NODE_FIELD(glob);
2051  WRITE_UINT_FIELD(query_level);
2052  WRITE_NODE_FIELD(plan_params);
2053  WRITE_BITMAPSET_FIELD(outer_params);
2054  WRITE_BITMAPSET_FIELD(all_baserels);
2055  WRITE_BITMAPSET_FIELD(nullable_baserels);
2056  WRITE_NODE_FIELD(join_rel_list);
2057  WRITE_INT_FIELD(join_cur_level);
2058  WRITE_NODE_FIELD(init_plans);
2059  WRITE_NODE_FIELD(cte_plan_ids);
2060  WRITE_NODE_FIELD(multiexpr_params);
2061  WRITE_NODE_FIELD(eq_classes);
2062  WRITE_NODE_FIELD(canon_pathkeys);
2063  WRITE_NODE_FIELD(left_join_clauses);
2064  WRITE_NODE_FIELD(right_join_clauses);
2065  WRITE_NODE_FIELD(full_join_clauses);
2066  WRITE_NODE_FIELD(join_info_list);
2067  WRITE_NODE_FIELD(append_rel_list);
2068  WRITE_NODE_FIELD(rowMarks);
2069  WRITE_NODE_FIELD(placeholder_list);
2070  WRITE_NODE_FIELD(fkey_list);
2071  WRITE_NODE_FIELD(query_pathkeys);
2072  WRITE_NODE_FIELD(group_pathkeys);
2073  WRITE_NODE_FIELD(window_pathkeys);
2074  WRITE_NODE_FIELD(distinct_pathkeys);
2075  WRITE_NODE_FIELD(sort_pathkeys);
2076  WRITE_NODE_FIELD(processed_tlist);
2077  WRITE_NODE_FIELD(minmax_aggs);
2078  WRITE_FLOAT_FIELD(total_table_pages, "%.0f");
2079  WRITE_FLOAT_FIELD(tuple_fraction, "%.4f");
2080  WRITE_FLOAT_FIELD(limit_tuples, "%.0f");
2081  WRITE_UINT_FIELD(qual_security_level);
2082  WRITE_BOOL_FIELD(hasInheritedTarget);
2083  WRITE_BOOL_FIELD(hasJoinRTEs);
2084  WRITE_BOOL_FIELD(hasLateralRTEs);
2085  WRITE_BOOL_FIELD(hasDeletedRTEs);
2086  WRITE_BOOL_FIELD(hasHavingQual);
2087  WRITE_BOOL_FIELD(hasPseudoConstantQuals);
2088  WRITE_BOOL_FIELD(hasRecursion);
2089  WRITE_INT_FIELD(wt_param_id);
2090  WRITE_BITMAPSET_FIELD(curOuterRels);
2091  WRITE_NODE_FIELD(curOuterParams);
2092 }
#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_FLOAT_FIELD(fldname, format)
Definition: outfuncs.c:73
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static struct subre * parse(struct vars *, int, int, struct state *, struct state *)
Definition: regcomp.c:651
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outPlannerParamItem ( StringInfo  str,
const PlannerParamItem node 
)
static

Definition at line 2378 of file outfuncs.c.

References WRITE_INT_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2379 {
2380  WRITE_NODE_TYPE("PLANNERPARAMITEM");
2381 
2382  WRITE_NODE_FIELD(item);
2383  WRITE_INT_FIELD(paramId);
2384 }
#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 _outPlanRowMark ( StringInfo  str,
const PlanRowMark node 
)
static

Definition at line 903 of file outfuncs.c.

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

Referenced by outNode().

904 {
905  WRITE_NODE_TYPE("PLANROWMARK");
906 
907  WRITE_UINT_FIELD(rti);
908  WRITE_UINT_FIELD(prti);
909  WRITE_UINT_FIELD(rowmarkId);
910  WRITE_ENUM_FIELD(markType, RowMarkType);
911  WRITE_INT_FIELD(allMarkTypes);
913  WRITE_ENUM_FIELD(waitPolicy, LockWaitPolicy);
914  WRITE_BOOL_FIELD(isParent);
915 }
#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
LockClauseStrength
Definition: lockoptions.h:21
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
RowMarkType
Definition: plannodes.h:887
LockWaitPolicy
Definition: lockoptions.h:36
static void _outProjectionPath ( StringInfo  str,
const ProjectionPath node 
)
static

Definition at line 1809 of file outfuncs.c.

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

Referenced by outNode().

1810 {
1811  WRITE_NODE_TYPE("PROJECTIONPATH");
1812 
1813  _outPathInfo(str, (const Path *) node);
1814 
1816  WRITE_BOOL_FIELD(dummypp);
1817 }
#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:1605
Definition: relation.h:888
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outProjectSet ( StringInfo  str,
const ProjectSet node 
)
static

Definition at line 330 of file outfuncs.c.

References _outPlanInfo(), and WRITE_NODE_TYPE.

Referenced by outNode().

331 {
332  WRITE_NODE_TYPE("PROJECTSET");
333 
334  _outPlanInfo(str, (const Plan *) node);
335 }
static void _outPlanInfo(StringInfo str, const Plan *node)
Definition: outfuncs.c:270
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outProjectSetPath ( StringInfo  str,
const ProjectSetPath node 
)
static

Definition at line 1820 of file outfuncs.c.

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

Referenced by outNode().

1821 {
1822  WRITE_NODE_TYPE("PROJECTSETPATH");
1823 
1824  _outPathInfo(str, (const Path *) node);
1825 
1827 }
#define WRITE_NODE_TYPE(nodelabel)
Definition: outfuncs.c:44
static void _outPathInfo(StringInfo str, const Path *node)
Definition: outfuncs.c:1605
Definition: relation.h:888
Datum subpath(PG_FUNCTION_ARGS)
Definition: ltree_op.c:234
#define WRITE_NODE_FIELD(fldname)
Definition: outfuncs.c:91
static void _outQuery ( StringInfo  str,
const Query node 
)
static

Definition at line 2674 of file outfuncs.c.

References appendStringInfoString(), nodeTag, T_CreateStmt, T_DeclareCursorStmt, T_IndexStmt, T_NotifyStmt, Query::utilityStmt, WRITE_BOOL_FIELD, WRITE_ENUM_FIELD, WRITE_INT_FIELD, WRITE_LOCATION_FIELD, WRITE_NODE_FIELD, and WRITE_NODE_TYPE.

Referenced by outNode().

2675 {
2676  WRITE_NODE_TYPE("QUERY");
2677 
2678  WRITE_ENUM_FIELD(commandType, CmdType);
2679  WRITE_ENUM_FIELD(querySource, QuerySource);
2680  /* we intentionally do not print the queryId field */
2681  WRITE_BOOL_FIELD(canSetTag);
2682 
2683  /*
2684  * Hack to work around missing outfuncs routines for a lot of the
2685  * utility-statement node types. (The only one we actually *need* for
2686  * rules support is NotifyStmt.) Someday we ought to support 'em all, but
2687  * for the meantime do this to avoid getting lots of warnings when running
2688  * with debug_print_parse on.
2689  */
2690  if (node->utilityStmt)
2691  {
2692  switch (nodeTag(node->utilityStmt))
2693  {
2694  case T_CreateStmt:
2695  case T_IndexStmt:
2696  case T_NotifyStmt:
2697  case T_DeclareCursorStmt:
2698  WRITE_NODE_FIELD(utilityStmt);
2699  break;
2700  default:
2701  appendStringInfoString(str, " :utilityStmt ?");
2702  break;
2703  }
2704  }
2705  else
2706  appendStringInfoString(str, " :utilityStmt <>");
2707 
2708  WRITE_INT_FIELD(resultRelation);
2709  WRITE_BOOL_FIELD(hasAggs);
2710  WRITE_BOOL_FIELD(hasWindowFuncs);
2711  WRITE_BOOL_FIELD(hasTargetSRFs);
2712  WRITE_BOOL_FIELD(hasSubLinks);
2713  WRITE_BOOL_FIELD(hasDistinctOn);
2714  WRITE_BOOL_FIELD(hasRecursive);
2715  WRITE_BOOL_FIELD(hasModifyingCTE);
2716  WRITE_BOOL_FIELD(hasForUpdate);
2717  WRITE_BOOL_FIELD(hasRowSecurity);
2718  WRITE_NODE_FIELD(cteList);
2719  WRITE_NODE_FIELD(rtable);
2720  WRITE_NODE_FIELD(jointree);
2721  WRITE_NODE_FIELD(targetList);
2722  WRITE_NODE_FIELD(onConflict);
2723  WRITE_NODE_FIELD(returningList);
2724  WRITE_NODE_FIELD(groupClause);
2725  WRITE_NODE_FIELD(groupingSets);
2726  WRITE_NODE_FIELD(havingQual);
2727  WRITE_NODE_FIELD(windowClause);
2728  WRITE_NODE_FIELD(distinctClause);
2729  WRITE_NODE_FIELD(sortClause);
2730  WRITE_NODE_FIELD(limitOffset);
2731  WRITE_NODE_FIELD(limitCount);
2732  WRITE_NODE_FIELD(rowMarks);
2733  WRITE_NODE_FIELD(setOperations);
2734  WRITE_NODE_FIELD(constraintDeps);
2735  /* withCheckOptions intentionally omitted, see comment in parsenodes.h */
2736  WRITE_LOCATION_FIELD(stmt_location);
2737  WRITE_LOCATION_FIELD(stmt_len);
2738 }
#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
QuerySource
Definition: parsenodes.h:31
Node * utilityStmt
Definition: parsenodes.h:111
Definition: