PostgreSQL Source Code  git master
readfuncs.c File Reference
#include "postgres.h"
#include <math.h>
#include "fmgr.h"
#include "nodes/extensible.h"
#include "nodes/parsenodes.h"
#include "nodes/plannodes.h"
#include "nodes/readfuncs.h"
#include "utils/builtins.h"
Include dependency graph for readfuncs.c:

Go to the source code of this file.

Macros

#define READ_LOCALS_NO_FIELDS(nodeTypeName)   nodeTypeName *local_node = makeNode(nodeTypeName)
 
#define READ_TEMP_LOCALS()
 
#define READ_LOCALS(nodeTypeName)
 
#define READ_INT_FIELD(fldname)
 
#define READ_UINT_FIELD(fldname)
 
#define READ_UINT64_FIELD(fldname)
 
#define READ_LONG_FIELD(fldname)
 
#define READ_OID_FIELD(fldname)
 
#define READ_CHAR_FIELD(fldname)
 
#define READ_ENUM_FIELD(fldname, enumtype)
 
#define READ_FLOAT_FIELD(fldname)
 
#define READ_BOOL_FIELD(fldname)
 
#define READ_STRING_FIELD(fldname)
 
#define READ_LOCATION_FIELD(fldname)
 
#define READ_NODE_FIELD(fldname)
 
#define READ_BITMAPSET_FIELD(fldname)
 
#define READ_ATTRNUMBER_ARRAY(fldname, len)
 
#define READ_OID_ARRAY(fldname, len)
 
#define READ_INT_ARRAY(fldname, len)
 
#define READ_BOOL_ARRAY(fldname, len)
 
#define READ_DONE()   return local_node
 
#define atoui(x)   ((unsigned int) strtoul((x), NULL, 10))
 
#define strtobool(x)   ((*(x) == 't') ? true : false)
 
#define nullable_string(token, length)   ((length) == 0 ? NULL : debackslash(token, length))
 
#define MATCH(tokname, namelen)   (length == namelen && memcmp(token, tokname, namelen) == 0)
 

Functions

static Bitmapset_readBitmapset (void)
 
BitmapsetreadBitmapset (void)
 
static Query_readQuery (void)
 
static NotifyStmt_readNotifyStmt (void)
 
static DeclareCursorStmt_readDeclareCursorStmt (void)
 
static WithCheckOption_readWithCheckOption (void)
 
static SortGroupClause_readSortGroupClause (void)
 
static GroupingSet_readGroupingSet (void)
 
static WindowClause_readWindowClause (void)
 
static RowMarkClause_readRowMarkClause (void)
 
static CommonTableExpr_readCommonTableExpr (void)
 
static SetOperationStmt_readSetOperationStmt (void)
 
static Alias_readAlias (void)
 
static RangeVar_readRangeVar (void)
 
static TableFunc_readTableFunc (void)
 
static IntoClause_readIntoClause (void)
 
static Var_readVar (void)
 
static Const_readConst (void)
 
static Param_readParam (void)
 
static Aggref_readAggref (void)
 
static GroupingFunc_readGroupingFunc (void)
 
static WindowFunc_readWindowFunc (void)
 
static ArrayRef_readArrayRef (void)
 
static FuncExpr_readFuncExpr (void)
 
static NamedArgExpr_readNamedArgExpr (void)
 
static OpExpr_readOpExpr (void)
 
static DistinctExpr_readDistinctExpr (void)
 
static NullIfExpr_readNullIfExpr (void)
 
static ScalarArrayOpExpr_readScalarArrayOpExpr (void)
 
static BoolExpr_readBoolExpr (void)
 
static SubLink_readSubLink (void)
 
static FieldSelect_readFieldSelect (void)
 
static FieldStore_readFieldStore (void)
 
static RelabelType_readRelabelType (void)
 
static CoerceViaIO_readCoerceViaIO (void)
 
static ArrayCoerceExpr_readArrayCoerceExpr (void)
 
static ConvertRowtypeExpr_readConvertRowtypeExpr (void)
 
static CollateExpr_readCollateExpr (void)
 
static CaseExpr_readCaseExpr (void)
 
static CaseWhen_readCaseWhen (void)
 
static CaseTestExpr_readCaseTestExpr (void)
 
static ArrayExpr_readArrayExpr (void)
 
static RowExpr_readRowExpr (void)
 
static RowCompareExpr_readRowCompareExpr (void)
 
static CoalesceExpr_readCoalesceExpr (void)
 
static MinMaxExpr_readMinMaxExpr (void)
 
static SQLValueFunction_readSQLValueFunction (void)
 
static XmlExpr_readXmlExpr (void)
 
static NullTest_readNullTest (void)
 
static BooleanTest_readBooleanTest (void)
 
static CoerceToDomain_readCoerceToDomain (void)
 
static CoerceToDomainValue_readCoerceToDomainValue (void)
 
static SetToDefault_readSetToDefault (void)
 
static CurrentOfExpr_readCurrentOfExpr (void)
 
static NextValueExpr_readNextValueExpr (void)
 
static InferenceElem_readInferenceElem (void)
 
static TargetEntry_readTargetEntry (void)
 
static RangeTblRef_readRangeTblRef (void)
 
static JoinExpr_readJoinExpr (void)
 
static FromExpr_readFromExpr (void)
 
static OnConflictExpr_readOnConflictExpr (void)
 
static RangeTblEntry_readRangeTblEntry (void)
 
static RangeTblFunction_readRangeTblFunction (void)
 
static TableSampleClause_readTableSampleClause (void)
 
static DefElem_readDefElem (void)
 
static PlannedStmt_readPlannedStmt (void)
 
static void ReadCommonPlan (Plan *local_node)
 
static Plan_readPlan (void)
 
static Result_readResult (void)
 
static ProjectSet_readProjectSet (void)
 
static ModifyTable_readModifyTable (void)
 
static Append_readAppend (void)
 
static MergeAppend_readMergeAppend (void)
 
static RecursiveUnion_readRecursiveUnion (void)
 
static BitmapAnd_readBitmapAnd (void)
 
static BitmapOr_readBitmapOr (void)
 
static void ReadCommonScan (Scan *local_node)
 
static Scan_readScan (void)
 
static SeqScan_readSeqScan (void)
 
static SampleScan_readSampleScan (void)
 
static IndexScan_readIndexScan (void)
 
static IndexOnlyScan_readIndexOnlyScan (void)
 
static BitmapIndexScan_readBitmapIndexScan (void)
 
static BitmapHeapScan_readBitmapHeapScan (void)
 
static TidScan_readTidScan (void)
 
static SubqueryScan_readSubqueryScan (void)
 
static FunctionScan_readFunctionScan (void)
 
static ValuesScan_readValuesScan (void)
 
static TableFuncScan_readTableFuncScan (void)
 
static CteScan_readCteScan (void)
 
static WorkTableScan_readWorkTableScan (void)
 
static ForeignScan_readForeignScan (void)
 
static CustomScan_readCustomScan (void)
 
static void ReadCommonJoin (Join *local_node)
 
static Join_readJoin (void)
 
static NestLoop_readNestLoop (void)
 
static MergeJoin_readMergeJoin (void)
 
static HashJoin_readHashJoin (void)
 
static Material_readMaterial (void)
 
static Sort_readSort (void)
 
static Group_readGroup (void)
 
static Agg_readAgg (void)
 
static WindowAgg_readWindowAgg (void)
 
static Unique_readUnique (void)
 
static Gather_readGather (void)
 
static GatherMerge_readGatherMerge (void)
 
static Hash_readHash (void)
 
static SetOp_readSetOp (void)
 
static LockRows_readLockRows (void)
 
static Limit_readLimit (void)
 
static NestLoopParam_readNestLoopParam (void)
 
static PlanRowMark_readPlanRowMark (void)
 
static PlanInvalItem_readPlanInvalItem (void)
 
static SubPlan_readSubPlan (void)
 
static AlternativeSubPlan_readAlternativeSubPlan (void)
 
static ExtensibleNode_readExtensibleNode (void)
 
static PartitionBoundSpec_readPartitionBoundSpec (void)
 
static PartitionRangeDatum_readPartitionRangeDatum (void)
 
NodeparseNodeString (void)
 
Datum readDatum (bool typbyval)
 
AttrNumberreadAttrNumberCols (int numCols)
 
OidreadOidCols (int numCols)
 
int * readIntCols (int numCols)
 
boolreadBoolCols (int numCols)
 

Macro Definition Documentation

◆ atoui

#define atoui (   x)    ((unsigned int) strtoul((x), NULL, 10))

Definition at line 173 of file readfuncs.c.

Referenced by readDatum().

◆ MATCH

#define MATCH (   tokname,
  namelen 
)    (length == namelen && memcmp(token, tokname, namelen) == 0)

Referenced by parseNodeString().

◆ nullable_string

#define nullable_string (   token,
  length 
)    ((length) == 0 ? NULL : debackslash(token, length))

Definition at line 177 of file readfuncs.c.

Referenced by _readCustomScan(), and _readExtensibleNode().

◆ READ_ATTRNUMBER_ARRAY

#define READ_ATTRNUMBER_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readAttrNumberCols(len);
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
AttrNumber * readAttrNumberCols(int numCols)
Definition: readfuncs.c:2749

Definition at line 143 of file readfuncs.c.

Referenced by _readAgg(), _readGatherMerge(), _readGroup(), _readMergeAppend(), _readRecursiveUnion(), _readSetOp(), _readSort(), _readUnique(), and _readWindowAgg().

◆ READ_BITMAPSET_FIELD

#define READ_BITMAPSET_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
(void) token; /* in case not used elsewhere */ \
local_node->fldname = _readBitmapset()
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
static Bitmapset * _readBitmapset(void)
Definition: readfuncs.c:185

Definition at line 137 of file readfuncs.c.

Referenced by _readAgg(), _readCustomScan(), _readForeignScan(), _readGather(), _readGatherMerge(), _readModifyTable(), _readPlannedStmt(), _readRangeTblEntry(), _readRangeTblFunction(), _readTableFunc(), and ReadCommonPlan().

◆ READ_BOOL_ARRAY

#define READ_BOOL_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readBoolCols(len);
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
bool * readBoolCols(int numCols)
Definition: readfuncs.c:2821

Definition at line 158 of file readfuncs.c.

Referenced by _readGatherMerge(), _readMergeAppend(), _readMergeJoin(), and _readSort().

◆ READ_BOOL_FIELD

◆ READ_CHAR_FIELD

#define READ_CHAR_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
/* avoid overhead of calling debackslash() for one char */ \
local_node->fldname = (length == 0) ? '\0' : (token[0] == '\\' ? token[1] : token[0])
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 93 of file readfuncs.c.

Referenced by _readAggref(), _readPartitionBoundSpec(), _readRangeTblEntry(), and _readRangeVar().

◆ READ_DONE

#define READ_DONE ( )    return local_node

Definition at line 163 of file readfuncs.c.

Referenced by _readAgg(), _readAggref(), _readAlias(), _readAlternativeSubPlan(), _readAppend(), _readArrayCoerceExpr(), _readArrayExpr(), _readArrayRef(), _readBitmapAnd(), _readBitmapHeapScan(), _readBitmapIndexScan(), _readBitmapOr(), _readBooleanTest(), _readBoolExpr(), _readCaseExpr(), _readCaseTestExpr(), _readCaseWhen(), _readCoalesceExpr(), _readCoerceToDomain(), _readCoerceToDomainValue(), _readCoerceViaIO(), _readCollateExpr(), _readCommonTableExpr(), _readConst(), _readConvertRowtypeExpr(), _readCteScan(), _readCurrentOfExpr(), _readCustomScan(), _readDeclareCursorStmt(), _readDefElem(), _readDistinctExpr(), _readExtensibleNode(), _readFieldSelect(), _readFieldStore(), _readForeignScan(), _readFromExpr(), _readFuncExpr(), _readFunctionScan(), _readGather(), _readGatherMerge(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoin(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _readNextValueExpr(), _readNotifyStmt(), _readNullIfExpr(), _readNullTest(), _readOnConflictExpr(), _readOpExpr(), _readParam(), _readPartitionBoundSpec(), _readPartitionRangeDatum(), _readPlan(), _readPlanInvalItem(), _readPlannedStmt(), _readPlanRowMark(), _readProjectSet(), _readQuery(), _readRangeTblEntry(), _readRangeTblFunction(), _readRangeTblRef(), _readRangeVar(), _readRecursiveUnion(), _readRelabelType(), _readResult(), _readRowCompareExpr(), _readRowExpr(), _readRowMarkClause(), _readSampleScan(), _readScalarArrayOpExpr(), _readScan(), _readSeqScan(), _readSetOp(), _readSetOperationStmt(), _readSetToDefault(), _readSort(), _readSortGroupClause(), _readSQLValueFunction(), _readSubLink(), _readSubPlan(), _readSubqueryScan(), _readTableFunc(), _readTableFuncScan(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), and _readXmlExpr().

◆ READ_ENUM_FIELD

◆ READ_FLOAT_FIELD

#define READ_FLOAT_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atof(token)
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 106 of file readfuncs.c.

Referenced by _readRangeTblEntry(), _readSubPlan(), and ReadCommonPlan().

◆ READ_INT_ARRAY

#define READ_INT_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readIntCols(len);
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
int * readIntCols(int numCols)
Definition: readfuncs.c:2797

Definition at line 153 of file readfuncs.c.

Referenced by _readMergeJoin().

◆ READ_INT_FIELD

◆ READ_LOCALS

#define READ_LOCALS (   nodeTypeName)
Value:
READ_LOCALS_NO_FIELDS(nodeTypeName); \
READ_TEMP_LOCALS()
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49

Definition at line 58 of file readfuncs.c.

Referenced by _readAgg(), _readAggref(), _readAlias(), _readAlternativeSubPlan(), _readAppend(), _readArrayCoerceExpr(), _readArrayExpr(), _readArrayRef(), _readBitmapAnd(), _readBitmapHeapScan(), _readBitmapIndexScan(), _readBitmapOr(), _readBooleanTest(), _readBoolExpr(), _readCaseExpr(), _readCaseTestExpr(), _readCaseWhen(), _readCoalesceExpr(), _readCoerceToDomain(), _readCoerceToDomainValue(), _readCoerceViaIO(), _readCollateExpr(), _readCommonTableExpr(), _readConst(), _readConvertRowtypeExpr(), _readCteScan(), _readCurrentOfExpr(), _readCustomScan(), _readDeclareCursorStmt(), _readDefElem(), _readDistinctExpr(), _readFieldSelect(), _readFieldStore(), _readForeignScan(), _readFromExpr(), _readFuncExpr(), _readFunctionScan(), _readGather(), _readGatherMerge(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _readNextValueExpr(), _readNotifyStmt(), _readNullIfExpr(), _readNullTest(), _readOnConflictExpr(), _readOpExpr(), _readParam(), _readPartitionBoundSpec(), _readPartitionRangeDatum(), _readPlanInvalItem(), _readPlannedStmt(), _readPlanRowMark(), _readQuery(), _readRangeTblEntry(), _readRangeTblFunction(), _readRangeTblRef(), _readRangeVar(), _readRecursiveUnion(), _readRelabelType(), _readResult(), _readRowCompareExpr(), _readRowExpr(), _readRowMarkClause(), _readSampleScan(), _readScalarArrayOpExpr(), _readSetOp(), _readSetOperationStmt(), _readSetToDefault(), _readSort(), _readSortGroupClause(), _readSQLValueFunction(), _readSubLink(), _readSubPlan(), _readSubqueryScan(), _readTableFunc(), _readTableFuncScan(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), and _readXmlExpr().

◆ READ_LOCALS_NO_FIELDS

#define READ_LOCALS_NO_FIELDS (   nodeTypeName)    nodeTypeName *local_node = makeNode(nodeTypeName)

◆ READ_LOCATION_FIELD

◆ READ_LONG_FIELD

#define READ_LONG_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atol(token)
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 81 of file readfuncs.c.

Referenced by _readAgg(), _readRecursiveUnion(), and _readSetOp().

◆ READ_NODE_FIELD

#define READ_NODE_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
(void) token; /* in case not used elsewhere */ \
local_node->fldname = nodeRead(NULL, 0)
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
void * nodeRead(char *token, int tok_len)
Definition: read.c:278

Definition at line 131 of file readfuncs.c.

Referenced by _readAgg(), _readAggref(), _readAlias(), _readAlternativeSubPlan(), _readAppend(), _readArrayCoerceExpr(), _readArrayExpr(), _readArrayRef(), _readBitmapAnd(), _readBitmapHeapScan(), _readBitmapIndexScan(), _readBitmapOr(), _readBooleanTest(), _readBoolExpr(), _readCaseExpr(), _readCaseWhen(), _readCoalesceExpr(), _readCoerceToDomain(), _readCoerceViaIO(), _readCollateExpr(), _readCommonTableExpr(), _readConvertRowtypeExpr(), _readCustomScan(), _readDeclareCursorStmt(), _readDefElem(), _readDistinctExpr(), _readFieldSelect(), _readFieldStore(), _readForeignScan(), _readFromExpr(), _readFuncExpr(), _readFunctionScan(), _readGroupingFunc(), _readGroupingSet(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _readNullIfExpr(), _readNullTest(), _readOnConflictExpr(), _readOpExpr(), _readPartitionBoundSpec(), _readPartitionRangeDatum(), _readPlannedStmt(), _readQuery(), _readRangeTblEntry(), _readRangeTblFunction(), _readRangeVar(), _readRelabelType(), _readResult(), _readRowCompareExpr(), _readRowExpr(), _readSampleScan(), _readScalarArrayOpExpr(), _readSetOperationStmt(), _readSubLink(), _readSubPlan(), _readSubqueryScan(), _readTableFunc(), _readTableFuncScan(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readValuesScan(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readXmlExpr(), ReadCommonJoin(), and ReadCommonPlan().

◆ READ_OID_ARRAY

#define READ_OID_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readOidCols(len);
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
Oid * readOidCols(int numCols)
Definition: readfuncs.c:2773

Definition at line 148 of file readfuncs.c.

Referenced by _readAgg(), _readGatherMerge(), _readGroup(), _readMergeAppend(), _readMergeJoin(), _readRecursiveUnion(), _readSetOp(), _readSort(), _readUnique(), and _readWindowAgg().

◆ READ_OID_FIELD

◆ READ_STRING_FIELD

#define READ_STRING_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = nullable_string(token, length)
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define nullable_string(token, length)
Definition: readfuncs.c:177

Definition at line 118 of file readfuncs.c.

Referenced by _readAlias(), _readCommonTableExpr(), _readCurrentOfExpr(), _readDeclareCursorStmt(), _readDefElem(), _readIntoClause(), _readNamedArgExpr(), _readNotifyStmt(), _readRangeTblEntry(), _readRangeVar(), _readSubPlan(), _readTargetEntry(), _readWindowClause(), _readWithCheckOption(), and _readXmlExpr().

◆ READ_TEMP_LOCALS

#define READ_TEMP_LOCALS ( )
Value:
char *token; \
int length
int length(const List *list)
Definition: list.c:1309

Definition at line 53 of file readfuncs.c.

Referenced by _readBitmapset(), _readExtensibleNode(), parseNodeString(), ReadCommonJoin(), ReadCommonPlan(), and ReadCommonScan().

◆ READ_UINT64_FIELD

#define READ_UINT64_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = pg_strtouint64(token, NULL, 10)
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
uint64 pg_strtouint64(const char *str, char **endptr, int base)
Definition: numutils.c:405

Definition at line 75 of file readfuncs.c.

Referenced by _readPlannedStmt().

◆ READ_UINT_FIELD

#define READ_UINT_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atoui(token)
#define atoui(x)
Definition: readfuncs.c:173
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 69 of file readfuncs.c.

Referenced by _readAggref(), _readCurrentOfExpr(), _readCustomScan(), _readGroupingFunc(), _readModifyTable(), _readPlanInvalItem(), _readPlanRowMark(), _readRangeTblEntry(), _readRowMarkClause(), _readSortGroupClause(), _readTargetEntry(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), and ReadCommonScan().

◆ strtobool

#define strtobool (   x)    ((*(x) == 't') ? true : false)

Definition at line 175 of file readfuncs.c.

Referenced by readBoolCols().

Function Documentation

◆ _readAgg()

static Agg* _readAgg ( void  )
static

Definition at line 2102 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_BITMAPSET_FIELD, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LONG_FIELD, READ_NODE_FIELD, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2103 {
2104  READ_LOCALS(Agg);
2105 
2106  ReadCommonPlan(&local_node->plan);
2107 
2108  READ_ENUM_FIELD(aggstrategy, AggStrategy);
2109  READ_ENUM_FIELD(aggsplit, AggSplit);
2110  READ_INT_FIELD(numCols);
2111  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2112  READ_OID_ARRAY(grpOperators, local_node->numCols);
2113  READ_LONG_FIELD(numGroups);
2114  READ_BITMAPSET_FIELD(aggParams);
2115  READ_NODE_FIELD(groupingSets);
2116  READ_NODE_FIELD(chain);
2117 
2118  READ_DONE();
2119 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:81
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
AggSplit
Definition: nodes.h:760
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
AggStrategy
Definition: nodes.h:738
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
Definition: plannodes.h:781
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readAggref()

static Aggref* _readAggref ( void  )
static

Definition at line 578 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_CHAR_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, READ_OID_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

579 {
581 
582  READ_OID_FIELD(aggfnoid);
583  READ_OID_FIELD(aggtype);
584  READ_OID_FIELD(aggcollid);
585  READ_OID_FIELD(inputcollid);
586  READ_OID_FIELD(aggtranstype);
587  READ_NODE_FIELD(aggargtypes);
588  READ_NODE_FIELD(aggdirectargs);
590  READ_NODE_FIELD(aggorder);
591  READ_NODE_FIELD(aggdistinct);
592  READ_NODE_FIELD(aggfilter);
593  READ_BOOL_FIELD(aggstar);
594  READ_BOOL_FIELD(aggvariadic);
595  READ_CHAR_FIELD(aggkind);
596  READ_UINT_FIELD(agglevelsup);
597  READ_ENUM_FIELD(aggsplit, AggSplit);
598  READ_LOCATION_FIELD(location);
599 
600  READ_DONE();
601 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:93
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
AggSplit
Definition: nodes.h:760
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readAlias()

static Alias* _readAlias ( void  )
static

Definition at line 442 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

443 {
445 
446  READ_STRING_FIELD(aliasname);
447  READ_NODE_FIELD(colnames);
448 
449  READ_DONE();
450 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readAlternativeSubPlan()

static AlternativeSubPlan* _readAlternativeSubPlan ( void  )
static

Definition at line 2354 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

2355 {
2357 
2358  READ_NODE_FIELD(subplans);
2359 
2360  READ_DONE();
2361 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readAppend()

static Append* _readAppend ( void  )
static

Definition at line 1595 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

1596 {
1598 
1599  ReadCommonPlan(&local_node->plan);
1600 
1601  READ_NODE_FIELD(partitioned_rels);
1602  READ_NODE_FIELD(appendplans);
1603  READ_INT_FIELD(first_partial_plan);
1604 
1605  READ_DONE();
1606 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readArrayCoerceExpr()

static ArrayCoerceExpr* _readArrayCoerceExpr ( void  )
static

Definition at line 897 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

898 {
900 
902  READ_NODE_FIELD(elemexpr);
903  READ_OID_FIELD(resulttype);
904  READ_INT_FIELD(resulttypmod);
905  READ_OID_FIELD(resultcollid);
906  READ_ENUM_FIELD(coerceformat, CoercionForm);
907  READ_LOCATION_FIELD(location);
908 
909  READ_DONE();
910 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
CoercionForm
Definition: primnodes.h:436

◆ _readArrayExpr()

static ArrayExpr* _readArrayExpr ( void  )
static

Definition at line 995 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

996 {
998 
999  READ_OID_FIELD(array_typeid);
1000  READ_OID_FIELD(array_collid);
1001  READ_OID_FIELD(element_typeid);
1002  READ_NODE_FIELD(elements);
1003  READ_BOOL_FIELD(multidims);
1004  READ_LOCATION_FIELD(location);
1005 
1006  READ_DONE();
1007 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readArrayRef()

static ArrayRef* _readArrayRef ( void  )
static

Definition at line 646 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

647 {
649 
650  READ_OID_FIELD(refarraytype);
651  READ_OID_FIELD(refelemtype);
652  READ_INT_FIELD(reftypmod);
653  READ_OID_FIELD(refcollid);
654  READ_NODE_FIELD(refupperindexpr);
655  READ_NODE_FIELD(reflowerindexpr);
656  READ_NODE_FIELD(refexpr);
657  READ_NODE_FIELD(refassgnexpr);
658 
659  READ_DONE();
660 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readBitmapAnd()

static BitmapAnd* _readBitmapAnd ( void  )
static

Definition at line 1652 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

1653 {
1655 
1656  ReadCommonPlan(&local_node->plan);
1657 
1658  READ_NODE_FIELD(bitmapplans);
1659 
1660  READ_DONE();
1661 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readBitmapHeapScan()

static BitmapHeapScan* _readBitmapHeapScan ( void  )
static

Definition at line 1796 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1797 {
1799 
1800  ReadCommonScan(&local_node->scan);
1801 
1802  READ_NODE_FIELD(bitmapqualorig);
1803 
1804  READ_DONE();
1805 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readBitmapIndexScan()

static BitmapIndexScan* _readBitmapIndexScan ( void  )
static

Definition at line 1778 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1779 {
1781 
1782  ReadCommonScan(&local_node->scan);
1783 
1784  READ_OID_FIELD(indexid);
1785  READ_BOOL_FIELD(isshared);
1786  READ_NODE_FIELD(indexqual);
1787  READ_NODE_FIELD(indexqualorig);
1788 
1789  READ_DONE();
1790 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readBitmapOr()

static BitmapOr* _readBitmapOr ( void  )
static

Definition at line 1667 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

1668 {
1670 
1671  ReadCommonPlan(&local_node->plan);
1672 
1673  READ_BOOL_FIELD(isshared);
1674  READ_NODE_FIELD(bitmapplans);
1675 
1676  READ_DONE();
1677 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readBitmapset()

static Bitmapset* _readBitmapset ( void  )
static

Definition at line 185 of file readfuncs.c.

References bms_add_member(), elog, ERROR, length(), pg_strtok(), READ_TEMP_LOCALS, and val.

Referenced by readBitmapset().

186 {
187  Bitmapset *result = NULL;
188 
190 
191  token = pg_strtok(&length);
192  if (token == NULL)
193  elog(ERROR, "incomplete Bitmapset structure");
194  if (length != 1 || token[0] != '(')
195  elog(ERROR, "unrecognized token: \"%.*s\"", length, token);
196 
197  token = pg_strtok(&length);
198  if (token == NULL)
199  elog(ERROR, "incomplete Bitmapset structure");
200  if (length != 1 || token[0] != 'b')
201  elog(ERROR, "unrecognized token: \"%.*s\"", length, token);
202 
203  for (;;)
204  {
205  int val;
206  char *endptr;
207 
208  token = pg_strtok(&length);
209  if (token == NULL)
210  elog(ERROR, "unterminated Bitmapset structure");
211  if (length == 1 && token[0] == ')')
212  break;
213  val = (int) strtol(token, &endptr, 10);
214  if (endptr != token + length)
215  elog(ERROR, "unrecognized integer: \"%.*s\"", length, token);
216  result = bms_add_member(result, val);
217  }
218 
219  return result;
220 }
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define ERROR
Definition: elog.h:43
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53
Bitmapset * bms_add_member(Bitmapset *a, int x)
Definition: bitmapset.c:698
#define elog
Definition: elog.h:219
long val
Definition: informix.c:689

◆ _readBooleanTest()

static BooleanTest* _readBooleanTest ( void  )
static

Definition at line 1135 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

1136 {
1138 
1140  READ_ENUM_FIELD(booltesttype, BoolTestType);
1141  READ_LOCATION_FIELD(location);
1142 
1143  READ_DONE();
1144 }
BoolTestType
Definition: primnodes.h:1202
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
void * arg
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readBoolExpr()

static BoolExpr* _readBoolExpr ( void  )
static

Definition at line 781 of file readfuncs.c.

References AND_EXPR, generate_unaccent_rules::args, elog, ERROR, length(), NOT_EXPR, OR_EXPR, pg_strtok(), READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

782 {
784 
785  /* do-it-yourself enum representation */
786  token = pg_strtok(&length); /* skip :boolop */
787  token = pg_strtok(&length); /* get field value */
788  if (strncmp(token, "and", 3) == 0)
789  local_node->boolop = AND_EXPR;
790  else if (strncmp(token, "or", 2) == 0)
791  local_node->boolop = OR_EXPR;
792  else if (strncmp(token, "not", 3) == 0)
793  local_node->boolop = NOT_EXPR;
794  else
795  elog(ERROR, "unrecognized boolop \"%.*s\"", length, token);
796 
798  READ_LOCATION_FIELD(location);
799 
800  READ_DONE();
801 }
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define ERROR
Definition: elog.h:43
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define elog
Definition: elog.h:219

◆ _readCaseExpr()

static CaseExpr* _readCaseExpr ( void  )
static

Definition at line 947 of file readfuncs.c.

References arg, generate_unaccent_rules::args, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

948 {
950 
951  READ_OID_FIELD(casetype);
952  READ_OID_FIELD(casecollid);
955  READ_NODE_FIELD(defresult);
956  READ_LOCATION_FIELD(location);
957 
958  READ_DONE();
959 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readCaseTestExpr()

static CaseTestExpr* _readCaseTestExpr ( void  )
static

Definition at line 980 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_OID_FIELD.

Referenced by parseNodeString().

981 {
983 
984  READ_OID_FIELD(typeId);
985  READ_INT_FIELD(typeMod);
986  READ_OID_FIELD(collation);
987 
988  READ_DONE();
989 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readCaseWhen()

static CaseWhen* _readCaseWhen ( void  )
static

Definition at line 965 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

966 {
968 
969  READ_NODE_FIELD(expr);
970  READ_NODE_FIELD(result);
971  READ_LOCATION_FIELD(location);
972 
973  READ_DONE();
974 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readCoalesceExpr()

static CoalesceExpr* _readCoalesceExpr ( void  )
static

Definition at line 1048 of file readfuncs.c.

References generate_unaccent_rules::args, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1049 {
1051 
1052  READ_OID_FIELD(coalescetype);
1053  READ_OID_FIELD(coalescecollid);
1055  READ_LOCATION_FIELD(location);
1056 
1057  READ_DONE();
1058 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readCoerceToDomain()

static CoerceToDomain* _readCoerceToDomain ( void  )
static

Definition at line 1150 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1151 {
1153 
1155  READ_OID_FIELD(resulttype);
1156  READ_INT_FIELD(resulttypmod);
1157  READ_OID_FIELD(resultcollid);
1158  READ_ENUM_FIELD(coercionformat, CoercionForm);
1159  READ_LOCATION_FIELD(location);
1160 
1161  READ_DONE();
1162 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
CoercionForm
Definition: primnodes.h:436

◆ _readCoerceToDomainValue()

static CoerceToDomainValue* _readCoerceToDomainValue ( void  )
static

Definition at line 1168 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1169 {
1171 
1172  READ_OID_FIELD(typeId);
1173  READ_INT_FIELD(typeMod);
1174  READ_OID_FIELD(collation);
1175  READ_LOCATION_FIELD(location);
1176 
1177  READ_DONE();
1178 }
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readCoerceViaIO()

static CoerceViaIO* _readCoerceViaIO ( void  )
static

Definition at line 880 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

881 {
883 
885  READ_OID_FIELD(resulttype);
886  READ_OID_FIELD(resultcollid);
887  READ_ENUM_FIELD(coerceformat, CoercionForm);
888  READ_LOCATION_FIELD(location);
889 
890  READ_DONE();
891 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
CoercionForm
Definition: primnodes.h:436

◆ _readCollateExpr()

static CollateExpr* _readCollateExpr ( void  )
static

Definition at line 932 of file readfuncs.c.

References arg, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

933 {
935 
937  READ_OID_FIELD(collOid);
938  READ_LOCATION_FIELD(location);
939 
940  READ_DONE();
941 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readCommonTableExpr()

static CommonTableExpr* _readCommonTableExpr ( void  )
static

Definition at line 398 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

399 {
401 
402  READ_STRING_FIELD(ctename);
403  READ_NODE_FIELD(aliascolnames);
404  READ_NODE_FIELD(ctequery);
405  READ_LOCATION_FIELD(location);
406  READ_BOOL_FIELD(cterecursive);
407  READ_INT_FIELD(cterefcount);
408  READ_NODE_FIELD(ctecolnames);
409  READ_NODE_FIELD(ctecoltypes);
410  READ_NODE_FIELD(ctecoltypmods);
411  READ_NODE_FIELD(ctecolcollations);
412 
413  READ_DONE();
414 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readConst()

static Const* _readConst ( void  )
static

Definition at line 535 of file readfuncs.c.

References length(), pg_strtok(), READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_OID_FIELD, and readDatum().

Referenced by parseNodeString().

536 {
538 
539  READ_OID_FIELD(consttype);
540  READ_INT_FIELD(consttypmod);
541  READ_OID_FIELD(constcollid);
542  READ_INT_FIELD(constlen);
543  READ_BOOL_FIELD(constbyval);
544  READ_BOOL_FIELD(constisnull);
545  READ_LOCATION_FIELD(location);
546 
547  token = pg_strtok(&length); /* skip :constvalue */
548  if (local_node->constisnull)
549  token = pg_strtok(&length); /* skip "<>" */
550  else
551  local_node->constvalue = readDatum(local_node->constbyval);
552 
553  READ_DONE();
554 }
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
Datum readDatum(bool typbyval)
Definition: readfuncs.c:2692
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readConvertRowtypeExpr()

static ConvertRowtypeExpr* _readConvertRowtypeExpr ( void  )
static

Definition at line 916 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

917 {
919 
921  READ_OID_FIELD(resulttype);
922  READ_ENUM_FIELD(convertformat, CoercionForm);
923  READ_LOCATION_FIELD(location);
924 
925  READ_DONE();
926 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
CoercionForm
Definition: primnodes.h:436

◆ _readCteScan()

static CteScan* _readCteScan ( void  )
static

Definition at line 1887 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and ReadCommonScan().

Referenced by parseNodeString().

1888 {
1890 
1891  ReadCommonScan(&local_node->scan);
1892 
1893  READ_INT_FIELD(ctePlanId);
1894  READ_INT_FIELD(cteParam);
1895 
1896  READ_DONE();
1897 }
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readCurrentOfExpr()

static CurrentOfExpr* _readCurrentOfExpr ( void  )
static

Definition at line 1200 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_STRING_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

1201 {
1203 
1204  READ_UINT_FIELD(cvarno);
1205  READ_STRING_FIELD(cursor_name);
1206  READ_INT_FIELD(cursor_param);
1207 
1208  READ_DONE();
1209 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readCustomScan()

static CustomScan* _readCustomScan ( void  )
static

Definition at line 1940 of file readfuncs.c.

References GetCustomScanMethods(), length(), nullable_string, pg_strtok(), READ_BITMAPSET_FIELD, READ_DONE, READ_LOCALS, READ_NODE_FIELD, READ_UINT_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1941 {
1943  char *custom_name;
1944  const CustomScanMethods *methods;
1945 
1946  ReadCommonScan(&local_node->scan);
1947 
1948  READ_UINT_FIELD(flags);
1949  READ_NODE_FIELD(custom_plans);
1950  READ_NODE_FIELD(custom_exprs);
1951  READ_NODE_FIELD(custom_private);
1952  READ_NODE_FIELD(custom_scan_tlist);
1953  READ_BITMAPSET_FIELD(custom_relids);
1954 
1955  /* Lookup CustomScanMethods by CustomName */
1956  token = pg_strtok(&length); /* skip methods: */
1957  token = pg_strtok(&length); /* CustomName */
1958  custom_name = nullable_string(token, length);
1959  methods = GetCustomScanMethods(custom_name, false);
1960  local_node->methods = methods;
1961 
1962  READ_DONE();
1963 }
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
const CustomScanMethods * GetCustomScanMethods(const char *CustomName, bool missing_ok)
Definition: extensible.c:137
#define nullable_string(token, length)
Definition: readfuncs.c:177

◆ _readDeclareCursorStmt()

static DeclareCursorStmt* _readDeclareCursorStmt ( void  )
static

Definition at line 297 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

298 {
300 
301  READ_STRING_FIELD(portalname);
303  READ_NODE_FIELD(query);
304 
305  READ_DONE();
306 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readDefElem()

static DefElem* _readDefElem ( void  )
static

Definition at line 1444 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

1445 {
1447 
1448  READ_STRING_FIELD(defnamespace);
1449  READ_STRING_FIELD(defname);
1451  READ_ENUM_FIELD(defaction, DefElemAction);
1452  READ_LOCATION_FIELD(location);
1453 
1454  READ_DONE();
1455 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
DefElemAction
Definition: parsenodes.h:707
void * arg
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readDistinctExpr()

static DistinctExpr* _readDistinctExpr ( void  )
static

Definition at line 723 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

724 {
726 
727  READ_OID_FIELD(opno);
728  READ_OID_FIELD(opfuncid);
729  READ_OID_FIELD(opresulttype);
730  READ_BOOL_FIELD(opretset);
731  READ_OID_FIELD(opcollid);
732  READ_OID_FIELD(inputcollid);
734  READ_LOCATION_FIELD(location);
735 
736  READ_DONE();
737 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readExtensibleNode()

static ExtensibleNode* _readExtensibleNode ( void  )
static

Definition at line 2367 of file readfuncs.c.

References elog, ERROR, ExtensibleNode::extnodename, GetExtensibleNodeMethods(), length(), newNode, ExtensibleNodeMethods::node_size, ExtensibleNodeMethods::nodeRead, nullable_string, pg_strtok(), READ_DONE, READ_TEMP_LOCALS, and T_ExtensibleNode.

Referenced by parseNodeString().

2368 {
2369  const ExtensibleNodeMethods *methods;
2370  ExtensibleNode *local_node;
2371  const char *extnodename;
2372 
2373  READ_TEMP_LOCALS();
2374 
2375  token = pg_strtok(&length); /* skip :extnodename */
2376  token = pg_strtok(&length); /* get extnodename */
2377 
2378  extnodename = nullable_string(token, length);
2379  if (!extnodename)
2380  elog(ERROR, "extnodename has to be supplied");
2381  methods = GetExtensibleNodeMethods(extnodename, false);
2382 
2383  local_node = (ExtensibleNode *) newNode(methods->node_size,
2385  local_node->extnodename = extnodename;
2386 
2387  /* deserialize the private fields */
2388  methods->nodeRead(local_node);
2389 
2390  READ_DONE();
2391 }
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define newNode(size, tag)
Definition: nodes.h:550
#define ERROR
Definition: elog.h:43
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53
const char * extnodename
Definition: extensible.h:35
void(* nodeRead)(struct ExtensibleNode *node)
Definition: extensible.h:70
#define READ_DONE()
Definition: readfuncs.c:163
#define elog
Definition: elog.h:219
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
Definition: extensible.c:125
#define nullable_string(token, length)
Definition: readfuncs.c:177

◆ _readFieldSelect()

static FieldSelect* _readFieldSelect ( void  )
static

Definition at line 829 of file readfuncs.c.

References arg, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

830 {
832 
834  READ_INT_FIELD(fieldnum);
835  READ_OID_FIELD(resulttype);
836  READ_INT_FIELD(resulttypmod);
837  READ_OID_FIELD(resultcollid);
838 
839  READ_DONE();
840 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readFieldStore()

static FieldStore* _readFieldStore ( void  )
static

Definition at line 846 of file readfuncs.c.

References arg, READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

847 {
849 
851  READ_NODE_FIELD(newvals);
852  READ_NODE_FIELD(fieldnums);
853  READ_OID_FIELD(resulttype);
854 
855  READ_DONE();
856 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readForeignScan()

static ForeignScan* _readForeignScan ( void  )
static

Definition at line 1918 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1919 {
1921 
1922  ReadCommonScan(&local_node->scan);
1923 
1924  READ_ENUM_FIELD(operation, CmdType);
1925  READ_OID_FIELD(fs_server);
1926  READ_NODE_FIELD(fdw_exprs);
1927  READ_NODE_FIELD(fdw_private);
1928  READ_NODE_FIELD(fdw_scan_tlist);
1929  READ_NODE_FIELD(fdw_recheck_quals);
1930  READ_BITMAPSET_FIELD(fs_relids);
1931  READ_BOOL_FIELD(fsSystemCol);
1932 
1933  READ_DONE();
1934 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
CmdType
Definition: nodes.h:652

◆ _readFromExpr()

static FromExpr* _readFromExpr ( void  )
static

Definition at line 1296 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1297 {
1299 
1300  READ_NODE_FIELD(fromlist);
1301  READ_NODE_FIELD(quals);
1302 
1303  READ_DONE();
1304 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readFuncExpr()

static FuncExpr* _readFuncExpr ( void  )
static

Definition at line 666 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

667 {
669 
670  READ_OID_FIELD(funcid);
671  READ_OID_FIELD(funcresulttype);
672  READ_BOOL_FIELD(funcretset);
673  READ_BOOL_FIELD(funcvariadic);
674  READ_ENUM_FIELD(funcformat, CoercionForm);
675  READ_OID_FIELD(funccollid);
676  READ_OID_FIELD(inputcollid);
678  READ_LOCATION_FIELD(location);
679 
680  READ_DONE();
681 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
CoercionForm
Definition: primnodes.h:436

◆ _readFunctionScan()

static FunctionScan* _readFunctionScan ( void  )
static

Definition at line 1841 of file readfuncs.c.

References functions, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1842 {
1844 
1845  ReadCommonScan(&local_node->scan);
1846 
1848  READ_BOOL_FIELD(funcordinality);
1849 
1850  READ_DONE();
1851 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
static const struct fns functions
Definition: regcomp.c:299
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readGather()

static Gather* _readGather ( void  )
static

Definition at line 2166 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, and ReadCommonPlan().

Referenced by parseNodeString().

2167 {
2169 
2170  ReadCommonPlan(&local_node->plan);
2171 
2172  READ_INT_FIELD(num_workers);
2173  READ_INT_FIELD(rescan_param);
2174  READ_BOOL_FIELD(single_copy);
2175  READ_BOOL_FIELD(invisible);
2176  READ_BITMAPSET_FIELD(initParam);
2177 
2178  READ_DONE();
2179 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readGatherMerge()

static GatherMerge* _readGatherMerge ( void  )
static

Definition at line 2185 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_BITMAPSET_FIELD, READ_BOOL_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2186 {
2188 
2189  ReadCommonPlan(&local_node->plan);
2190 
2191  READ_INT_FIELD(num_workers);
2192  READ_INT_FIELD(rescan_param);
2193  READ_INT_FIELD(numCols);
2194  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
2195  READ_OID_ARRAY(sortOperators, local_node->numCols);
2196  READ_OID_ARRAY(collations, local_node->numCols);
2197  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
2198  READ_BITMAPSET_FIELD(initParam);
2199 
2200  READ_DONE();
2201 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:158
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readGroup()

static Group* _readGroup ( void  )
static

Definition at line 2085 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2086 {
2087  READ_LOCALS(Group);
2088 
2089  ReadCommonPlan(&local_node->plan);
2090 
2091  READ_INT_FIELD(numCols);
2092  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2093  READ_OID_ARRAY(grpOperators, local_node->numCols);
2094 
2095  READ_DONE();
2096 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readGroupingFunc()

static GroupingFunc* _readGroupingFunc ( void  )
static

Definition at line 607 of file readfuncs.c.

References generate_unaccent_rules::args, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

608 {
610 
612  READ_NODE_FIELD(refs);
613  READ_NODE_FIELD(cols);
614  READ_UINT_FIELD(agglevelsup);
615  READ_LOCATION_FIELD(location);
616 
617  READ_DONE();
618 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readGroupingSet()

static GroupingSet* _readGroupingSet ( void  )
static

Definition at line 346 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

347 {
349 
351  READ_NODE_FIELD(content);
352  READ_LOCATION_FIELD(location);
353 
354  READ_DONE();
355 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
GroupingSetKind
Definition: parsenodes.h:1253
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readHash()

static Hash* _readHash ( void  )
static

Definition at line 2207 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_OID_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

2208 {
2209  READ_LOCALS(Hash);
2210 
2211  ReadCommonPlan(&local_node->plan);
2212 
2213  READ_OID_FIELD(skewTable);
2214  READ_INT_FIELD(skewColumn);
2215  READ_BOOL_FIELD(skewInherit);
2216 
2217  READ_DONE();
2218 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readHashJoin()

static HashJoin* _readHashJoin ( void  )
static

Definition at line 2038 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonJoin().

Referenced by parseNodeString().

2039 {
2041 
2042  ReadCommonJoin(&local_node->join);
2043 
2044  READ_NODE_FIELD(hashclauses);
2045 
2046  READ_DONE();
2047 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1970
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readIndexOnlyScan()

static IndexOnlyScan* _readIndexOnlyScan ( void  )
static

Definition at line 1759 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1760 {
1762 
1763  ReadCommonScan(&local_node->scan);
1764 
1765  READ_OID_FIELD(indexid);
1766  READ_NODE_FIELD(indexqual);
1767  READ_NODE_FIELD(indexorderby);
1768  READ_NODE_FIELD(indextlist);
1769  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1770 
1771  READ_DONE();
1772 }
ScanDirection
Definition: sdir.h:22
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readIndexScan()

static IndexScan* _readIndexScan ( void  )
static

Definition at line 1738 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1739 {
1741 
1742  ReadCommonScan(&local_node->scan);
1743 
1744  READ_OID_FIELD(indexid);
1745  READ_NODE_FIELD(indexqual);
1746  READ_NODE_FIELD(indexqualorig);
1747  READ_NODE_FIELD(indexorderby);
1748  READ_NODE_FIELD(indexorderbyorig);
1749  READ_NODE_FIELD(indexorderbyops);
1750  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1751 
1752  READ_DONE();
1753 }
ScanDirection
Definition: sdir.h:22
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readInferenceElem()

static InferenceElem* _readInferenceElem ( void  )
static

Definition at line 1229 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1230 {
1232 
1233  READ_NODE_FIELD(expr);
1234  READ_OID_FIELD(infercollid);
1235  READ_OID_FIELD(inferopclass);
1236 
1237  READ_DONE();
1238 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readIntoClause()

static IntoClause* _readIntoClause ( void  )
static

Definition at line 495 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

496 {
498 
499  READ_NODE_FIELD(rel);
500  READ_NODE_FIELD(colNames);
502  READ_ENUM_FIELD(onCommit, OnCommitAction);
503  READ_STRING_FIELD(tableSpaceName);
504  READ_NODE_FIELD(viewQuery);
505  READ_BOOL_FIELD(skipData);
506 
507  READ_DONE();
508 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
OnCommitAction
Definition: primnodes.h:47
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readJoin()

static Join* _readJoin ( void  )
static

Definition at line 1985 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonJoin().

Referenced by parseNodeString().

1986 {
1988 
1989  ReadCommonJoin(local_node);
1990 
1991  READ_DONE();
1992 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1970
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readJoinExpr()

static JoinExpr* _readJoinExpr ( void  )
static

Definition at line 1276 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1277 {
1279 
1280  READ_ENUM_FIELD(jointype, JoinType);
1281  READ_BOOL_FIELD(isNatural);
1282  READ_NODE_FIELD(larg);
1283  READ_NODE_FIELD(rarg);
1284  READ_NODE_FIELD(usingClause);
1285  READ_NODE_FIELD(quals);
1286  READ_NODE_FIELD(alias);
1287  READ_INT_FIELD(rtindex);
1288 
1289  READ_DONE();
1290 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
JoinType
Definition: nodes.h:676
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readLimit()

static Limit* _readLimit ( void  )
static

Definition at line 2262 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

2263 {
2264  READ_LOCALS(Limit);
2265 
2266  ReadCommonPlan(&local_node->plan);
2267 
2268  READ_NODE_FIELD(limitOffset);
2269  READ_NODE_FIELD(limitCount);
2270 
2271  READ_DONE();
2272 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readLockRows()

static LockRows* _readLockRows ( void  )
static

Definition at line 2246 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

2247 {
2249 
2250  ReadCommonPlan(&local_node->plan);
2251 
2252  READ_NODE_FIELD(rowMarks);
2253  READ_INT_FIELD(epqParam);
2254 
2255  READ_DONE();
2256 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readMaterial()

static Material* _readMaterial ( void  )
static

Definition at line 2053 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

2054 {
2056 
2057  ReadCommonPlan(&local_node->plan);
2058 
2059  READ_DONE();
2060 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readMergeAppend()

static MergeAppend* _readMergeAppend ( void  )
static

Definition at line 1612 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_BOOL_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

1613 {
1615 
1616  ReadCommonPlan(&local_node->plan);
1617 
1618  READ_NODE_FIELD(partitioned_rels);
1619  READ_NODE_FIELD(mergeplans);
1620  READ_INT_FIELD(numCols);
1621  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
1622  READ_OID_ARRAY(sortOperators, local_node->numCols);
1623  READ_OID_ARRAY(collations, local_node->numCols);
1624  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
1625 
1626  READ_DONE();
1627 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:158
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readMergeJoin()

static MergeJoin* _readMergeJoin ( void  )
static

Definition at line 2013 of file readfuncs.c.

References list_length(), READ_BOOL_ARRAY, READ_BOOL_FIELD, READ_DONE, READ_INT_ARRAY, READ_LOCALS, READ_NODE_FIELD, READ_OID_ARRAY, and ReadCommonJoin().

Referenced by parseNodeString().

2014 {
2015  int numCols;
2016 
2018 
2019  ReadCommonJoin(&local_node->join);
2020 
2021  READ_BOOL_FIELD(skip_mark_restore);
2022  READ_NODE_FIELD(mergeclauses);
2023 
2024  numCols = list_length(local_node->mergeclauses);
2025 
2026  READ_OID_ARRAY(mergeFamilies, numCols);
2027  READ_OID_ARRAY(mergeCollations, numCols);
2028  READ_INT_ARRAY(mergeStrategies, numCols);
2029  READ_BOOL_ARRAY(mergeNullsFirst, numCols);
2030 
2031  READ_DONE();
2032 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:158
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1970
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
static int list_length(const List *l)
Definition: pg_list.h:89
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_ARRAY(fldname, len)
Definition: readfuncs.c:153

◆ _readMinMaxExpr()

static MinMaxExpr* _readMinMaxExpr ( void  )
static

Definition at line 1064 of file readfuncs.c.

References generate_unaccent_rules::args, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1065 {
1067 
1068  READ_OID_FIELD(minmaxtype);
1069  READ_OID_FIELD(minmaxcollid);
1070  READ_OID_FIELD(inputcollid);
1073  READ_LOCATION_FIELD(location);
1074 
1075  READ_DONE();
1076 }
MinMaxOp
Definition: primnodes.h:1061
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readModifyTable()

static ModifyTable* _readModifyTable ( void  )
static

Definition at line 1561 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_UINT_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

1562 {
1564 
1565  ReadCommonPlan(&local_node->plan);
1566 
1567  READ_ENUM_FIELD(operation, CmdType);
1568  READ_BOOL_FIELD(canSetTag);
1569  READ_UINT_FIELD(nominalRelation);
1570  READ_NODE_FIELD(partitioned_rels);
1571  READ_NODE_FIELD(resultRelations);
1572  READ_INT_FIELD(resultRelIndex);
1573  READ_INT_FIELD(rootResultRelIndex);
1574  READ_NODE_FIELD(plans);
1575  READ_NODE_FIELD(withCheckOptionLists);
1576  READ_NODE_FIELD(returningLists);
1577  READ_NODE_FIELD(fdwPrivLists);
1578  READ_BITMAPSET_FIELD(fdwDirectModifyPlans);
1579  READ_NODE_FIELD(rowMarks);
1580  READ_INT_FIELD(epqParam);
1581  READ_ENUM_FIELD(onConflictAction, OnConflictAction);
1582  READ_NODE_FIELD(arbiterIndexes);
1583  READ_NODE_FIELD(onConflictSet);
1584  READ_NODE_FIELD(onConflictWhere);
1585  READ_UINT_FIELD(exclRelRTI);
1586  READ_NODE_FIELD(exclRelTlist);
1587 
1588  READ_DONE();
1589 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
OnConflictAction
Definition: nodes.h:802
CmdType
Definition: nodes.h:652

◆ _readNamedArgExpr()

static NamedArgExpr* _readNamedArgExpr ( void  )
static

Definition at line 687 of file readfuncs.c.

References arg, name, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

688 {
690 
693  READ_INT_FIELD(argnumber);
694  READ_LOCATION_FIELD(location);
695 
696  READ_DONE();
697 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
const char * name
Definition: encode.c:521
void * arg
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readNestLoop()

static NestLoop* _readNestLoop ( void  )
static

Definition at line 1998 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonJoin().

Referenced by parseNodeString().

1999 {
2001 
2002  ReadCommonJoin(&local_node->join);
2003 
2004  READ_NODE_FIELD(nestParams);
2005 
2006  READ_DONE();
2007 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1970
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readNestLoopParam()

static NestLoopParam* _readNestLoopParam ( void  )
static

Definition at line 2278 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

2279 {
2281 
2282  READ_INT_FIELD(paramno);
2283  READ_NODE_FIELD(paramval);
2284 
2285  READ_DONE();
2286 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readNextValueExpr()

static NextValueExpr* _readNextValueExpr ( void  )
static

Definition at line 1215 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_OID_FIELD.

Referenced by parseNodeString().

1216 {
1218 
1219  READ_OID_FIELD(seqid);
1220  READ_OID_FIELD(typeId);
1221 
1222  READ_DONE();
1223 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readNotifyStmt()

static NotifyStmt* _readNotifyStmt ( void  )
static

Definition at line 283 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_STRING_FIELD.

Referenced by parseNodeString().

284 {
286 
287  READ_STRING_FIELD(conditionname);
288  READ_STRING_FIELD(payload);
289 
290  READ_DONE();
291 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readNullIfExpr()

static NullIfExpr* _readNullIfExpr ( void  )
static

Definition at line 743 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

744 {
746 
747  READ_OID_FIELD(opno);
748  READ_OID_FIELD(opfuncid);
749  READ_OID_FIELD(opresulttype);
750  READ_BOOL_FIELD(opretset);
751  READ_OID_FIELD(opcollid);
752  READ_OID_FIELD(inputcollid);
754  READ_LOCATION_FIELD(location);
755 
756  READ_DONE();
757 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readNullTest()

static NullTest* _readNullTest ( void  )
static

Definition at line 1119 of file readfuncs.c.

References arg, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

1120 {
1122 
1124  READ_ENUM_FIELD(nulltesttype, NullTestType);
1125  READ_BOOL_FIELD(argisrow);
1126  READ_LOCATION_FIELD(location);
1127 
1128  READ_DONE();
1129 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
NullTestType
Definition: primnodes.h:1179
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
void * arg
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readOnConflictExpr()

static OnConflictExpr* _readOnConflictExpr ( void  )
static

Definition at line 1310 of file readfuncs.c.

References generate_unaccent_rules::action, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1311 {
1313 
1315  READ_NODE_FIELD(arbiterElems);
1316  READ_NODE_FIELD(arbiterWhere);
1317  READ_OID_FIELD(constraint);
1318  READ_NODE_FIELD(onConflictSet);
1319  READ_NODE_FIELD(onConflictWhere);
1320  READ_INT_FIELD(exclRelIndex);
1321  READ_NODE_FIELD(exclRelTlist);
1322 
1323  READ_DONE();
1324 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
OnConflictAction
Definition: nodes.h:802

◆ _readOpExpr()

static OpExpr* _readOpExpr ( void  )
static

Definition at line 703 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

704 {
706 
707  READ_OID_FIELD(opno);
708  READ_OID_FIELD(opfuncid);
709  READ_OID_FIELD(opresulttype);
710  READ_BOOL_FIELD(opretset);
711  READ_OID_FIELD(opcollid);
712  READ_OID_FIELD(inputcollid);
714  READ_LOCATION_FIELD(location);
715 
716  READ_DONE();
717 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readParam()

static Param* _readParam ( void  )
static

Definition at line 560 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

561 {
563 
564  READ_ENUM_FIELD(paramkind, ParamKind);
565  READ_INT_FIELD(paramid);
566  READ_OID_FIELD(paramtype);
567  READ_INT_FIELD(paramtypmod);
568  READ_OID_FIELD(paramcollid);
569  READ_LOCATION_FIELD(location);
570 
571  READ_DONE();
572 }
ParamKind
Definition: primnodes.h:233
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readPartitionBoundSpec()

static PartitionBoundSpec* _readPartitionBoundSpec ( void  )
static

Definition at line 2397 of file readfuncs.c.

References READ_BOOL_FIELD, READ_CHAR_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

2398 {
2400 
2401  READ_CHAR_FIELD(strategy);
2402  READ_BOOL_FIELD(is_default);
2403  READ_INT_FIELD(modulus);
2404  READ_INT_FIELD(remainder);
2405  READ_NODE_FIELD(listdatums);
2406  READ_NODE_FIELD(lowerdatums);
2407  READ_NODE_FIELD(upperdatums);
2408  READ_LOCATION_FIELD(location);
2409 
2410  READ_DONE();
2411 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:93
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readPartitionRangeDatum()

static PartitionRangeDatum* _readPartitionRangeDatum ( void  )
static

Definition at line 2417 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and value.

Referenced by parseNodeString().

2418 {
2420 
2423  READ_LOCATION_FIELD(location);
2424 
2425  READ_DONE();
2426 }
PartitionRangeDatumKind
Definition: parsenodes.h:823
static struct @121 value
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readPlan()

static Plan* _readPlan ( void  )
static

Definition at line 1520 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

1521 {
1523 
1524  ReadCommonPlan(local_node);
1525 
1526  READ_DONE();
1527 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readPlanInvalItem()

static PlanInvalItem* _readPlanInvalItem ( void  )
static

Definition at line 2312 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_UINT_FIELD.

Referenced by parseNodeString().

2313 {
2315 
2316  READ_INT_FIELD(cacheId);
2317  READ_UINT_FIELD(hashValue);
2318 
2319  READ_DONE();
2320 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readPlannedStmt()

static PlannedStmt* _readPlannedStmt ( void  )
static

Definition at line 1461 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_UINT64_FIELD.

Referenced by parseNodeString().

1462 {
1464 
1465  READ_ENUM_FIELD(commandType, CmdType);
1466  READ_UINT64_FIELD(queryId);
1467  READ_BOOL_FIELD(hasReturning);
1468  READ_BOOL_FIELD(hasModifyingCTE);
1469  READ_BOOL_FIELD(canSetTag);
1470  READ_BOOL_FIELD(transientPlan);
1471  READ_BOOL_FIELD(dependsOnRole);
1472  READ_BOOL_FIELD(parallelModeNeeded);
1473  READ_NODE_FIELD(planTree);
1474  READ_NODE_FIELD(rtable);
1475  READ_NODE_FIELD(resultRelations);
1476  READ_NODE_FIELD(nonleafResultRelations);
1477  READ_NODE_FIELD(rootResultRelations);
1478  READ_NODE_FIELD(subplans);
1479  READ_BITMAPSET_FIELD(rewindPlanIDs);
1480  READ_NODE_FIELD(rowMarks);
1481  READ_NODE_FIELD(relationOids);
1482  READ_NODE_FIELD(invalItems);
1483  READ_NODE_FIELD(paramExecTypes);
1484  READ_NODE_FIELD(utilityStmt);
1485  READ_LOCATION_FIELD(stmt_location);
1486  READ_LOCATION_FIELD(stmt_len);
1487 
1488  READ_DONE();
1489 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_UINT64_FIELD(fldname)
Definition: readfuncs.c:75
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
CmdType
Definition: nodes.h:652

◆ _readPlanRowMark()

static PlanRowMark* _readPlanRowMark ( void  )
static

Definition at line 2292 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, and READ_UINT_FIELD.

Referenced by parseNodeString().

2293 {
2295 
2296  READ_UINT_FIELD(rti);
2297  READ_UINT_FIELD(prti);
2298  READ_UINT_FIELD(rowmarkId);
2299  READ_ENUM_FIELD(markType, RowMarkType);
2300  READ_INT_FIELD(allMarkTypes);
2302  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
2303  READ_BOOL_FIELD(isParent);
2304 
2305  READ_DONE();
2306 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
LockClauseStrength
Definition: lockoptions.h:21
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
RowMarkType
Definition: plannodes.h:964
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
LockWaitPolicy
Definition: lockoptions.h:36

◆ _readProjectSet()

static ProjectSet* _readProjectSet ( void  )
static

Definition at line 1548 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

1549 {
1551 
1552  ReadCommonPlan(&local_node->plan);
1553 
1554  READ_DONE();
1555 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readQuery()

static Query* _readQuery ( void  )
static

Definition at line 235 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

236 {
238 
239  READ_ENUM_FIELD(commandType, CmdType);
240  READ_ENUM_FIELD(querySource, QuerySource);
241  local_node->queryId = UINT64CONST(0); /* not saved in output format */
242  READ_BOOL_FIELD(canSetTag);
243  READ_NODE_FIELD(utilityStmt);
244  READ_INT_FIELD(resultRelation);
245  READ_BOOL_FIELD(hasAggs);
246  READ_BOOL_FIELD(hasWindowFuncs);
247  READ_BOOL_FIELD(hasTargetSRFs);
248  READ_BOOL_FIELD(hasSubLinks);
249  READ_BOOL_FIELD(hasDistinctOn);
250  READ_BOOL_FIELD(hasRecursive);
251  READ_BOOL_FIELD(hasModifyingCTE);
252  READ_BOOL_FIELD(hasForUpdate);
253  READ_BOOL_FIELD(hasRowSecurity);
254  READ_NODE_FIELD(cteList);
255  READ_NODE_FIELD(rtable);
256  READ_NODE_FIELD(jointree);
257  READ_NODE_FIELD(targetList);
258  READ_ENUM_FIELD(override, OverridingKind);
259  READ_NODE_FIELD(onConflict);
260  READ_NODE_FIELD(returningList);
261  READ_NODE_FIELD(groupClause);
262  READ_NODE_FIELD(groupingSets);
263  READ_NODE_FIELD(havingQual);
264  READ_NODE_FIELD(windowClause);
265  READ_NODE_FIELD(distinctClause);
266  READ_NODE_FIELD(sortClause);
267  READ_NODE_FIELD(limitOffset);
268  READ_NODE_FIELD(limitCount);
269  READ_NODE_FIELD(rowMarks);
270  READ_NODE_FIELD(setOperations);
271  READ_NODE_FIELD(constraintDeps);
272  /* withCheckOptions intentionally omitted, see comment in parsenodes.h */
273  READ_LOCATION_FIELD(stmt_location);
274  READ_LOCATION_FIELD(stmt_len);
275 
276  READ_DONE();
277 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
QuerySource
Definition: parsenodes.h:38
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
CmdType
Definition: nodes.h:652
OverridingKind
Definition: parsenodes.h:30

◆ _readRangeTblEntry()

static RangeTblEntry* _readRangeTblEntry ( void  )
static

Definition at line 1334 of file readfuncs.c.

References elog, ERROR, functions, READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_CHAR_FIELD, READ_DONE, READ_ENUM_FIELD, READ_FLOAT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, READ_STRING_FIELD, READ_UINT_FIELD, RTE_CTE, RTE_FUNCTION, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_SUBQUERY, RTE_TABLEFUNC, and RTE_VALUES.

Referenced by parseNodeString().

1335 {
1337 
1338  /* put alias + eref first to make dump more legible */
1339  READ_NODE_FIELD(alias);
1340  READ_NODE_FIELD(eref);
1341  READ_ENUM_FIELD(rtekind, RTEKind);
1342 
1343  switch (local_node->rtekind)
1344  {
1345  case RTE_RELATION:
1346  READ_OID_FIELD(relid);
1347  READ_CHAR_FIELD(relkind);
1348  READ_NODE_FIELD(tablesample);
1349  break;
1350  case RTE_SUBQUERY:
1351  READ_NODE_FIELD(subquery);
1352  READ_BOOL_FIELD(security_barrier);
1353  break;
1354  case RTE_JOIN:
1355  READ_ENUM_FIELD(jointype, JoinType);
1356  READ_NODE_FIELD(joinaliasvars);
1357  break;
1358  case RTE_FUNCTION:
1360  READ_BOOL_FIELD(funcordinality);
1361  break;
1362  case RTE_TABLEFUNC:
1363  READ_NODE_FIELD(tablefunc);
1364  break;
1365  case RTE_VALUES:
1366  READ_NODE_FIELD(values_lists);
1367  READ_NODE_FIELD(coltypes);
1368  READ_NODE_FIELD(coltypmods);
1369  READ_NODE_FIELD(colcollations);
1370  break;
1371  case RTE_CTE:
1372  READ_STRING_FIELD(ctename);
1373  READ_UINT_FIELD(ctelevelsup);
1374  READ_BOOL_FIELD(self_reference);
1375  READ_NODE_FIELD(coltypes);
1376  READ_NODE_FIELD(coltypmods);
1377  READ_NODE_FIELD(colcollations);
1378  break;
1379  case RTE_NAMEDTUPLESTORE:
1380  READ_STRING_FIELD(enrname);
1381  READ_FLOAT_FIELD(enrtuples);
1382  READ_OID_FIELD(relid);
1383  READ_NODE_FIELD(coltypes);
1384  READ_NODE_FIELD(coltypmods);
1385  READ_NODE_FIELD(colcollations);
1386  break;
1387  default:
1388  elog(ERROR, "unrecognized RTE kind: %d",
1389  (int) local_node->rtekind);
1390  break;
1391  }
1392 
1393  READ_BOOL_FIELD(lateral);
1394  READ_BOOL_FIELD(inh);
1395  READ_BOOL_FIELD(inFromCl);
1396  READ_UINT_FIELD(requiredPerms);
1397  READ_OID_FIELD(checkAsUser);
1398  READ_BITMAPSET_FIELD(selectedCols);
1399  READ_BITMAPSET_FIELD(insertedCols);
1400  READ_BITMAPSET_FIELD(updatedCols);
1401  READ_NODE_FIELD(securityQuals);
1402 
1403  READ_DONE();
1404 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
JoinType
Definition: nodes.h:676
#define ERROR
Definition: elog.h:43
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:106
RTEKind
Definition: parsenodes.h:935
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:93
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
static const struct fns functions
Definition: regcomp.c:299
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define elog
Definition: elog.h:219

◆ _readRangeTblFunction()

static RangeTblFunction* _readRangeTblFunction ( void  )
static

Definition at line 1410 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1411 {
1413 
1414  READ_NODE_FIELD(funcexpr);
1415  READ_INT_FIELD(funccolcount);
1416  READ_NODE_FIELD(funccolnames);
1417  READ_NODE_FIELD(funccoltypes);
1418  READ_NODE_FIELD(funccoltypmods);
1419  READ_NODE_FIELD(funccolcollations);
1420  READ_BITMAPSET_FIELD(funcparams);
1421 
1422  READ_DONE();
1423 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readRangeTblRef()

static RangeTblRef* _readRangeTblRef ( void  )
static

Definition at line 1263 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, and READ_LOCALS.

Referenced by parseNodeString().

1264 {
1266 
1267  READ_INT_FIELD(rtindex);
1268 
1269  READ_DONE();
1270 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readRangeVar()

static RangeVar* _readRangeVar ( void  )
static

Definition at line 453 of file readfuncs.c.

References READ_BOOL_FIELD, READ_CHAR_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

454 {
456 
457  local_node->catalogname = NULL; /* not currently saved in output format */
458 
459  READ_STRING_FIELD(schemaname);
460  READ_STRING_FIELD(relname);
461  READ_BOOL_FIELD(inh);
462  READ_CHAR_FIELD(relpersistence);
463  READ_NODE_FIELD(alias);
464  READ_LOCATION_FIELD(location);
465 
466  READ_DONE();
467 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:93
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readRecursiveUnion()

static RecursiveUnion* _readRecursiveUnion ( void  )
static

Definition at line 1633 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LONG_FIELD, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

1634 {
1636 
1637  ReadCommonPlan(&local_node->plan);
1638 
1639  READ_INT_FIELD(wtParam);
1640  READ_INT_FIELD(numCols);
1641  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
1642  READ_OID_ARRAY(dupOperators, local_node->numCols);
1643  READ_LONG_FIELD(numGroups);
1644 
1645  READ_DONE();
1646 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:81
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readRelabelType()

static RelabelType* _readRelabelType ( void  )
static

Definition at line 862 of file readfuncs.c.

References arg, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

863 {
865 
867  READ_OID_FIELD(resulttype);
868  READ_INT_FIELD(resulttypmod);
869  READ_OID_FIELD(resultcollid);
870  READ_ENUM_FIELD(relabelformat, CoercionForm);
871  READ_LOCATION_FIELD(location);
872 
873  READ_DONE();
874 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
void * arg
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
CoercionForm
Definition: primnodes.h:436

◆ _readResult()

static Result* _readResult ( void  )
static

Definition at line 1533 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

1534 {
1536 
1537  ReadCommonPlan(&local_node->plan);
1538 
1539  READ_NODE_FIELD(resconstantqual);
1540 
1541  READ_DONE();
1542 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readRowCompareExpr()

static RowCompareExpr* _readRowCompareExpr ( void  )
static

Definition at line 1030 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1031 {
1033 
1035  READ_NODE_FIELD(opnos);
1036  READ_NODE_FIELD(opfamilies);
1037  READ_NODE_FIELD(inputcollids);
1038  READ_NODE_FIELD(largs);
1039  READ_NODE_FIELD(rargs);
1040 
1041  READ_DONE();
1042 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
RowCompareType
Definition: primnodes.h:1024
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readRowExpr()

static RowExpr* _readRowExpr ( void  )
static

Definition at line 1013 of file readfuncs.c.

References generate_unaccent_rules::args, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1014 {
1016 
1018  READ_OID_FIELD(row_typeid);
1019  READ_ENUM_FIELD(row_format, CoercionForm);
1020  READ_NODE_FIELD(colnames);
1021  READ_LOCATION_FIELD(location);
1022 
1023  READ_DONE();
1024 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
CoercionForm
Definition: primnodes.h:436

◆ _readRowMarkClause()

static RowMarkClause* _readRowMarkClause ( void  )
static

Definition at line 382 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, and READ_UINT_FIELD.

Referenced by parseNodeString().

383 {
385 
386  READ_UINT_FIELD(rti);
388  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
389  READ_BOOL_FIELD(pushedDown);
390 
391  READ_DONE();
392 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
LockClauseStrength
Definition: lockoptions.h:21
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
LockWaitPolicy
Definition: lockoptions.h:36

◆ _readSampleScan()

static SampleScan* _readSampleScan ( void  )
static

Definition at line 1723 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1724 {
1726 
1727  ReadCommonScan(&local_node->scan);
1728 
1729  READ_NODE_FIELD(tablesample);
1730 
1731  READ_DONE();
1732 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readScalarArrayOpExpr()

static ScalarArrayOpExpr* _readScalarArrayOpExpr ( void  )
static

Definition at line 763 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

764 {
766 
767  READ_OID_FIELD(opno);
768  READ_OID_FIELD(opfuncid);
769  READ_BOOL_FIELD(useOr);
770  READ_OID_FIELD(inputcollid);
772  READ_LOCATION_FIELD(location);
773 
774  READ_DONE();
775 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readScan()

static Scan* _readScan ( void  )
static

Definition at line 1697 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

1698 {
1700 
1701  ReadCommonScan(local_node);
1702 
1703  READ_DONE();
1704 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readSeqScan()

static SeqScan* _readSeqScan ( void  )
static

Definition at line 1710 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

1711 {
1713 
1714  ReadCommonScan(local_node);
1715 
1716  READ_DONE();
1717 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:49
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readSetOp()

static SetOp* _readSetOp ( void  )
static

Definition at line 2224 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LONG_FIELD, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2225 {
2226  READ_LOCALS(SetOp);
2227 
2228  ReadCommonPlan(&local_node->plan);
2229 
2230  READ_ENUM_FIELD(cmd, SetOpCmd);
2231  READ_ENUM_FIELD(strategy, SetOpStrategy);
2232  READ_INT_FIELD(numCols);
2233  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
2234  READ_OID_ARRAY(dupOperators, local_node->numCols);
2235  READ_INT_FIELD(flagColIdx);
2236  READ_INT_FIELD(firstFlag);
2237  READ_LONG_FIELD(numGroups);
2238 
2239  READ_DONE();
2240 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:81
SetOpStrategy
Definition: nodes.h:790
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
SetOpCmd
Definition: nodes.h:782
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readSetOperationStmt()

static SetOperationStmt* _readSetOperationStmt ( void  )
static

Definition at line 420 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

421 {
423 
425  READ_BOOL_FIELD(all);
426  READ_NODE_FIELD(larg);
427  READ_NODE_FIELD(rarg);
428  READ_NODE_FIELD(colTypes);
429  READ_NODE_FIELD(colTypmods);
430  READ_NODE_FIELD(colCollations);
431  READ_NODE_FIELD(groupClauses);
432 
433  READ_DONE();
434 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
SetOperation
Definition: parsenodes.h:1502
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readSetToDefault()

static SetToDefault* _readSetToDefault ( void  )
static

Definition at line 1184 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1185 {
1187 
1188  READ_OID_FIELD(typeId);
1189  READ_INT_FIELD(typeMod);
1190  READ_OID_FIELD(collation);
1191  READ_LOCATION_FIELD(location);
1192 
1193  READ_DONE();
1194 }
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readSort()

static Sort* _readSort ( void  )
static

Definition at line 2066 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_BOOL_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2067 {
2068  READ_LOCALS(Sort);
2069 
2070  ReadCommonPlan(&local_node->plan);
2071 
2072  READ_INT_FIELD(numCols);
2073  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
2074  READ_OID_ARRAY(sortOperators, local_node->numCols);
2075  READ_OID_ARRAY(collations, local_node->numCols);
2076  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
2077 
2078  READ_DONE();
2079 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:158
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readSortGroupClause()

static SortGroupClause* _readSortGroupClause ( void  )
static

Definition at line 329 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_OID_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

330 {
332 
333  READ_UINT_FIELD(tleSortGroupRef);
334  READ_OID_FIELD(eqop);
335  READ_OID_FIELD(sortop);
336  READ_BOOL_FIELD(nulls_first);
337  READ_BOOL_FIELD(hashable);
338 
339  READ_DONE();
340 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readSQLValueFunction()

static SQLValueFunction* _readSQLValueFunction ( void  )
static

Definition at line 1082 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_OID_FIELD, and generate_unaccent_rules::type.

Referenced by parseNodeString().

1083 {
1085 
1088  READ_INT_FIELD(typmod);
1089  READ_LOCATION_FIELD(location);
1090 
1091  READ_DONE();
1092 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
SQLValueFunctionOp
Definition: primnodes.h:1089
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readSubLink()

static SubLink* _readSubLink ( void  )
static

Definition at line 807 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

808 {
810 
811  READ_ENUM_FIELD(subLinkType, SubLinkType);
812  READ_INT_FIELD(subLinkId);
813  READ_NODE_FIELD(testexpr);
814  READ_NODE_FIELD(operName);
815  READ_NODE_FIELD(subselect);
816  READ_LOCATION_FIELD(location);
817 
818  READ_DONE();
819 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
SubLinkType
Definition: primnodes.h:618
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readSubPlan()

static SubPlan* _readSubPlan ( void  )
static

Definition at line 2326 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_FLOAT_FIELD, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

2327 {
2329 
2330  READ_ENUM_FIELD(subLinkType, SubLinkType);
2331  READ_NODE_FIELD(testexpr);
2332  READ_NODE_FIELD(paramIds);
2333  READ_INT_FIELD(plan_id);
2334  READ_STRING_FIELD(plan_name);
2335  READ_OID_FIELD(firstColType);
2336  READ_INT_FIELD(firstColTypmod);
2337  READ_OID_FIELD(firstColCollation);
2338  READ_BOOL_FIELD(useHashTable);
2339  READ_BOOL_FIELD(unknownEqFalse);
2340  READ_BOOL_FIELD(parallel_safe);
2341  READ_NODE_FIELD(setParam);
2342  READ_NODE_FIELD(parParam);
2344  READ_FLOAT_FIELD(startup_cost);
2345  READ_FLOAT_FIELD(per_call_cost);
2346 
2347  READ_DONE();
2348 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:106
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
SubLinkType
Definition: primnodes.h:618
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readSubqueryScan()

static SubqueryScan* _readSubqueryScan ( void  )
static

Definition at line 1826 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1827 {
1829 
1830  ReadCommonScan(&local_node->scan);
1831 
1832  READ_NODE_FIELD(subplan);
1833 
1834  READ_DONE();
1835 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readTableFunc()

static TableFunc* _readTableFunc ( void  )
static

Definition at line 473 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

474 {
476 
477  READ_NODE_FIELD(ns_uris);
478  READ_NODE_FIELD(ns_names);
479  READ_NODE_FIELD(docexpr);
480  READ_NODE_FIELD(rowexpr);
481  READ_NODE_FIELD(colnames);
482  READ_NODE_FIELD(coltypes);
483  READ_NODE_FIELD(coltypmods);
484  READ_NODE_FIELD(colcollations);
485  READ_NODE_FIELD(colexprs);
486  READ_NODE_FIELD(coldefexprs);
487  READ_BITMAPSET_FIELD(notnulls);
488  READ_INT_FIELD(ordinalitycol);
489  READ_LOCATION_FIELD(location);
490 
491  READ_DONE();
492 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readTableFuncScan()

static TableFuncScan* _readTableFuncScan ( void  )
static

Definition at line 1872 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1873 {
1875 
1876  ReadCommonScan(&local_node->scan);
1877 
1878  READ_NODE_FIELD(tablefunc);
1879 
1880  READ_DONE();
1881 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readTableSampleClause()

static TableSampleClause* _readTableSampleClause ( void  )
static

Definition at line 1429 of file readfuncs.c.

References generate_unaccent_rules::args, READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1430 {
1432 
1433  READ_OID_FIELD(tsmhandler);
1435  READ_NODE_FIELD(repeatable);
1436 
1437  READ_DONE();
1438 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readTargetEntry()

static TargetEntry* _readTargetEntry ( void  )
static

Definition at line 1244 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, READ_STRING_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

1245 {
1247 
1248  READ_NODE_FIELD(expr);
1249  READ_INT_FIELD(resno);
1250  READ_STRING_FIELD(resname);
1251  READ_UINT_FIELD(ressortgroupref);
1252  READ_OID_FIELD(resorigtbl);
1253  READ_INT_FIELD(resorigcol);
1254  READ_BOOL_FIELD(resjunk);
1255 
1256  READ_DONE();
1257 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readTidScan()

static TidScan* _readTidScan ( void  )
static

Definition at line 1811 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1812 {
1814 
1815  ReadCommonScan(&local_node->scan);
1816 
1817  READ_NODE_FIELD(tidquals);
1818 
1819  READ_DONE();
1820 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readUnique()

static Unique* _readUnique ( void  )
static

Definition at line 2149 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_OID_ARRAY, and ReadCommonPlan().

Referenced by parseNodeString().

2150 {
2152 
2153  ReadCommonPlan(&local_node->plan);
2154 
2155  READ_INT_FIELD(numCols);
2156  READ_ATTRNUMBER_ARRAY(uniqColIdx, local_node->numCols);
2157  READ_OID_ARRAY(uniqOperators, local_node->numCols);
2158 
2159  READ_DONE();
2160 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readValuesScan()

static ValuesScan* _readValuesScan ( void  )
static

Definition at line 1857 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and ReadCommonScan().

Referenced by parseNodeString().

1858 {
1860 
1861  ReadCommonScan(&local_node->scan);
1862 
1863  READ_NODE_FIELD(values_lists);
1864 
1865  READ_DONE();
1866 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readVar()

static Var* _readVar ( void  )
static

Definition at line 514 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_OID_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

515 {
516  READ_LOCALS(Var);
517 
518  READ_UINT_FIELD(varno);
519  READ_INT_FIELD(varattno);
520  READ_OID_FIELD(vartype);
521  READ_INT_FIELD(vartypmod);
522  READ_OID_FIELD(varcollid);
523  READ_UINT_FIELD(varlevelsup);
524  READ_UINT_FIELD(varnoold);
525  READ_INT_FIELD(varoattno);
526  READ_LOCATION_FIELD(location);
527 
528  READ_DONE();
529 }
Definition: primnodes.h:163
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readWindowAgg()

static WindowAgg* _readWindowAgg ( void  )
static

Definition at line 2125 of file readfuncs.c.

References READ_ATTRNUMBER_ARRAY, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_ARRAY, READ_UINT_FIELD, and ReadCommonPlan().

Referenced by parseNodeString().

2126 {
2128 
2129  ReadCommonPlan(&local_node->plan);
2130 
2131  READ_UINT_FIELD(winref);
2132  READ_INT_FIELD(partNumCols);
2133  READ_ATTRNUMBER_ARRAY(partColIdx, local_node->partNumCols);
2134  READ_OID_ARRAY(partOperators, local_node->partNumCols);
2135  READ_INT_FIELD(ordNumCols);
2136  READ_ATTRNUMBER_ARRAY(ordColIdx, local_node->ordNumCols);
2137  READ_OID_ARRAY(ordOperators, local_node->ordNumCols);
2138  READ_INT_FIELD(frameOptions);
2139  READ_NODE_FIELD(startOffset);
2140  READ_NODE_FIELD(endOffset);
2141 
2142  READ_DONE();
2143 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:148
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:143

◆ _readWindowClause()

static WindowClause* _readWindowClause ( void  )
static

Definition at line 361 of file readfuncs.c.

References name, READ_BOOL_FIELD, READ_DONE, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_STRING_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

362 {
364 
366  READ_STRING_FIELD(refname);
367  READ_NODE_FIELD(partitionClause);
368  READ_NODE_FIELD(orderClause);
369  READ_INT_FIELD(frameOptions);
370  READ_NODE_FIELD(startOffset);
371  READ_NODE_FIELD(endOffset);
372  READ_UINT_FIELD(winref);
373  READ_BOOL_FIELD(copiedOrder);
374 
375  READ_DONE();
376 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
const char * name
Definition: encode.c:521
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readWindowFunc()

static WindowFunc* _readWindowFunc ( void  )
static

Definition at line 624 of file readfuncs.c.

References generate_unaccent_rules::args, READ_BOOL_FIELD, READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, READ_OID_FIELD, and READ_UINT_FIELD.

Referenced by parseNodeString().

625 {
627 
628  READ_OID_FIELD(winfnoid);
629  READ_OID_FIELD(wintype);
630  READ_OID_FIELD(wincollid);
631  READ_OID_FIELD(inputcollid);
633  READ_NODE_FIELD(aggfilter);
634  READ_UINT_FIELD(winref);
635  READ_BOOL_FIELD(winstar);
636  READ_BOOL_FIELD(winagg);
637  READ_LOCATION_FIELD(location);
638 
639  READ_DONE();
640 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readWithCheckOption()

static WithCheckOption* _readWithCheckOption ( void  )
static

Definition at line 312 of file readfuncs.c.

References READ_BOOL_FIELD, READ_DONE, READ_ENUM_FIELD, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

313 {
315 
316  READ_ENUM_FIELD(kind, WCOKind);
317  READ_STRING_FIELD(relname);
318  READ_STRING_FIELD(polname);
319  READ_NODE_FIELD(qual);
320  READ_BOOL_FIELD(cascaded);
321 
322  READ_DONE();
323 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
WCOKind
Definition: parsenodes.h:1117
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163

◆ _readWorkTableScan()

static WorkTableScan* _readWorkTableScan ( void  )
static

Definition at line 1903 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and ReadCommonScan().

Referenced by parseNodeString().

1904 {
1906 
1907  ReadCommonScan(&local_node->scan);
1908 
1909  READ_INT_FIELD(wtParam);
1910 
1911  READ_DONE();
1912 }
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1684
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ _readXmlExpr()

static XmlExpr* _readXmlExpr ( void  )
static

Definition at line 1098 of file readfuncs.c.

References generate_unaccent_rules::args, name, READ_DONE, READ_ENUM_FIELD, READ_INT_FIELD, READ_LOCALS, READ_LOCATION_FIELD, READ_NODE_FIELD, READ_OID_FIELD, READ_STRING_FIELD, generate_unaccent_rules::type, and xmloption.

Referenced by parseNodeString().

1099 {
1101 
1104  READ_NODE_FIELD(named_args);
1105  READ_NODE_FIELD(arg_names);
1109  READ_INT_FIELD(typmod);
1110  READ_LOCATION_FIELD(location);
1111 
1112  READ_DONE();
1113 }
XmlExprOp
Definition: primnodes.h:1128
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:124
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:58
XmlOptionType
Definition: primnodes.h:1140
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:87
const char * name
Definition: encode.c:521
int xmloption
Definition: xml.c:97
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:118
#define READ_DONE()
Definition: readfuncs.c:163
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ parseNodeString()

Node* parseNodeString ( void  )

Definition at line 2437 of file readfuncs.c.

References _readAgg(), _readAggref(), _readAlias(), _readAlternativeSubPlan(), _readAppend(), _readArrayCoerceExpr(), _readArrayExpr(), _readArrayRef(), _readBitmapAnd(), _readBitmapHeapScan(), _readBitmapIndexScan(), _readBitmapOr(), _readBooleanTest(), _readBoolExpr(), _readCaseExpr(), _readCaseTestExpr(), _readCaseWhen(), _readCoalesceExpr(), _readCoerceToDomain(), _readCoerceToDomainValue(), _readCoerceViaIO(), _readCollateExpr(), _readCommonTableExpr(), _readConst(), _readConvertRowtypeExpr(), _readCteScan(), _readCurrentOfExpr(), _readCustomScan(), _readDeclareCursorStmt(), _readDefElem(), _readDistinctExpr(), _readExtensibleNode(), _readFieldSelect(), _readFieldStore(), _readForeignScan(), _readFromExpr(), _readFuncExpr(), _readFunctionScan(), _readGather(), _readGatherMerge(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoin(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _readNextValueExpr(), _readNotifyStmt(), _readNullIfExpr(), _readNullTest(), _readOnConflictExpr(), _readOpExpr(), _readParam(), _readPartitionBoundSpec(), _readPartitionRangeDatum(), _readPlan(), _readPlanInvalItem(), _readPlannedStmt(), _readPlanRowMark(), _readProjectSet(), _readQuery(), _readRangeTblEntry(), _readRangeTblFunction(), _readRangeTblRef(), _readRangeVar(), _readRecursiveUnion(), _readRelabelType(), _readResult(), _readRowCompareExpr(), _readRowExpr(), _readRowMarkClause(), _readSampleScan(), _readScalarArrayOpExpr(), _readScan(), _readSeqScan(), _readSetOp(), _readSetOperationStmt(), _readSetToDefault(), _readSort(), _readSortGroupClause(), _readSQLValueFunction(), _readSubLink(), _readSubPlan(), _readSubqueryScan(), _readTableFunc(), _readTableFuncScan(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), _readXmlExpr(), elog, ERROR, length(), MATCH, pg_strtok(), and READ_TEMP_LOCALS.

Referenced by nodeRead().

2438 {
2439  void *return_value;
2440 
2441  READ_TEMP_LOCALS();
2442 
2443  token = pg_strtok(&length);
2444 
2445 #define MATCH(tokname, namelen) \
2446  (length == namelen && memcmp(token, tokname, namelen) == 0)
2447 
2448  if (MATCH("QUERY", 5))
2449  return_value = _readQuery();
2450  else if (MATCH("WITHCHECKOPTION", 15))
2451  return_value = _readWithCheckOption();
2452  else if (MATCH("SORTGROUPCLAUSE", 15))
2453  return_value = _readSortGroupClause();
2454  else if (MATCH("GROUPINGSET", 11))
2455  return_value = _readGroupingSet();
2456  else if (MATCH("WINDOWCLAUSE", 12))
2457  return_value = _readWindowClause();
2458  else if (MATCH("ROWMARKCLAUSE", 13))
2459  return_value = _readRowMarkClause();
2460  else if (MATCH("COMMONTABLEEXPR", 15))
2461  return_value = _readCommonTableExpr();
2462  else if (MATCH("SETOPERATIONSTMT", 16))
2463  return_value = _readSetOperationStmt();
2464  else if (MATCH("ALIAS", 5))
2465  return_value = _readAlias();
2466  else if (MATCH("RANGEVAR", 8))
2467  return_value = _readRangeVar();
2468  else if (MATCH("INTOCLAUSE", 10))
2469  return_value = _readIntoClause();
2470  else if (MATCH("TABLEFUNC", 9))
2471  return_value = _readTableFunc();
2472  else if (MATCH("VAR", 3))
2473  return_value = _readVar();
2474  else if (MATCH("CONST", 5))
2475  return_value = _readConst();
2476  else if (MATCH("PARAM", 5))
2477  return_value = _readParam();
2478  else if (MATCH("AGGREF", 6))
2479  return_value = _readAggref();
2480  else if (MATCH("GROUPINGFUNC", 12))
2481  return_value = _readGroupingFunc();
2482  else if (MATCH("WINDOWFUNC", 10))
2483  return_value = _readWindowFunc();
2484  else if (MATCH("ARRAYREF", 8))
2485  return_value = _readArrayRef();
2486  else if (MATCH("FUNCEXPR", 8))
2487  return_value = _readFuncExpr();
2488  else if (MATCH("NAMEDARGEXPR", 12))
2489  return_value = _readNamedArgExpr();
2490  else if (MATCH("OPEXPR", 6))
2491  return_value = _readOpExpr();
2492  else if (MATCH("DISTINCTEXPR", 12))
2493  return_value = _readDistinctExpr();
2494  else if (MATCH("NULLIFEXPR", 10))
2495  return_value = _readNullIfExpr();
2496  else if (MATCH("SCALARARRAYOPEXPR", 17))
2497  return_value = _readScalarArrayOpExpr();
2498  else if (MATCH("BOOLEXPR", 8))
2499  return_value = _readBoolExpr();
2500  else if (MATCH("SUBLINK", 7))
2501  return_value = _readSubLink();
2502  else if (MATCH("FIELDSELECT", 11))
2503  return_value = _readFieldSelect();
2504  else if (MATCH("FIELDSTORE", 10))
2505  return_value = _readFieldStore();
2506  else if (MATCH("RELABELTYPE", 11))
2507  return_value = _readRelabelType();
2508  else if (MATCH("COERCEVIAIO", 11))
2509  return_value = _readCoerceViaIO();
2510  else if (MATCH("ARRAYCOERCEEXPR", 15))
2511  return_value = _readArrayCoerceExpr();
2512  else if (MATCH("CONVERTROWTYPEEXPR", 18))
2513  return_value = _readConvertRowtypeExpr();
2514  else if (MATCH("COLLATE", 7))
2515  return_value = _readCollateExpr();
2516  else if (MATCH("CASE", 4))
2517  return_value = _readCaseExpr();
2518  else if (MATCH("WHEN", 4))
2519  return_value = _readCaseWhen();
2520  else if (MATCH("CASETESTEXPR", 12))
2521  return_value = _readCaseTestExpr();
2522  else if (MATCH("ARRAY", 5))
2523  return_value = _readArrayExpr();
2524  else if (MATCH("ROW", 3))
2525  return_value = _readRowExpr();
2526  else if (MATCH("ROWCOMPARE", 10))
2527  return_value = _readRowCompareExpr();
2528  else if (MATCH("COALESCE", 8))
2529  return_value = _readCoalesceExpr();
2530  else if (MATCH("MINMAX", 6))
2531  return_value = _readMinMaxExpr();
2532  else if (MATCH("SQLVALUEFUNCTION", 16))
2533  return_value = _readSQLValueFunction();
2534  else if (MATCH("XMLEXPR", 7))
2535  return_value = _readXmlExpr();
2536  else if (MATCH("NULLTEST", 8))
2537  return_value = _readNullTest();
2538  else if (MATCH("BOOLEANTEST", 11))
2539  return_value = _readBooleanTest();
2540  else if (MATCH("COERCETODOMAIN", 14))
2541  return_value = _readCoerceToDomain();
2542  else if (MATCH("COERCETODOMAINVALUE", 19))
2543  return_value = _readCoerceToDomainValue();
2544  else if (MATCH("SETTODEFAULT", 12))
2545  return_value = _readSetToDefault();
2546  else if (MATCH("CURRENTOFEXPR", 13))
2547  return_value = _readCurrentOfExpr();
2548  else if (MATCH("NEXTVALUEEXPR", 13))
2549  return_value = _readNextValueExpr();
2550  else if (MATCH("INFERENCEELEM", 13))
2551  return_value = _readInferenceElem();
2552  else if (MATCH("TARGETENTRY", 11))
2553  return_value = _readTargetEntry();
2554  else if (MATCH("RANGETBLREF", 11))
2555  return_value = _readRangeTblRef();
2556  else if (MATCH("JOINEXPR", 8))
2557  return_value = _readJoinExpr();
2558  else if (MATCH("FROMEXPR", 8))
2559  return_value = _readFromExpr();
2560  else if (MATCH("ONCONFLICTEXPR", 14))
2561  return_value = _readOnConflictExpr();
2562  else if (MATCH("RTE", 3))
2563  return_value = _readRangeTblEntry();
2564  else if (MATCH("RANGETBLFUNCTION", 16))
2565  return_value = _readRangeTblFunction();
2566  else if (MATCH("TABLESAMPLECLAUSE", 17))
2567  return_value = _readTableSampleClause();
2568  else if (MATCH("NOTIFY", 6))
2569  return_value = _readNotifyStmt();
2570  else if (MATCH("DEFELEM", 7))
2571  return_value = _readDefElem();
2572  else if (MATCH("DECLARECURSOR", 13))
2573  return_value = _readDeclareCursorStmt();
2574  else if (MATCH("PLANNEDSTMT", 11))
2575  return_value = _readPlannedStmt();
2576  else if (MATCH("PLAN", 4))
2577  return_value = _readPlan();
2578  else if (MATCH("RESULT", 6))
2579  return_value = _readResult();
2580  else if (MATCH("PROJECTSET", 10))
2581  return_value = _readProjectSet();
2582  else if (MATCH("MODIFYTABLE", 11))
2583  return_value = _readModifyTable();
2584  else if (MATCH("APPEND", 6))
2585  return_value = _readAppend();
2586  else if (MATCH("MERGEAPPEND", 11))
2587  return_value = _readMergeAppend();
2588  else if (MATCH("RECURSIVEUNION", 14))
2589  return_value = _readRecursiveUnion();
2590  else if (MATCH("BITMAPAND", 9))
2591  return_value = _readBitmapAnd();
2592  else if (MATCH("BITMAPOR", 8))
2593  return_value = _readBitmapOr();
2594  else if (MATCH("SCAN", 4))
2595  return_value = _readScan();
2596  else if (MATCH("SEQSCAN", 7))
2597  return_value = _readSeqScan();
2598  else if (MATCH("SAMPLESCAN", 10))
2599  return_value = _readSampleScan();
2600  else if (MATCH("INDEXSCAN", 9))
2601  return_value = _readIndexScan();
2602  else if (MATCH("INDEXONLYSCAN", 13))
2603  return_value = _readIndexOnlyScan();
2604  else if (MATCH("BITMAPINDEXSCAN", 15))
2605  return_value = _readBitmapIndexScan();
2606  else if (MATCH("BITMAPHEAPSCAN", 14))
2607  return_value = _readBitmapHeapScan();
2608  else if (MATCH("TIDSCAN", 7))
2609  return_value = _readTidScan();
2610  else if (MATCH("SUBQUERYSCAN", 12))
2611  return_value = _readSubqueryScan();
2612  else if (MATCH("FUNCTIONSCAN", 12))
2613  return_value = _readFunctionScan();
2614  else if (MATCH("VALUESSCAN", 10))
2615  return_value = _readValuesScan();
2616  else if (MATCH("TABLEFUNCSCAN", 13))
2617  return_value = _readTableFuncScan();
2618  else if (MATCH("CTESCAN", 7))
2619  return_value = _readCteScan();
2620  else if (MATCH("WORKTABLESCAN", 13))
2621  return_value = _readWorkTableScan();
2622  else if (MATCH("FOREIGNSCAN", 11))
2623  return_value = _readForeignScan();
2624  else if (MATCH("CUSTOMSCAN", 10))
2625  return_value = _readCustomScan();
2626  else if (MATCH("JOIN", 4))
2627  return_value = _readJoin();
2628  else if (MATCH("NESTLOOP", 8))
2629  return_value = _readNestLoop();
2630  else if (MATCH("MERGEJOIN", 9))
2631  return_value = _readMergeJoin();
2632  else if (MATCH("HASHJOIN", 8))
2633  return_value = _readHashJoin();
2634  else if (MATCH("MATERIAL", 8))
2635  return_value = _readMaterial();
2636  else if (MATCH("SORT", 4))
2637  return_value = _readSort();
2638  else if (MATCH("GROUP", 5))
2639  return_value = _readGroup();
2640  else if (MATCH("AGG", 3))
2641  return_value = _readAgg();
2642  else if (MATCH("WINDOWAGG", 9))
2643  return_value = _readWindowAgg();
2644  else if (MATCH("UNIQUE", 6))
2645  return_value = _readUnique();
2646  else if (MATCH("GATHER", 6))
2647  return_value = _readGather();
2648  else if (MATCH("GATHERMERGE", 11))
2649  return_value = _readGatherMerge();
2650  else if (MATCH("HASH", 4))
2651  return_value = _readHash();
2652  else if (MATCH("SETOP", 5))
2653  return_value = _readSetOp();
2654  else if (MATCH("LOCKROWS", 8))
2655  return_value = _readLockRows();
2656  else if (MATCH("LIMIT", 5))
2657  return_value = _readLimit();
2658  else if (MATCH("NESTLOOPPARAM", 13))
2659  return_value = _readNestLoopParam();
2660  else if (MATCH("PLANROWMARK", 11))
2661  return_value = _readPlanRowMark();
2662  else if (MATCH("PLANINVALITEM", 13))
2663  return_value = _readPlanInvalItem();
2664  else if (MATCH("SUBPLAN", 7))
2665  return_value = _readSubPlan();
2666  else if (MATCH("ALTERNATIVESUBPLAN", 18))
2667  return_value = _readAlternativeSubPlan();
2668  else if (MATCH("EXTENSIBLENODE", 14))
2669  return_value = _readExtensibleNode();
2670  else if (MATCH("PARTITIONBOUNDSPEC", 18))
2671  return_value = _readPartitionBoundSpec();
2672  else if (MATCH("PARTITIONRANGEDATUM", 19))
2673  return_value = _readPartitionRangeDatum();
2674  else
2675  {
2676  elog(ERROR, "badly formatted node string \"%.32s\"...", token);
2677  return_value = NULL; /* keep compiler quiet */
2678  }
2679 
2680  return (Node *) return_value;
2681 }
static NullTest * _readNullTest(void)
Definition: readfuncs.c:1119
static JoinExpr * _readJoinExpr(void)
Definition: readfuncs.c:1276
static RangeVar * _readRangeVar(void)
Definition: readfuncs.c:453
static RangeTblEntry * _readRangeTblEntry(void)
Definition: readfuncs.c:1334
static DefElem * _readDefElem(void)
Definition: readfuncs.c:1444
static RowExpr * _readRowExpr(void)
Definition: readfuncs.c:1013
int length(const List *list)
Definition: list.c:1309
static MergeJoin * _readMergeJoin(void)
Definition: readfuncs.c:2013
static MinMaxExpr * _readMinMaxExpr(void)
Definition: readfuncs.c:1064
static RowMarkClause * _readRowMarkClause(void)
Definition: readfuncs.c:382
static FuncExpr * _readFuncExpr(void)
Definition: readfuncs.c:666
static Hash * _readHash(void)
Definition: readfuncs.c:2207
char * pg_strtok(int *length)
Definition: read.c:107
static Result * _readResult(void)
Definition: readfuncs.c:1533
static Query * _readQuery(void)
Definition: readfuncs.c:235
static RowCompareExpr * _readRowCompareExpr(void)
Definition: readfuncs.c:1030
static Param * _readParam(void)
Definition: readfuncs.c:560
static PlanInvalItem * _readPlanInvalItem(void)
Definition: readfuncs.c:2312
static WindowAgg * _readWindowAgg(void)
Definition: readfuncs.c:2125
static IndexScan * _readIndexScan(void)
Definition: readfuncs.c:1738
static NotifyStmt * _readNotifyStmt(void)
Definition: readfuncs.c:283
static Scan * _readScan(void)
Definition: readfuncs.c:1697
static NamedArgExpr * _readNamedArgExpr(void)
Definition: readfuncs.c:687
static LockRows * _readLockRows(void)
Definition: readfuncs.c:2246
static CurrentOfExpr * _readCurrentOfExpr(void)
Definition: readfuncs.c:1200
static CollateExpr * _readCollateExpr(void)
Definition: readfuncs.c:932
static SubqueryScan * _readSubqueryScan(void)
Definition: readfuncs.c:1826
static BitmapIndexScan * _readBitmapIndexScan(void)
Definition: readfuncs.c:1778
static CaseExpr * _readCaseExpr(void)
Definition: readfuncs.c:947
static FunctionScan * _readFunctionScan(void)
Definition: readfuncs.c:1841
static PartitionBoundSpec * _readPartitionBoundSpec(void)
Definition: readfuncs.c:2397
static Unique * _readUnique(void)
Definition: readfuncs.c:2149
static MergeAppend * _readMergeAppend(void)
Definition: readfuncs.c:1612
Definition: nodes.h:512
static WindowFunc * _readWindowFunc(void)
Definition: readfuncs.c:624
static WindowClause * _readWindowClause(void)
Definition: readfuncs.c:361
static OpExpr * _readOpExpr(void)
Definition: readfuncs.c:703
static IndexOnlyScan * _readIndexOnlyScan(void)
Definition: readfuncs.c:1759
static BitmapAnd * _readBitmapAnd(void)
Definition: readfuncs.c:1652
static FromExpr * _readFromExpr(void)
Definition: readfuncs.c:1296
static Aggref * _readAggref(void)
Definition: readfuncs.c:578
static NestLoop * _readNestLoop(void)
Definition: readfuncs.c:1998
static ModifyTable * _readModifyTable(void)
Definition: readfuncs.c:1561
static NextValueExpr * _readNextValueExpr(void)
Definition: readfuncs.c:1215
static DistinctExpr * _readDistinctExpr(void)
Definition: readfuncs.c:723
static ArrayCoerceExpr * _readArrayCoerceExpr(void)
Definition: readfuncs.c:897
static TargetEntry * _readTargetEntry(void)
Definition: readfuncs.c:1244
static Agg * _readAgg(void)
Definition: readfuncs.c:2102
static SeqScan * _readSeqScan(void)
Definition: readfuncs.c:1710
static AlternativeSubPlan * _readAlternativeSubPlan(void)
Definition: readfuncs.c:2354
static CteScan * _readCteScan(void)
Definition: readfuncs.c:1887
#define ERROR
Definition: elog.h:43
static GroupingFunc * _readGroupingFunc(void)
Definition: readfuncs.c:607
static CoerceToDomain * _readCoerceToDomain(void)
Definition: readfuncs.c:1150
static SubLink * _readSubLink(void)
Definition: readfuncs.c:807
static HashJoin * _readHashJoin(void)
Definition: readfuncs.c:2038
static ValuesScan * _readValuesScan(void)
Definition: readfuncs.c:1857
static ConvertRowtypeExpr * _readConvertRowtypeExpr(void)
Definition: readfuncs.c:916
static OnConflictExpr * _readOnConflictExpr(void)
Definition: readfuncs.c:1310
static NullIfExpr * _readNullIfExpr(void)
Definition: readfuncs.c:743
static Append * _readAppend(void)
Definition: readfuncs.c:1595
static ExtensibleNode * _readExtensibleNode(void)
Definition: readfuncs.c:2367
static PlanRowMark * _readPlanRowMark(void)
Definition: readfuncs.c:2292
static FieldSelect * _readFieldSelect(void)
Definition: readfuncs.c:829
static ArrayRef * _readArrayRef(void)
Definition: readfuncs.c:646
static CaseWhen * _readCaseWhen(void)
Definition: readfuncs.c:965
static SQLValueFunction * _readSQLValueFunction(void)
Definition: readfuncs.c:1082
#define MATCH(tokname, namelen)
static ForeignScan * _readForeignScan(void)
Definition: readfuncs.c:1918
static RelabelType * _readRelabelType(void)
Definition: readfuncs.c:862
static SetOp * _readSetOp(void)
Definition: readfuncs.c:2224
static SortGroupClause * _readSortGroupClause(void)
Definition: readfuncs.c:329
static Limit * _readLimit(void)
Definition: readfuncs.c:2262
static PartitionRangeDatum * _readPartitionRangeDatum(void)
Definition: readfuncs.c:2417
static GatherMerge * _readGatherMerge(void)
Definition: readfuncs.c:2185
static DeclareCursorStmt * _readDeclareCursorStmt(void)
Definition: readfuncs.c:297
static Gather * _readGather(void)
Definition: readfuncs.c:2166
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53
static Var * _readVar(void)
Definition: readfuncs.c:514
static SampleScan * _readSampleScan(void)
Definition: readfuncs.c:1723
static SubPlan * _readSubPlan(void)
Definition: readfuncs.c:2326
static TidScan * _readTidScan(void)
Definition: readfuncs.c:1811
static CoerceToDomainValue * _readCoerceToDomainValue(void)
Definition: readfuncs.c:1168
static TableFuncScan * _readTableFuncScan(void)
Definition: readfuncs.c:1872
static IntoClause * _readIntoClause(void)
Definition: readfuncs.c:495
static Const * _readConst(void)
Definition: readfuncs.c:535
static SetOperationStmt * _readSetOperationStmt(void)
Definition: readfuncs.c:420
static PlannedStmt * _readPlannedStmt(void)
Definition: readfuncs.c:1461
static Material * _readMaterial(void)
Definition: readfuncs.c:2053
static CaseTestExpr * _readCaseTestExpr(void)
Definition: readfuncs.c:980
static Alias * _readAlias(void)
Definition: readfuncs.c:442
static BitmapOr * _readBitmapOr(void)
Definition: readfuncs.c:1667
static RangeTblRef * _readRangeTblRef(void)
Definition: readfuncs.c:1263
static RecursiveUnion * _readRecursiveUnion(void)
Definition: readfuncs.c:1633
static FieldStore * _readFieldStore(void)
Definition: readfuncs.c:846
static CoalesceExpr * _readCoalesceExpr(void)
Definition: readfuncs.c:1048
static SetToDefault * _readSetToDefault(void)
Definition: readfuncs.c:1184
static WithCheckOption * _readWithCheckOption(void)
Definition: readfuncs.c:312
static InferenceElem * _readInferenceElem(void)
Definition: readfuncs.c:1229
static ScalarArrayOpExpr * _readScalarArrayOpExpr(void)
Definition: readfuncs.c:763
static BoolExpr * _readBoolExpr(void)
Definition: readfuncs.c:781
static CustomScan * _readCustomScan(void)
Definition: readfuncs.c:1940
static CommonTableExpr * _readCommonTableExpr(void)
Definition: readfuncs.c:398
static ArrayExpr * _readArrayExpr(void)
Definition: readfuncs.c:995
#define elog
Definition: elog.h:219
static RangeTblFunction * _readRangeTblFunction(void)
Definition: readfuncs.c:1410
static BooleanTest * _readBooleanTest(void)
Definition: readfuncs.c:1135
static Plan * _readPlan(void)
Definition: readfuncs.c:1520
static XmlExpr * _readXmlExpr(void)
Definition: readfuncs.c:1098
static TableFunc * _readTableFunc(void)
Definition: readfuncs.c:473
static TableSampleClause * _readTableSampleClause(void)
Definition: readfuncs.c:1429
static NestLoopParam * _readNestLoopParam(void)
Definition: readfuncs.c:2278
static ProjectSet * _readProjectSet(void)
Definition: readfuncs.c:1548
static BitmapHeapScan * _readBitmapHeapScan(void)
Definition: readfuncs.c:1796
static Join * _readJoin(void)
Definition: readfuncs.c:1985
static Sort * _readSort(void)
Definition: readfuncs.c:2066
static CoerceViaIO * _readCoerceViaIO(void)
Definition: readfuncs.c:880
static Group * _readGroup(void)
Definition: readfuncs.c:2085
static GroupingSet * _readGroupingSet(void)
Definition: readfuncs.c:346
static WorkTableScan * _readWorkTableScan(void)
Definition: readfuncs.c:1903

◆ readAttrNumberCols()

AttrNumber* readAttrNumberCols ( int  numCols)

Definition at line 2749 of file readfuncs.c.

References i, palloc(), and pg_strtok().

2750 {
2751  int tokenLength,
2752  i;
2753  char *token;
2754  AttrNumber *attr_vals;
2755 
2756  if (numCols <= 0)
2757  return NULL;
2758 
2759  attr_vals = (AttrNumber *) palloc(numCols * sizeof(AttrNumber));
2760  for (i = 0; i < numCols; i++)
2761  {
2762  token = pg_strtok(&tokenLength);
2763  attr_vals[i] = atoi(token);
2764  }
2765 
2766  return attr_vals;
2767 }
char * pg_strtok(int *length)
Definition: read.c:107
void * palloc(Size size)
Definition: mcxt.c:848
int i
int16 AttrNumber
Definition: attnum.h:21

◆ readBitmapset()

Bitmapset* readBitmapset ( void  )

Definition at line 226 of file readfuncs.c.

References _readBitmapset().

227 {
228  return _readBitmapset();
229 }
static Bitmapset * _readBitmapset(void)
Definition: readfuncs.c:185

◆ readBoolCols()

bool* readBoolCols ( int  numCols)

Definition at line 2821 of file readfuncs.c.

References i, palloc(), pg_strtok(), and strtobool.

2822 {
2823  int tokenLength,
2824  i;
2825  char *token;
2826  bool *bool_vals;
2827 
2828  if (numCols <= 0)
2829  return NULL;
2830 
2831  bool_vals = (bool *) palloc(numCols * sizeof(bool));
2832  for (i = 0; i < numCols; i++)
2833  {
2834  token = pg_strtok(&tokenLength);
2835  bool_vals[i] = strtobool(token);
2836  }
2837 
2838  return bool_vals;
2839 }
char * pg_strtok(int *length)
Definition: read.c:107
#define strtobool(x)
Definition: readfuncs.c:175
void * palloc(Size size)
Definition: mcxt.c:848
int i

◆ ReadCommonJoin()

static void ReadCommonJoin ( Join local_node)
static

Definition at line 1970 of file readfuncs.c.

References Join::plan, READ_BOOL_FIELD, READ_ENUM_FIELD, READ_NODE_FIELD, READ_TEMP_LOCALS, and ReadCommonPlan().

Referenced by _readHashJoin(), _readJoin(), _readMergeJoin(), and _readNestLoop().

1971 {
1972  READ_TEMP_LOCALS();
1973 
1974  ReadCommonPlan(&local_node->plan);
1975 
1976  READ_ENUM_FIELD(jointype, JoinType);
1977  READ_BOOL_FIELD(inner_unique);
1978  READ_NODE_FIELD(joinqual);
1979 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
JoinType
Definition: nodes.h:676
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:100
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53
Plan plan
Definition: plannodes.h:667

◆ ReadCommonPlan()

static void ReadCommonPlan ( Plan local_node)
static

Definition at line 1496 of file readfuncs.c.

References READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_FLOAT_FIELD, READ_INT_FIELD, READ_NODE_FIELD, and READ_TEMP_LOCALS.

Referenced by _readAgg(), _readAppend(), _readBitmapAnd(), _readBitmapOr(), _readGather(), _readGatherMerge(), _readGroup(), _readHash(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readModifyTable(), _readPlan(), _readProjectSet(), _readRecursiveUnion(), _readResult(), _readSetOp(), _readSort(), _readUnique(), _readWindowAgg(), ReadCommonJoin(), and ReadCommonScan().

1497 {
1498  READ_TEMP_LOCALS();
1499 
1500  READ_FLOAT_FIELD(startup_cost);
1501  READ_FLOAT_FIELD(total_cost);
1502  READ_FLOAT_FIELD(plan_rows);
1503  READ_INT_FIELD(plan_width);
1504  READ_BOOL_FIELD(parallel_aware);
1505  READ_BOOL_FIELD(parallel_safe);
1506  READ_INT_FIELD(plan_node_id);
1507  READ_NODE_FIELD(targetlist);
1508  READ_NODE_FIELD(qual);
1509  READ_NODE_FIELD(lefttree);
1510  READ_NODE_FIELD(righttree);
1511  READ_NODE_FIELD(initPlan);
1512  READ_BITMAPSET_FIELD(extParam);
1513  READ_BITMAPSET_FIELD(allParam);
1514 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:112
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:106
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:131
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:137
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:63

◆ ReadCommonScan()

static void ReadCommonScan ( Scan local_node)
static

Definition at line 1684 of file readfuncs.c.

References Scan::plan, READ_TEMP_LOCALS, READ_UINT_FIELD, and ReadCommonPlan().

Referenced by _readBitmapHeapScan(), _readBitmapIndexScan(), _readCteScan(), _readCustomScan(), _readForeignScan(), _readFunctionScan(), _readIndexOnlyScan(), _readIndexScan(), _readSampleScan(), _readScan(), _readSeqScan(), _readSubqueryScan(), _readTableFuncScan(), _readTidScan(), _readValuesScan(), and _readWorkTableScan().

1685 {
1686  READ_TEMP_LOCALS();
1687 
1688  ReadCommonPlan(&local_node->plan);
1689 
1690  READ_UINT_FIELD(scanrelid);
1691 }
Plan plan
Definition: plannodes.h:329
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1496
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:69
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:53

◆ readDatum()

Datum readDatum ( bool  typbyval)

Definition at line 2692 of file readfuncs.c.

References atoui, elog, ERROR, i, length(), palloc(), pg_strtok(), and PointerGetDatum.

Referenced by _readConst().

2693 {
2694  Size length,
2695  i;
2696  int tokenLength;
2697  char *token;
2698  Datum res;
2699  char *s;
2700 
2701  /*
2702  * read the actual length of the value
2703  */
2704  token = pg_strtok(&tokenLength);
2705  length = atoui(token);
2706 
2707  token = pg_strtok(&tokenLength); /* read the '[' */
2708  if (token == NULL || token[0] != '[')
2709  elog(ERROR, "expected \"[\" to start datum, but got \"%s\"; length = %zu",
2710  token ? (const char *) token : "[NULL]", length);
2711 
2712  if (typbyval)
2713  {
2714  if (length > (Size) sizeof(Datum))
2715  elog(ERROR, "byval datum but length = %zu", length);
2716  res = (Datum) 0;
2717  s = (char *) (&res);
2718  for (i = 0; i < (Size) sizeof(Datum); i++)
2719  {
2720  token = pg_strtok(&tokenLength);
2721  s[i] = (char) atoi(token);
2722  }
2723  }
2724  else if (length <= 0)
2725  res = (Datum) NULL;
2726  else
2727  {
2728  s = (char *) palloc(length);
2729  for (i = 0; i < length; i++)
2730  {
2731  token = pg_strtok(&tokenLength);
2732  s[i] = (char) atoi(token);
2733  }
2734  res = PointerGetDatum(s);
2735  }
2736 
2737  token = pg_strtok(&tokenLength); /* read the ']' */
2738  if (token == NULL || token[0] != ']')
2739  elog(ERROR, "expected \"]\" to end datum, but got \"%s\"; length = %zu",
2740  token ? (const char *) token : "[NULL]", length);
2741 
2742  return res;
2743 }
#define atoui(x)
Definition: readfuncs.c:173
int length(const List *list)
Definition: list.c:1309
char * pg_strtok(int *length)
Definition: read.c:107
#define PointerGetDatum(X)
Definition: postgres.h:562
#define ERROR
Definition: elog.h:43
uintptr_t Datum
Definition: postgres.h:372
size_t Size
Definition: c.h:404
void * palloc(Size size)
Definition: mcxt.c:848
int i