PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 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_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 atooid(x)   ((Oid) 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 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 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 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 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

#define atooid (   x)    ((Oid) strtoul((x), NULL, 10))

Definition at line 167 of file readfuncs.c.

Referenced by readOidCols().

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

Definition at line 165 of file readfuncs.c.

Referenced by readDatum().

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

Referenced by parseNodeString().

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

Definition at line 171 of file readfuncs.c.

Referenced by _readCustomScan(), and _readExtensibleNode().

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
AttrNumber * readAttrNumberCols(int numCols)
Definition: readfuncs.c:2632

Definition at line 135 of file readfuncs.c.

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

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
static Bitmapset * _readBitmapset(void)
Definition: readfuncs.c:179

Definition at line 129 of file readfuncs.c.

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

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
bool * readBoolCols(int numCols)
Definition: readfuncs.c:2704

Definition at line 150 of file readfuncs.c.

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

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

Definition at line 86 of file readfuncs.c.

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

#define READ_DONE ( )    return local_node

Definition at line 155 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(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoin(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _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(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), and _readXmlExpr().

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 98 of file readfuncs.c.

Referenced by _readSubPlan(), and ReadCommonPlan().

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
int * readIntCols(int numCols)
Definition: readfuncs.c:2680

Definition at line 145 of file readfuncs.c.

Referenced by _readMergeJoin().

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

Definition at line 57 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(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _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(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), and _readXmlExpr().

#define READ_LOCALS_NO_FIELDS (   nodeTypeName)    nodeTypeName *local_node = makeNode(nodeTypeName)
#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:1271
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 74 of file readfuncs.c.

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

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
void * nodeRead(char *token, int tok_len)
Definition: read.c:278
#define NULL
Definition: c.h:226

Definition at line 123 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(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readValuesScan(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readXmlExpr(), ReadCommonJoin(), and ReadCommonPlan().

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
Oid * readOidCols(int numCols)
Definition: readfuncs.c:2656

Definition at line 140 of file readfuncs.c.

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

#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:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define nullable_string(token, length)
Definition: readfuncs.c:171

Definition at line 110 of file readfuncs.c.

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

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

Definition at line 52 of file readfuncs.c.

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

#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:165
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107

Definition at line 68 of file readfuncs.c.

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

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

Definition at line 169 of file readfuncs.c.

Referenced by readBoolCols().

Function Documentation

static Agg* _readAgg ( void  )
static

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

2021 {
2022  READ_LOCALS(Agg);
2023 
2024  ReadCommonPlan(&local_node->plan);
2025 
2026  READ_ENUM_FIELD(aggstrategy, AggStrategy);
2027  READ_ENUM_FIELD(aggsplit, AggSplit);
2028  READ_INT_FIELD(numCols);
2029  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2030  READ_OID_ARRAY(grpOperators, local_node->numCols);
2031  READ_LONG_FIELD(numGroups);
2032  READ_BITMAPSET_FIELD(aggParams);
2033  READ_NODE_FIELD(groupingSets);
2034  READ_NODE_FIELD(chain);
2035 
2036  READ_DONE();
2037 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:74
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
AggSplit
Definition: nodes.h:748
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
AggStrategy
Definition: nodes.h:727
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
Definition: plannodes.h:730
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static Aggref* _readAggref ( void  )
static

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

548 {
550 
551  READ_OID_FIELD(aggfnoid);
552  READ_OID_FIELD(aggtype);
553  READ_OID_FIELD(aggcollid);
554  READ_OID_FIELD(inputcollid);
555  READ_OID_FIELD(aggtranstype);
556  READ_NODE_FIELD(aggargtypes);
557  READ_NODE_FIELD(aggdirectargs);
559  READ_NODE_FIELD(aggorder);
560  READ_NODE_FIELD(aggdistinct);
561  READ_NODE_FIELD(aggfilter);
562  READ_BOOL_FIELD(aggstar);
563  READ_BOOL_FIELD(aggvariadic);
564  READ_CHAR_FIELD(aggkind);
565  READ_UINT_FIELD(agglevelsup);
566  READ_ENUM_FIELD(aggsplit, AggSplit);
567  READ_LOCATION_FIELD(location);
568 
569  READ_DONE();
570 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:86
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
AggSplit
Definition: nodes.h:748
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static Alias* _readAlias ( void  )
static

Definition at line 435 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

436 {
438 
439  READ_STRING_FIELD(aliasname);
440  READ_NODE_FIELD(colnames);
441 
442  READ_DONE();
443 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static AlternativeSubPlan* _readAlternativeSubPlan ( void  )
static

Definition at line 2250 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

2251 {
2253 
2254  READ_NODE_FIELD(subplans);
2255 
2256  READ_DONE();
2257 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static Append* _readAppend ( void  )
static

Definition at line 1535 of file readfuncs.c.

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

Referenced by parseNodeString().

1536 {
1538 
1539  ReadCommonPlan(&local_node->plan);
1540 
1541  READ_NODE_FIELD(appendplans);
1542 
1543  READ_DONE();
1544 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static ArrayCoerceExpr* _readArrayCoerceExpr ( void  )
static

Definition at line 866 of file readfuncs.c.

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

Referenced by parseNodeString().

867 {
869 
871  READ_OID_FIELD(elemfuncid);
872  READ_OID_FIELD(resulttype);
873  READ_INT_FIELD(resulttypmod);
874  READ_OID_FIELD(resultcollid);
875  READ_BOOL_FIELD(isExplicit);
876  READ_ENUM_FIELD(coerceformat, CoercionForm);
877  READ_LOCATION_FIELD(location);
878 
879  READ_DONE();
880 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
CoercionForm
Definition: primnodes.h:413
static ArrayExpr* _readArrayExpr ( void  )
static

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

966 {
968 
969  READ_OID_FIELD(array_typeid);
970  READ_OID_FIELD(array_collid);
971  READ_OID_FIELD(element_typeid);
972  READ_NODE_FIELD(elements);
973  READ_BOOL_FIELD(multidims);
974  READ_LOCATION_FIELD(location);
975 
976  READ_DONE();
977 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static ArrayRef* _readArrayRef ( void  )
static

Definition at line 615 of file readfuncs.c.

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

Referenced by parseNodeString().

616 {
618 
619  READ_OID_FIELD(refarraytype);
620  READ_OID_FIELD(refelemtype);
621  READ_INT_FIELD(reftypmod);
622  READ_OID_FIELD(refcollid);
623  READ_NODE_FIELD(refupperindexpr);
624  READ_NODE_FIELD(reflowerindexpr);
625  READ_NODE_FIELD(refexpr);
626  READ_NODE_FIELD(refassgnexpr);
627 
628  READ_DONE();
629 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static BitmapAnd* _readBitmapAnd ( void  )
static

Definition at line 1589 of file readfuncs.c.

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

Referenced by parseNodeString().

1590 {
1592 
1593  ReadCommonPlan(&local_node->plan);
1594 
1595  READ_NODE_FIELD(bitmapplans);
1596 
1597  READ_DONE();
1598 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static BitmapHeapScan* _readBitmapHeapScan ( void  )
static

Definition at line 1731 of file readfuncs.c.

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

Referenced by parseNodeString().

1732 {
1734 
1735  ReadCommonScan(&local_node->scan);
1736 
1737  READ_NODE_FIELD(bitmapqualorig);
1738 
1739  READ_DONE();
1740 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static BitmapIndexScan* _readBitmapIndexScan ( void  )
static

Definition at line 1714 of file readfuncs.c.

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

Referenced by parseNodeString().

1715 {
1717 
1718  ReadCommonScan(&local_node->scan);
1719 
1720  READ_OID_FIELD(indexid);
1721  READ_NODE_FIELD(indexqual);
1722  READ_NODE_FIELD(indexqualorig);
1723 
1724  READ_DONE();
1725 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static BitmapOr* _readBitmapOr ( void  )
static

Definition at line 1604 of file readfuncs.c.

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

Referenced by parseNodeString().

1605 {
1607 
1608  ReadCommonPlan(&local_node->plan);
1609 
1610  READ_NODE_FIELD(bitmapplans);
1611 
1612  READ_DONE();
1613 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static Bitmapset* _readBitmapset ( void  )
static

Definition at line 179 of file readfuncs.c.

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

Referenced by readBitmapset().

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

Definition at line 1105 of file readfuncs.c.

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

Referenced by parseNodeString().

1106 {
1108 
1110  READ_ENUM_FIELD(booltesttype, BoolTestType);
1111  READ_LOCATION_FIELD(location);
1112 
1113  READ_DONE();
1114 }
BoolTestType
Definition: primnodes.h:1171
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
static BoolExpr* _readBoolExpr ( void  )
static

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

751 {
753 
754  /* do-it-yourself enum representation */
755  token = pg_strtok(&length); /* skip :boolop */
756  token = pg_strtok(&length); /* get field value */
757  if (strncmp(token, "and", 3) == 0)
758  local_node->boolop = AND_EXPR;
759  else if (strncmp(token, "or", 2) == 0)
760  local_node->boolop = OR_EXPR;
761  else if (strncmp(token, "not", 3) == 0)
762  local_node->boolop = NOT_EXPR;
763  else
764  elog(ERROR, "unrecognized boolop \"%.*s\"", length, token);
765 
767  READ_LOCATION_FIELD(location);
768 
769  READ_DONE();
770 }
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define ERROR
Definition: elog.h:43
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define elog
Definition: elog.h:219
static CaseExpr* _readCaseExpr ( void  )
static

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

918 {
920 
921  READ_OID_FIELD(casetype);
922  READ_OID_FIELD(casecollid);
925  READ_NODE_FIELD(defresult);
926  READ_LOCATION_FIELD(location);
927 
928  READ_DONE();
929 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
static CaseTestExpr* _readCaseTestExpr ( void  )
static

Definition at line 950 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_OID_FIELD.

Referenced by parseNodeString().

951 {
953 
954  READ_OID_FIELD(typeId);
955  READ_INT_FIELD(typeMod);
956  READ_OID_FIELD(collation);
957 
958  READ_DONE();
959 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static CaseWhen* _readCaseWhen ( void  )
static

Definition at line 935 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

936 {
938 
939  READ_NODE_FIELD(expr);
940  READ_NODE_FIELD(result);
941  READ_LOCATION_FIELD(location);
942 
943  READ_DONE();
944 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static CoalesceExpr* _readCoalesceExpr ( void  )
static

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

1019 {
1021 
1022  READ_OID_FIELD(coalescetype);
1023  READ_OID_FIELD(coalescecollid);
1025  READ_LOCATION_FIELD(location);
1026 
1027  READ_DONE();
1028 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static CoerceToDomain* _readCoerceToDomain ( void  )
static

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

1121 {
1123 
1125  READ_OID_FIELD(resulttype);
1126  READ_INT_FIELD(resulttypmod);
1127  READ_OID_FIELD(resultcollid);
1128  READ_ENUM_FIELD(coercionformat, CoercionForm);
1129  READ_LOCATION_FIELD(location);
1130 
1131  READ_DONE();
1132 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
CoercionForm
Definition: primnodes.h:413
static CoerceToDomainValue* _readCoerceToDomainValue ( void  )
static

Definition at line 1138 of file readfuncs.c.

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

Referenced by parseNodeString().

1139 {
1141 
1142  READ_OID_FIELD(typeId);
1143  READ_INT_FIELD(typeMod);
1144  READ_OID_FIELD(collation);
1145  READ_LOCATION_FIELD(location);
1146 
1147  READ_DONE();
1148 }
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static CoerceViaIO* _readCoerceViaIO ( void  )
static

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

850 {
852 
854  READ_OID_FIELD(resulttype);
855  READ_OID_FIELD(resultcollid);
856  READ_ENUM_FIELD(coerceformat, CoercionForm);
857  READ_LOCATION_FIELD(location);
858 
859  READ_DONE();
860 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
CoercionForm
Definition: primnodes.h:413
static CollateExpr* _readCollateExpr ( void  )
static

Definition at line 902 of file readfuncs.c.

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

Referenced by parseNodeString().

903 {
905 
907  READ_OID_FIELD(collOid);
908  READ_LOCATION_FIELD(location);
909 
910  READ_DONE();
911 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
static CommonTableExpr* _readCommonTableExpr ( void  )
static

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

392 {
394 
395  READ_STRING_FIELD(ctename);
396  READ_NODE_FIELD(aliascolnames);
397  READ_NODE_FIELD(ctequery);
398  READ_LOCATION_FIELD(location);
399  READ_BOOL_FIELD(cterecursive);
400  READ_INT_FIELD(cterefcount);
401  READ_NODE_FIELD(ctecolnames);
402  READ_NODE_FIELD(ctecoltypes);
403  READ_NODE_FIELD(ctecoltypmods);
404  READ_NODE_FIELD(ctecolcollations);
405 
406  READ_DONE();
407 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static Const* _readConst ( void  )
static

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

505 {
507 
508  READ_OID_FIELD(consttype);
509  READ_INT_FIELD(consttypmod);
510  READ_OID_FIELD(constcollid);
511  READ_INT_FIELD(constlen);
512  READ_BOOL_FIELD(constbyval);
513  READ_BOOL_FIELD(constisnull);
514  READ_LOCATION_FIELD(location);
515 
516  token = pg_strtok(&length); /* skip :constvalue */
517  if (local_node->constisnull)
518  token = pg_strtok(&length); /* skip "<>" */
519  else
520  local_node->constvalue = readDatum(local_node->constbyval);
521 
522  READ_DONE();
523 }
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
Datum readDatum(bool typbyval)
Definition: readfuncs.c:2575
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static ConvertRowtypeExpr* _readConvertRowtypeExpr ( void  )
static

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

887 {
889 
891  READ_OID_FIELD(resulttype);
892  READ_ENUM_FIELD(convertformat, CoercionForm);
893  READ_LOCATION_FIELD(location);
894 
895  READ_DONE();
896 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
CoercionForm
Definition: primnodes.h:413
static CteScan* _readCteScan ( void  )
static

Definition at line 1807 of file readfuncs.c.

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

Referenced by parseNodeString().

1808 {
1810 
1811  ReadCommonScan(&local_node->scan);
1812 
1813  READ_INT_FIELD(ctePlanId);
1814  READ_INT_FIELD(cteParam);
1815 
1816  READ_DONE();
1817 }
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static CurrentOfExpr* _readCurrentOfExpr ( void  )
static

Definition at line 1170 of file readfuncs.c.

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

Referenced by parseNodeString().

1171 {
1173 
1174  READ_UINT_FIELD(cvarno);
1175  READ_STRING_FIELD(cursor_name);
1176  READ_INT_FIELD(cursor_param);
1177 
1178  READ_DONE();
1179 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static CustomScan* _readCustomScan ( void  )
static

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

1861 {
1863  char *custom_name;
1864  const CustomScanMethods *methods;
1865 
1866  ReadCommonScan(&local_node->scan);
1867 
1868  READ_UINT_FIELD(flags);
1869  READ_NODE_FIELD(custom_plans);
1870  READ_NODE_FIELD(custom_exprs);
1871  READ_NODE_FIELD(custom_private);
1872  READ_NODE_FIELD(custom_scan_tlist);
1873  READ_BITMAPSET_FIELD(custom_relids);
1874 
1875  /* Lookup CustomScanMethods by CustomName */
1876  token = pg_strtok(&length); /* skip methods: */
1877  token = pg_strtok(&length); /* CustomName */
1878  custom_name = nullable_string(token, length);
1879  methods = GetCustomScanMethods(custom_name, false);
1880  local_node->methods = methods;
1881 
1882  READ_DONE();
1883 }
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_DONE()
Definition: readfuncs.c:155
const CustomScanMethods * GetCustomScanMethods(const char *CustomName, bool missing_ok)
Definition: extensible.c:137
#define nullable_string(token, length)
Definition: readfuncs.c:171
static DeclareCursorStmt* _readDeclareCursorStmt ( void  )
static

Definition at line 290 of file readfuncs.c.

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

Referenced by parseNodeString().

291 {
293 
294  READ_STRING_FIELD(portalname);
296  READ_NODE_FIELD(query);
297 
298  READ_DONE();
299 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static DefElem* _readDefElem ( void  )
static

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

1390 {
1392 
1393  READ_STRING_FIELD(defnamespace);
1394  READ_STRING_FIELD(defname);
1396  READ_ENUM_FIELD(defaction, DefElemAction);
1397  READ_LOCATION_FIELD(location);
1398 
1399  READ_DONE();
1400 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
DefElemAction
Definition: parsenodes.h:663
void * arg
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static DistinctExpr* _readDistinctExpr ( void  )
static

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

693 {
695 
696  READ_OID_FIELD(opno);
697  READ_OID_FIELD(opfuncid);
698  READ_OID_FIELD(opresulttype);
699  READ_BOOL_FIELD(opretset);
700  READ_OID_FIELD(opcollid);
701  READ_OID_FIELD(inputcollid);
703  READ_LOCATION_FIELD(location);
704 
705  READ_DONE();
706 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static ExtensibleNode* _readExtensibleNode ( void  )
static

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

2264 {
2265  const ExtensibleNodeMethods *methods;
2266  ExtensibleNode *local_node;
2267  const char *extnodename;
2268 
2269  READ_TEMP_LOCALS();
2270 
2271  token = pg_strtok(&length); /* skip :extnodename */
2272  token = pg_strtok(&length); /* get extnodename */
2273 
2274  extnodename = nullable_string(token, length);
2275  if (!extnodename)
2276  elog(ERROR, "extnodename has to be supplied");
2277  methods = GetExtensibleNodeMethods(extnodename, false);
2278 
2279  local_node = (ExtensibleNode *) newNode(methods->node_size,
2281  local_node->extnodename = extnodename;
2282 
2283  /* deserialize the private fields */
2284  methods->nodeRead(local_node);
2285 
2286  READ_DONE();
2287 }
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define newNode(size, tag)
Definition: nodes.h:546
#define ERROR
Definition: elog.h:43
void(* nodeRead)(struct ExtensibleNode *node)
Definition: extensible.h:70
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:52
const char * extnodename
Definition: extensible.h:35
#define READ_DONE()
Definition: readfuncs.c:155
#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:171
static FieldSelect* _readFieldSelect ( void  )
static

Definition at line 798 of file readfuncs.c.

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

Referenced by parseNodeString().

799 {
801 
803  READ_INT_FIELD(fieldnum);
804  READ_OID_FIELD(resulttype);
805  READ_INT_FIELD(resulttypmod);
806  READ_OID_FIELD(resultcollid);
807 
808  READ_DONE();
809 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static FieldStore* _readFieldStore ( void  )
static

Definition at line 815 of file readfuncs.c.

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

Referenced by parseNodeString().

816 {
818 
820  READ_NODE_FIELD(newvals);
821  READ_NODE_FIELD(fieldnums);
822  READ_OID_FIELD(resulttype);
823 
824  READ_DONE();
825 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
static ForeignScan* _readForeignScan ( void  )
static

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

1839 {
1841 
1842  ReadCommonScan(&local_node->scan);
1843 
1844  READ_ENUM_FIELD(operation, CmdType);
1845  READ_OID_FIELD(fs_server);
1846  READ_NODE_FIELD(fdw_exprs);
1847  READ_NODE_FIELD(fdw_private);
1848  READ_NODE_FIELD(fdw_scan_tlist);
1849  READ_NODE_FIELD(fdw_recheck_quals);
1850  READ_BITMAPSET_FIELD(fs_relids);
1851  READ_BOOL_FIELD(fsSystemCol);
1852 
1853  READ_DONE();
1854 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_DONE()
Definition: readfuncs.c:155
CmdType
Definition: nodes.h:641
static FromExpr* _readFromExpr ( void  )
static

Definition at line 1252 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1253 {
1255 
1256  READ_NODE_FIELD(fromlist);
1257  READ_NODE_FIELD(quals);
1258 
1259  READ_DONE();
1260 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static FuncExpr* _readFuncExpr ( void  )
static

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

636 {
638 
639  READ_OID_FIELD(funcid);
640  READ_OID_FIELD(funcresulttype);
641  READ_BOOL_FIELD(funcretset);
642  READ_BOOL_FIELD(funcvariadic);
643  READ_ENUM_FIELD(funcformat, CoercionForm);
644  READ_OID_FIELD(funccollid);
645  READ_OID_FIELD(inputcollid);
647  READ_LOCATION_FIELD(location);
648 
649  READ_DONE();
650 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
CoercionForm
Definition: primnodes.h:413
static FunctionScan* _readFunctionScan ( void  )
static

Definition at line 1776 of file readfuncs.c.

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

Referenced by parseNodeString().

1777 {
1779 
1780  ReadCommonScan(&local_node->scan);
1781 
1783  READ_BOOL_FIELD(funcordinality);
1784 
1785  READ_DONE();
1786 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
static const struct fns functions
Definition: regcomp.c:301
#define READ_DONE()
Definition: readfuncs.c:155
static Gather* _readGather ( void  )
static

Definition at line 2084 of file readfuncs.c.

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

Referenced by parseNodeString().

2085 {
2087 
2088  ReadCommonPlan(&local_node->plan);
2089 
2090  READ_INT_FIELD(num_workers);
2091  READ_BOOL_FIELD(single_copy);
2092  READ_BOOL_FIELD(invisible);
2093 
2094  READ_DONE();
2095 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static Group* _readGroup ( void  )
static

Definition at line 2003 of file readfuncs.c.

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

Referenced by parseNodeString().

2004 {
2005  READ_LOCALS(Group);
2006 
2007  ReadCommonPlan(&local_node->plan);
2008 
2009  READ_INT_FIELD(numCols);
2010  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2011  READ_OID_ARRAY(grpOperators, local_node->numCols);
2012 
2013  READ_DONE();
2014 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static GroupingFunc* _readGroupingFunc ( void  )
static

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

577 {
579 
581  READ_NODE_FIELD(refs);
582  READ_NODE_FIELD(cols);
583  READ_UINT_FIELD(agglevelsup);
584  READ_LOCATION_FIELD(location);
585 
586  READ_DONE();
587 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static GroupingSet* _readGroupingSet ( void  )
static

Definition at line 339 of file readfuncs.c.

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

Referenced by parseNodeString().

340 {
342 
344  READ_NODE_FIELD(content);
345  READ_LOCATION_FIELD(location);
346 
347  READ_DONE();
348 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
GroupingSetKind
Definition: parsenodes.h:1159
#define READ_DONE()
Definition: readfuncs.c:155
static Hash* _readHash ( void  )
static

Definition at line 2101 of file readfuncs.c.

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

Referenced by parseNodeString().

2102 {
2103  READ_LOCALS(Hash);
2104 
2105  ReadCommonPlan(&local_node->plan);
2106 
2107  READ_OID_FIELD(skewTable);
2108  READ_INT_FIELD(skewColumn);
2109  READ_BOOL_FIELD(skewInherit);
2110  READ_OID_FIELD(skewColType);
2111  READ_INT_FIELD(skewColTypmod);
2112 
2113  READ_DONE();
2114 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static HashJoin* _readHashJoin ( void  )
static

Definition at line 1956 of file readfuncs.c.

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

Referenced by parseNodeString().

1957 {
1959 
1960  ReadCommonJoin(&local_node->join);
1961 
1962  READ_NODE_FIELD(hashclauses);
1963 
1964  READ_DONE();
1965 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1890
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static IndexOnlyScan* _readIndexOnlyScan ( void  )
static

Definition at line 1695 of file readfuncs.c.

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

Referenced by parseNodeString().

1696 {
1698 
1699  ReadCommonScan(&local_node->scan);
1700 
1701  READ_OID_FIELD(indexid);
1702  READ_NODE_FIELD(indexqual);
1703  READ_NODE_FIELD(indexorderby);
1704  READ_NODE_FIELD(indextlist);
1705  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1706 
1707  READ_DONE();
1708 }
ScanDirection
Definition: sdir.h:22
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static IndexScan* _readIndexScan ( void  )
static

Definition at line 1674 of file readfuncs.c.

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

Referenced by parseNodeString().

1675 {
1677 
1678  ReadCommonScan(&local_node->scan);
1679 
1680  READ_OID_FIELD(indexid);
1681  READ_NODE_FIELD(indexqual);
1682  READ_NODE_FIELD(indexqualorig);
1683  READ_NODE_FIELD(indexorderby);
1684  READ_NODE_FIELD(indexorderbyorig);
1685  READ_NODE_FIELD(indexorderbyops);
1686  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1687 
1688  READ_DONE();
1689 }
ScanDirection
Definition: sdir.h:22
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static InferenceElem* _readInferenceElem ( void  )
static

Definition at line 1185 of file readfuncs.c.

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

1186 {
1188 
1189  READ_NODE_FIELD(expr);
1190  READ_OID_FIELD(infercollid);
1191  READ_OID_FIELD(inferopclass);
1192 
1193  READ_DONE();
1194 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static IntoClause* _readIntoClause ( void  )
static

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

465 {
467 
468  READ_NODE_FIELD(rel);
469  READ_NODE_FIELD(colNames);
471  READ_ENUM_FIELD(onCommit, OnCommitAction);
472  READ_STRING_FIELD(tableSpaceName);
473  READ_NODE_FIELD(viewQuery);
474  READ_BOOL_FIELD(skipData);
475 
476  READ_DONE();
477 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
OnCommitAction
Definition: primnodes.h:46
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static Join* _readJoin ( void  )
static

Definition at line 1904 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonJoin().

Referenced by parseNodeString().

1905 {
1907 
1908  ReadCommonJoin(local_node);
1909 
1910  READ_DONE();
1911 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1890
#define READ_DONE()
Definition: readfuncs.c:155
static JoinExpr* _readJoinExpr ( void  )
static

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

1233 {
1235 
1236  READ_ENUM_FIELD(jointype, JoinType);
1237  READ_BOOL_FIELD(isNatural);
1238  READ_NODE_FIELD(larg);
1239  READ_NODE_FIELD(rarg);
1240  READ_NODE_FIELD(usingClause);
1241  READ_NODE_FIELD(quals);
1242  READ_NODE_FIELD(alias);
1243  READ_INT_FIELD(rtindex);
1244 
1245  READ_DONE();
1246 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
JoinType
Definition: nodes.h:665
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static Limit* _readLimit ( void  )
static

Definition at line 2158 of file readfuncs.c.

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

Referenced by parseNodeString().

2159 {
2160  READ_LOCALS(Limit);
2161 
2162  ReadCommonPlan(&local_node->plan);
2163 
2164  READ_NODE_FIELD(limitOffset);
2165  READ_NODE_FIELD(limitCount);
2166 
2167  READ_DONE();
2168 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static LockRows* _readLockRows ( void  )
static

Definition at line 2142 of file readfuncs.c.

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

Referenced by parseNodeString().

2143 {
2145 
2146  ReadCommonPlan(&local_node->plan);
2147 
2148  READ_NODE_FIELD(rowMarks);
2149  READ_INT_FIELD(epqParam);
2150 
2151  READ_DONE();
2152 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static Material* _readMaterial ( void  )
static

Definition at line 1971 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

1972 {
1974 
1975  ReadCommonPlan(&local_node->plan);
1976 
1977  READ_DONE();
1978 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_DONE()
Definition: readfuncs.c:155
static MergeAppend* _readMergeAppend ( void  )
static

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

1551 {
1553 
1554  ReadCommonPlan(&local_node->plan);
1555 
1556  READ_NODE_FIELD(mergeplans);
1557  READ_INT_FIELD(numCols);
1558  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
1559  READ_OID_ARRAY(sortOperators, local_node->numCols);
1560  READ_OID_ARRAY(collations, local_node->numCols);
1561  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
1562 
1563  READ_DONE();
1564 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:150
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static MergeJoin* _readMergeJoin ( void  )
static

Definition at line 1932 of file readfuncs.c.

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

Referenced by parseNodeString().

1933 {
1934  int numCols;
1935 
1937 
1938  ReadCommonJoin(&local_node->join);
1939 
1940  READ_NODE_FIELD(mergeclauses);
1941 
1942  numCols = list_length(local_node->mergeclauses);
1943 
1944  READ_OID_ARRAY(mergeFamilies, numCols);
1945  READ_OID_ARRAY(mergeCollations, numCols);
1946  READ_INT_ARRAY(mergeStrategies, numCols);
1947  READ_BOOL_ARRAY(mergeNullsFirst, numCols);
1948 
1949  READ_DONE();
1950 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:150
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1890
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
static int list_length(const List *l)
Definition: pg_list.h:89
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_ARRAY(fldname, len)
Definition: readfuncs.c:145
static MinMaxExpr* _readMinMaxExpr ( void  )
static

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

1035 {
1037 
1038  READ_OID_FIELD(minmaxtype);
1039  READ_OID_FIELD(minmaxcollid);
1040  READ_OID_FIELD(inputcollid);
1043  READ_LOCATION_FIELD(location);
1044 
1045  READ_DONE();
1046 }
MinMaxOp
Definition: primnodes.h:1030
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static ModifyTable* _readModifyTable ( void  )
static

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

1504 {
1506 
1507  ReadCommonPlan(&local_node->plan);
1508 
1509  READ_ENUM_FIELD(operation, CmdType);
1510  READ_BOOL_FIELD(canSetTag);
1511  READ_UINT_FIELD(nominalRelation);
1512  READ_NODE_FIELD(resultRelations);
1513  READ_INT_FIELD(resultRelIndex);
1514  READ_NODE_FIELD(plans);
1515  READ_NODE_FIELD(withCheckOptionLists);
1516  READ_NODE_FIELD(returningLists);
1517  READ_NODE_FIELD(fdwPrivLists);
1518  READ_BITMAPSET_FIELD(fdwDirectModifyPlans);
1519  READ_NODE_FIELD(rowMarks);
1520  READ_INT_FIELD(epqParam);
1521  READ_ENUM_FIELD(onConflictAction, OnConflictAction);
1522  READ_NODE_FIELD(arbiterIndexes);
1523  READ_NODE_FIELD(onConflictSet);
1524  READ_NODE_FIELD(onConflictWhere);
1525  READ_UINT_FIELD(exclRelRTI);
1526  READ_NODE_FIELD(exclRelTlist);
1527 
1528  READ_DONE();
1529 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
OnConflictAction
Definition: nodes.h:790
CmdType
Definition: nodes.h:641
static NamedArgExpr* _readNamedArgExpr ( void  )
static

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

657 {
659 
662  READ_INT_FIELD(argnumber);
663  READ_LOCATION_FIELD(location);
664 
665  READ_DONE();
666 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
const char * name
Definition: encode.c:521
void * arg
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static NestLoop* _readNestLoop ( void  )
static

Definition at line 1917 of file readfuncs.c.

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

Referenced by parseNodeString().

1918 {
1920 
1921  ReadCommonJoin(&local_node->join);
1922 
1923  READ_NODE_FIELD(nestParams);
1924 
1925  READ_DONE();
1926 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:1890
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static NestLoopParam* _readNestLoopParam ( void  )
static

Definition at line 2174 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

2175 {
2177 
2178  READ_INT_FIELD(paramno);
2179  READ_NODE_FIELD(paramval);
2180 
2181  READ_DONE();
2182 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static NotifyStmt* _readNotifyStmt ( void  )
static

Definition at line 276 of file readfuncs.c.

References READ_DONE, READ_LOCALS, and READ_STRING_FIELD.

Referenced by parseNodeString().

277 {
279 
280  READ_STRING_FIELD(conditionname);
281  READ_STRING_FIELD(payload);
282 
283  READ_DONE();
284 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static NullIfExpr* _readNullIfExpr ( void  )
static

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

713 {
715 
716  READ_OID_FIELD(opno);
717  READ_OID_FIELD(opfuncid);
718  READ_OID_FIELD(opresulttype);
719  READ_BOOL_FIELD(opretset);
720  READ_OID_FIELD(opcollid);
721  READ_OID_FIELD(inputcollid);
723  READ_LOCATION_FIELD(location);
724 
725  READ_DONE();
726 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static NullTest* _readNullTest ( void  )
static

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

1090 {
1092 
1094  READ_ENUM_FIELD(nulltesttype, NullTestType);
1095  READ_BOOL_FIELD(argisrow);
1096  READ_LOCATION_FIELD(location);
1097 
1098  READ_DONE();
1099 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
NullTestType
Definition: primnodes.h:1148
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
static OnConflictExpr* _readOnConflictExpr ( void  )
static

Definition at line 1266 of file readfuncs.c.

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

Referenced by parseNodeString().

1267 {
1269 
1271  READ_NODE_FIELD(arbiterElems);
1272  READ_NODE_FIELD(arbiterWhere);
1273  READ_OID_FIELD(constraint);
1274  READ_NODE_FIELD(onConflictSet);
1275  READ_NODE_FIELD(onConflictWhere);
1276  READ_INT_FIELD(exclRelIndex);
1277  READ_NODE_FIELD(exclRelTlist);
1278 
1279  READ_DONE();
1280 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
OnConflictAction
Definition: nodes.h:790
static OpExpr* _readOpExpr ( void  )
static

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

673 {
675 
676  READ_OID_FIELD(opno);
677  READ_OID_FIELD(opfuncid);
678  READ_OID_FIELD(opresulttype);
679  READ_BOOL_FIELD(opretset);
680  READ_OID_FIELD(opcollid);
681  READ_OID_FIELD(inputcollid);
683  READ_LOCATION_FIELD(location);
684 
685  READ_DONE();
686 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static Param* _readParam ( void  )
static

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

530 {
532 
533  READ_ENUM_FIELD(paramkind, ParamKind);
534  READ_INT_FIELD(paramid);
535  READ_OID_FIELD(paramtype);
536  READ_INT_FIELD(paramtypmod);
537  READ_OID_FIELD(paramcollid);
538  READ_LOCATION_FIELD(location);
539 
540  READ_DONE();
541 }
ParamKind
Definition: primnodes.h:211
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static PartitionBoundSpec* _readPartitionBoundSpec ( void  )
static

Definition at line 2293 of file readfuncs.c.

References READ_CHAR_FIELD, READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

2294 {
2296 
2297  READ_CHAR_FIELD(strategy);
2298  READ_NODE_FIELD(listdatums);
2299  READ_NODE_FIELD(lowerdatums);
2300  READ_NODE_FIELD(upperdatums);
2301 
2302  READ_DONE();
2303 }
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:86
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static PartitionRangeDatum* _readPartitionRangeDatum ( void  )
static

Definition at line 2309 of file readfuncs.c.

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

Referenced by parseNodeString().

2310 {
2312 
2313  READ_BOOL_FIELD(infinite);
2315 
2316  READ_DONE();
2317 }
static struct @76 value
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static Plan* _readPlan ( void  )
static

Definition at line 1462 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

1463 {
1465 
1466  ReadCommonPlan(local_node);
1467 
1468  READ_DONE();
1469 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_DONE()
Definition: readfuncs.c:155
static PlanInvalItem* _readPlanInvalItem ( void  )
static

Definition at line 2208 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_UINT_FIELD.

Referenced by parseNodeString().

2209 {
2211 
2212  READ_INT_FIELD(cacheId);
2213  READ_UINT_FIELD(hashValue);
2214 
2215  READ_DONE();
2216 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static PlannedStmt* _readPlannedStmt ( void  )
static

Definition at line 1406 of file readfuncs.c.

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

Referenced by parseNodeString().

1407 {
1409 
1410  READ_ENUM_FIELD(commandType, CmdType);
1411  READ_UINT_FIELD(queryId);
1412  READ_BOOL_FIELD(hasReturning);
1413  READ_BOOL_FIELD(hasModifyingCTE);
1414  READ_BOOL_FIELD(canSetTag);
1415  READ_BOOL_FIELD(transientPlan);
1416  READ_BOOL_FIELD(dependsOnRole);
1417  READ_BOOL_FIELD(parallelModeNeeded);
1418  READ_NODE_FIELD(planTree);
1419  READ_NODE_FIELD(rtable);
1420  READ_NODE_FIELD(resultRelations);
1421  READ_NODE_FIELD(subplans);
1422  READ_BITMAPSET_FIELD(rewindPlanIDs);
1423  READ_NODE_FIELD(rowMarks);
1424  READ_NODE_FIELD(relationOids);
1425  READ_NODE_FIELD(invalItems);
1426  READ_INT_FIELD(nParamExec);
1427  READ_NODE_FIELD(utilityStmt);
1428  READ_LOCATION_FIELD(stmt_location);
1429  READ_LOCATION_FIELD(stmt_len);
1430 
1431  READ_DONE();
1432 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
CmdType
Definition: nodes.h:641
static PlanRowMark* _readPlanRowMark ( void  )
static

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

2189 {
2191 
2192  READ_UINT_FIELD(rti);
2193  READ_UINT_FIELD(prti);
2194  READ_UINT_FIELD(rowmarkId);
2195  READ_ENUM_FIELD(markType, RowMarkType);
2196  READ_INT_FIELD(allMarkTypes);
2198  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
2199  READ_BOOL_FIELD(isParent);
2200 
2201  READ_DONE();
2202 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
LockClauseStrength
Definition: lockoptions.h:21
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
RowMarkType
Definition: plannodes.h:887
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
LockWaitPolicy
Definition: lockoptions.h:36
static ProjectSet* _readProjectSet ( void  )
static

Definition at line 1490 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

1491 {
1493 
1494  ReadCommonPlan(&local_node->plan);
1495 
1496  READ_DONE();
1497 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_DONE()
Definition: readfuncs.c:155
static Query* _readQuery ( void  )
static

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

230 {
232 
233  READ_ENUM_FIELD(commandType, CmdType);
234  READ_ENUM_FIELD(querySource, QuerySource);
235  local_node->queryId = 0; /* not saved in output format */
236  READ_BOOL_FIELD(canSetTag);
237  READ_NODE_FIELD(utilityStmt);
238  READ_INT_FIELD(resultRelation);
239  READ_BOOL_FIELD(hasAggs);
240  READ_BOOL_FIELD(hasWindowFuncs);
241  READ_BOOL_FIELD(hasTargetSRFs);
242  READ_BOOL_FIELD(hasSubLinks);
243  READ_BOOL_FIELD(hasDistinctOn);
244  READ_BOOL_FIELD(hasRecursive);
245  READ_BOOL_FIELD(hasModifyingCTE);
246  READ_BOOL_FIELD(hasForUpdate);
247  READ_BOOL_FIELD(hasRowSecurity);
248  READ_NODE_FIELD(cteList);
249  READ_NODE_FIELD(rtable);
250  READ_NODE_FIELD(jointree);
251  READ_NODE_FIELD(targetList);
252  READ_NODE_FIELD(onConflict);
253  READ_NODE_FIELD(returningList);
254  READ_NODE_FIELD(groupClause);
255  READ_NODE_FIELD(groupingSets);
256  READ_NODE_FIELD(havingQual);
257  READ_NODE_FIELD(windowClause);
258  READ_NODE_FIELD(distinctClause);
259  READ_NODE_FIELD(sortClause);
260  READ_NODE_FIELD(limitOffset);
261  READ_NODE_FIELD(limitCount);
262  READ_NODE_FIELD(rowMarks);
263  READ_NODE_FIELD(setOperations);
264  READ_NODE_FIELD(constraintDeps);
265  /* withCheckOptions intentionally omitted, see comment in parsenodes.h */
266  READ_LOCATION_FIELD(stmt_location);
267  READ_LOCATION_FIELD(stmt_len);
268 
269  READ_DONE();
270 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
QuerySource
Definition: parsenodes.h:31
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
CmdType
Definition: nodes.h:641
static RangeTblEntry* _readRangeTblEntry ( void  )
static

Definition at line 1290 of file readfuncs.c.

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

Referenced by parseNodeString().

1291 {
1293 
1294  /* put alias + eref first to make dump more legible */
1295  READ_NODE_FIELD(alias);
1296  READ_NODE_FIELD(eref);
1297  READ_ENUM_FIELD(rtekind, RTEKind);
1298 
1299  switch (local_node->rtekind)
1300  {
1301  case RTE_RELATION:
1302  READ_OID_FIELD(relid);
1303  READ_CHAR_FIELD(relkind);
1304  READ_NODE_FIELD(tablesample);
1305  break;
1306  case RTE_SUBQUERY:
1307  READ_NODE_FIELD(subquery);
1308  READ_BOOL_FIELD(security_barrier);
1309  break;
1310  case RTE_JOIN:
1311  READ_ENUM_FIELD(jointype, JoinType);
1312  READ_NODE_FIELD(joinaliasvars);
1313  break;
1314  case RTE_FUNCTION:
1316  READ_BOOL_FIELD(funcordinality);
1317  break;
1318  case RTE_VALUES:
1319  READ_NODE_FIELD(values_lists);
1320  READ_NODE_FIELD(coltypes);
1321  READ_NODE_FIELD(coltypmods);
1322  READ_NODE_FIELD(colcollations);
1323  break;
1324  case RTE_CTE:
1325  READ_STRING_FIELD(ctename);
1326  READ_UINT_FIELD(ctelevelsup);
1327  READ_BOOL_FIELD(self_reference);
1328  READ_NODE_FIELD(coltypes);
1329  READ_NODE_FIELD(coltypmods);
1330  READ_NODE_FIELD(colcollations);
1331  break;
1332  default:
1333  elog(ERROR, "unrecognized RTE kind: %d",
1334  (int) local_node->rtekind);
1335  break;
1336  }
1337 
1338  READ_BOOL_FIELD(lateral);
1339  READ_BOOL_FIELD(inh);
1340  READ_BOOL_FIELD(inFromCl);
1341  READ_UINT_FIELD(requiredPerms);
1342  READ_OID_FIELD(checkAsUser);
1343  READ_BITMAPSET_FIELD(selectedCols);
1344  READ_BITMAPSET_FIELD(insertedCols);
1345  READ_BITMAPSET_FIELD(updatedCols);
1346  READ_NODE_FIELD(securityQuals);
1347 
1348  READ_DONE();
1349 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
JoinType
Definition: nodes.h:665
#define ERROR
Definition: elog.h:43
RTEKind
Definition: parsenodes.h:868
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:86
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
static const struct fns functions
Definition: regcomp.c:301
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define elog
Definition: elog.h:219
static RangeTblFunction* _readRangeTblFunction ( void  )
static

Definition at line 1355 of file readfuncs.c.

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

Referenced by parseNodeString().

1356 {
1358 
1359  READ_NODE_FIELD(funcexpr);
1360  READ_INT_FIELD(funccolcount);
1361  READ_NODE_FIELD(funccolnames);
1362  READ_NODE_FIELD(funccoltypes);
1363  READ_NODE_FIELD(funccoltypmods);
1364  READ_NODE_FIELD(funccolcollations);
1365  READ_BITMAPSET_FIELD(funcparams);
1366 
1367  READ_DONE();
1368 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static RangeTblRef* _readRangeTblRef ( void  )
static

Definition at line 1219 of file readfuncs.c.

References READ_DONE, READ_INT_FIELD, and READ_LOCALS.

Referenced by parseNodeString().

1220 {
1222 
1223  READ_INT_FIELD(rtindex);
1224 
1225  READ_DONE();
1226 }
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static RangeVar* _readRangeVar ( void  )
static

Definition at line 446 of file readfuncs.c.

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

Referenced by parseNodeString().

447 {
449 
450  local_node->catalogname = NULL; /* not currently saved in output
451  * format */
452 
453  READ_STRING_FIELD(schemaname);
454  READ_STRING_FIELD(relname);
455  READ_BOOL_FIELD(inh);
456  READ_CHAR_FIELD(relpersistence);
457  READ_NODE_FIELD(alias);
458  READ_LOCATION_FIELD(location);
459 
460  READ_DONE();
461 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:86
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define NULL
Definition: c.h:226
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static RecursiveUnion* _readRecursiveUnion ( void  )
static

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

1571 {
1573 
1574  ReadCommonPlan(&local_node->plan);
1575 
1576  READ_INT_FIELD(wtParam);
1577  READ_INT_FIELD(numCols);
1578  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
1579  READ_OID_ARRAY(dupOperators, local_node->numCols);
1580  READ_LONG_FIELD(numGroups);
1581 
1582  READ_DONE();
1583 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:74
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static RelabelType* _readRelabelType ( void  )
static

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

832 {
834 
836  READ_OID_FIELD(resulttype);
837  READ_INT_FIELD(resulttypmod);
838  READ_OID_FIELD(resultcollid);
839  READ_ENUM_FIELD(relabelformat, CoercionForm);
840  READ_LOCATION_FIELD(location);
841 
842  READ_DONE();
843 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
void * arg
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
CoercionForm
Definition: primnodes.h:413
static Result* _readResult ( void  )
static

Definition at line 1475 of file readfuncs.c.

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

Referenced by parseNodeString().

1476 {
1478 
1479  ReadCommonPlan(&local_node->plan);
1480 
1481  READ_NODE_FIELD(resconstantqual);
1482 
1483  READ_DONE();
1484 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static RowCompareExpr* _readRowCompareExpr ( void  )
static

Definition at line 1000 of file readfuncs.c.

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

1001 {
1003 
1005  READ_NODE_FIELD(opnos);
1006  READ_NODE_FIELD(opfamilies);
1007  READ_NODE_FIELD(inputcollids);
1008  READ_NODE_FIELD(largs);
1009  READ_NODE_FIELD(rargs);
1010 
1011  READ_DONE();
1012 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
RowCompareType
Definition: primnodes.h:993
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static RowExpr* _readRowExpr ( void  )
static

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

984 {
986 
988  READ_OID_FIELD(row_typeid);
989  READ_ENUM_FIELD(row_format, CoercionForm);
990  READ_NODE_FIELD(colnames);
991  READ_LOCATION_FIELD(location);
992 
993  READ_DONE();
994 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
CoercionForm
Definition: primnodes.h:413
static RowMarkClause* _readRowMarkClause ( void  )
static

Definition at line 375 of file readfuncs.c.

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

Referenced by parseNodeString().

376 {
378 
379  READ_UINT_FIELD(rti);
381  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
382  READ_BOOL_FIELD(pushedDown);
383 
384  READ_DONE();
385 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
LockClauseStrength
Definition: lockoptions.h:21
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
LockWaitPolicy
Definition: lockoptions.h:36
static SampleScan* _readSampleScan ( void  )
static

Definition at line 1659 of file readfuncs.c.

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

Referenced by parseNodeString().

1660 {
1662 
1663  ReadCommonScan(&local_node->scan);
1664 
1665  READ_NODE_FIELD(tablesample);
1666 
1667  READ_DONE();
1668 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static ScalarArrayOpExpr* _readScalarArrayOpExpr ( void  )
static

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

733 {
735 
736  READ_OID_FIELD(opno);
737  READ_OID_FIELD(opfuncid);
738  READ_BOOL_FIELD(useOr);
739  READ_OID_FIELD(inputcollid);
741  READ_LOCATION_FIELD(location);
742 
743  READ_DONE();
744 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static Scan* _readScan ( void  )
static

Definition at line 1633 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

1634 {
1636 
1637  ReadCommonScan(local_node);
1638 
1639  READ_DONE();
1640 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_DONE()
Definition: readfuncs.c:155
static SeqScan* _readSeqScan ( void  )
static

Definition at line 1646 of file readfuncs.c.

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

1647 {
1649 
1650  ReadCommonScan(local_node);
1651 
1652  READ_DONE();
1653 }
#define READ_LOCALS_NO_FIELDS(nodeTypeName)
Definition: readfuncs.c:48
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_DONE()
Definition: readfuncs.c:155
static SetOp* _readSetOp ( void  )
static

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

2121 {
2122  READ_LOCALS(SetOp);
2123 
2124  ReadCommonPlan(&local_node->plan);
2125 
2126  READ_ENUM_FIELD(cmd, SetOpCmd);
2127  READ_ENUM_FIELD(strategy, SetOpStrategy);
2128  READ_INT_FIELD(numCols);
2129  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
2130  READ_OID_ARRAY(dupOperators, local_node->numCols);
2131  READ_INT_FIELD(flagColIdx);
2132  READ_INT_FIELD(firstFlag);
2133  READ_LONG_FIELD(numGroups);
2134 
2135  READ_DONE();
2136 }
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:74
SetOpStrategy
Definition: nodes.h:778
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
SetOpCmd
Definition: nodes.h:770
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static SetOperationStmt* _readSetOperationStmt ( void  )
static

Definition at line 413 of file readfuncs.c.

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

Referenced by parseNodeString().

414 {
416 
418  READ_BOOL_FIELD(all);
419  READ_NODE_FIELD(larg);
420  READ_NODE_FIELD(rarg);
421  READ_NODE_FIELD(colTypes);
422  READ_NODE_FIELD(colTypmods);
423  READ_NODE_FIELD(colCollations);
424  READ_NODE_FIELD(groupClauses);
425 
426  READ_DONE();
427 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
SetOperation
Definition: parsenodes.h:1407
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static SetToDefault* _readSetToDefault ( void  )
static

Definition at line 1154 of file readfuncs.c.

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

Referenced by parseNodeString().

1155 {
1157 
1158  READ_OID_FIELD(typeId);
1159  READ_INT_FIELD(typeMod);
1160  READ_OID_FIELD(collation);
1161  READ_LOCATION_FIELD(location);
1162 
1163  READ_DONE();
1164 }
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static Sort* _readSort ( void  )
static

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

1985 {
1986  READ_LOCALS(Sort);
1987 
1988  ReadCommonPlan(&local_node->plan);
1989 
1990  READ_INT_FIELD(numCols);
1991  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
1992  READ_OID_ARRAY(sortOperators, local_node->numCols);
1993  READ_OID_ARRAY(collations, local_node->numCols);
1994  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
1995 
1996  READ_DONE();
1997 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:150
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static SortGroupClause* _readSortGroupClause ( void  )
static

Definition at line 322 of file readfuncs.c.

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

Referenced by parseNodeString().

323 {
325 
326  READ_UINT_FIELD(tleSortGroupRef);
327  READ_OID_FIELD(eqop);
328  READ_OID_FIELD(sortop);
329  READ_BOOL_FIELD(nulls_first);
330  READ_BOOL_FIELD(hashable);
331 
332  READ_DONE();
333 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static SQLValueFunction* _readSQLValueFunction ( void  )
static

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

1053 {
1055 
1057  READ_OID_FIELD(type);
1058  READ_INT_FIELD(typmod);
1059  READ_LOCATION_FIELD(location);
1060 
1061  READ_DONE();
1062 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
SQLValueFunctionOp
Definition: primnodes.h:1058
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static SubLink* _readSubLink ( void  )
static

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

777 {
779 
780  READ_ENUM_FIELD(subLinkType, SubLinkType);
781  READ_INT_FIELD(subLinkId);
782  READ_NODE_FIELD(testexpr);
783  READ_NODE_FIELD(operName);
784  READ_NODE_FIELD(subselect);
785  READ_LOCATION_FIELD(location);
786 
787  READ_DONE();
788 }
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
SubLinkType
Definition: primnodes.h:595
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static SubPlan* _readSubPlan ( void  )
static

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

2223 {
2225 
2226  READ_ENUM_FIELD(subLinkType, SubLinkType);
2227  READ_NODE_FIELD(testexpr);
2228  READ_NODE_FIELD(paramIds);
2229  READ_INT_FIELD(plan_id);
2230  READ_STRING_FIELD(plan_name);
2231  READ_OID_FIELD(firstColType);
2232  READ_INT_FIELD(firstColTypmod);
2233  READ_OID_FIELD(firstColCollation);
2234  READ_BOOL_FIELD(useHashTable);
2235  READ_BOOL_FIELD(unknownEqFalse);
2236  READ_BOOL_FIELD(parallel_safe);
2237  READ_NODE_FIELD(setParam);
2238  READ_NODE_FIELD(parParam);
2240  READ_FLOAT_FIELD(startup_cost);
2241  READ_FLOAT_FIELD(per_call_cost);
2242 
2243  READ_DONE();
2244 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:98
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
SubLinkType
Definition: primnodes.h:595
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static SubqueryScan* _readSubqueryScan ( void  )
static

Definition at line 1761 of file readfuncs.c.

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

Referenced by parseNodeString().

1762 {
1764 
1765  ReadCommonScan(&local_node->scan);
1766 
1767  READ_NODE_FIELD(subplan);
1768 
1769  READ_DONE();
1770 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static TableSampleClause* _readTableSampleClause ( void  )
static

Definition at line 1374 of file readfuncs.c.

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

Referenced by parseNodeString().

1375 {
1377 
1378  READ_OID_FIELD(tsmhandler);
1380  READ_NODE_FIELD(repeatable);
1381 
1382  READ_DONE();
1383 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static TargetEntry* _readTargetEntry ( void  )
static

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

1201 {
1203 
1204  READ_NODE_FIELD(expr);
1205  READ_INT_FIELD(resno);
1206  READ_STRING_FIELD(resname);
1207  READ_UINT_FIELD(ressortgroupref);
1208  READ_OID_FIELD(resorigtbl);
1209  READ_INT_FIELD(resorigcol);
1210  READ_BOOL_FIELD(resjunk);
1211 
1212  READ_DONE();
1213 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static TidScan* _readTidScan ( void  )
static

Definition at line 1746 of file readfuncs.c.

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

Referenced by parseNodeString().

1747 {
1749 
1750  ReadCommonScan(&local_node->scan);
1751 
1752  READ_NODE_FIELD(tidquals);
1753 
1754  READ_DONE();
1755 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static Unique* _readUnique ( void  )
static

Definition at line 2067 of file readfuncs.c.

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

Referenced by parseNodeString().

2068 {
2070 
2071  ReadCommonPlan(&local_node->plan);
2072 
2073  READ_INT_FIELD(numCols);
2074  READ_ATTRNUMBER_ARRAY(uniqColIdx, local_node->numCols);
2075  READ_OID_ARRAY(uniqOperators, local_node->numCols);
2076 
2077  READ_DONE();
2078 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static ValuesScan* _readValuesScan ( void  )
static

Definition at line 1792 of file readfuncs.c.

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

Referenced by parseNodeString().

1793 {
1795 
1796  ReadCommonScan(&local_node->scan);
1797 
1798  READ_NODE_FIELD(values_lists);
1799 
1800  READ_DONE();
1801 }
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
static Var* _readVar ( void  )
static

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

484 {
485  READ_LOCALS(Var);
486 
487  READ_UINT_FIELD(varno);
488  READ_INT_FIELD(varattno);
489  READ_OID_FIELD(vartype);
490  READ_INT_FIELD(vartypmod);
491  READ_OID_FIELD(varcollid);
492  READ_UINT_FIELD(varlevelsup);
493  READ_UINT_FIELD(varnoold);
494  READ_INT_FIELD(varoattno);
495  READ_LOCATION_FIELD(location);
496 
497  READ_DONE();
498 }
Definition: primnodes.h:141
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static WindowAgg* _readWindowAgg ( void  )
static

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

2044 {
2046 
2047  ReadCommonPlan(&local_node->plan);
2048 
2049  READ_UINT_FIELD(winref);
2050  READ_INT_FIELD(partNumCols);
2051  READ_ATTRNUMBER_ARRAY(partColIdx, local_node->partNumCols);
2052  READ_OID_ARRAY(partOperators, local_node->partNumCols);
2053  READ_INT_FIELD(ordNumCols);
2054  READ_ATTRNUMBER_ARRAY(ordColIdx, local_node->ordNumCols);
2055  READ_OID_ARRAY(ordOperators, local_node->ordNumCols);
2056  READ_INT_FIELD(frameOptions);
2057  READ_NODE_FIELD(startOffset);
2058  READ_NODE_FIELD(endOffset);
2059 
2060  READ_DONE();
2061 }
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:140
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:135
static WindowClause* _readWindowClause ( void  )
static

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

355 {
357 
359  READ_STRING_FIELD(refname);
360  READ_NODE_FIELD(partitionClause);
361  READ_NODE_FIELD(orderClause);
362  READ_INT_FIELD(frameOptions);
363  READ_NODE_FIELD(startOffset);
364  READ_NODE_FIELD(endOffset);
365  READ_UINT_FIELD(winref);
366  READ_BOOL_FIELD(copiedOrder);
367 
368  READ_DONE();
369 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
const char * name
Definition: encode.c:521
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static WindowFunc* _readWindowFunc ( void  )
static

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

594 {
596 
597  READ_OID_FIELD(winfnoid);
598  READ_OID_FIELD(wintype);
599  READ_OID_FIELD(wincollid);
600  READ_OID_FIELD(inputcollid);
602  READ_NODE_FIELD(aggfilter);
603  READ_UINT_FIELD(winref);
604  READ_BOOL_FIELD(winstar);
605  READ_BOOL_FIELD(winagg);
606  READ_LOCATION_FIELD(location);
607 
608  READ_DONE();
609 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
#define READ_DONE()
Definition: readfuncs.c:155
static WithCheckOption* _readWithCheckOption ( void  )
static

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

306 {
308 
309  READ_ENUM_FIELD(kind, WCOKind);
310  READ_STRING_FIELD(relname);
311  READ_STRING_FIELD(polname);
312  READ_NODE_FIELD(qual);
313  READ_BOOL_FIELD(cascaded);
314 
315  READ_DONE();
316 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
WCOKind
Definition: parsenodes.h:1023
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
static WorkTableScan* _readWorkTableScan ( void  )
static

Definition at line 1823 of file readfuncs.c.

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

Referenced by parseNodeString().

1824 {
1826 
1827  ReadCommonScan(&local_node->scan);
1828 
1829  READ_INT_FIELD(wtParam);
1830 
1831  READ_DONE();
1832 }
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1620
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static XmlExpr* _readXmlExpr ( void  )
static

Definition at line 1068 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, and xmloption.

Referenced by parseNodeString().

1069 {
1071 
1074  READ_NODE_FIELD(named_args);
1075  READ_NODE_FIELD(arg_names);
1078  READ_OID_FIELD(type);
1079  READ_INT_FIELD(typmod);
1080  READ_LOCATION_FIELD(location);
1081 
1082  READ_DONE();
1083 }
XmlExprOp
Definition: primnodes.h:1097
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:116
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:57
XmlOptionType
Definition: primnodes.h:1109
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:80
const char * name
Definition: encode.c:521
int xmloption
Definition: xml.c:96
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:110
#define READ_DONE()
Definition: readfuncs.c:155
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
Node* parseNodeString ( void  )

Definition at line 2328 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(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoin(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNestLoop(), _readNestLoopParam(), _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(), _readTableSampleClause(), _readTargetEntry(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), _readXmlExpr(), elog, ERROR, length(), MATCH, NULL, pg_strtok(), and READ_TEMP_LOCALS.

Referenced by nodeRead().

2329 {
2330  void *return_value;
2331 
2332  READ_TEMP_LOCALS();
2333 
2334  token = pg_strtok(&length);
2335 
2336 #define MATCH(tokname, namelen) \
2337  (length == namelen && memcmp(token, tokname, namelen) == 0)
2338 
2339  if (MATCH("QUERY", 5))
2340  return_value = _readQuery();
2341  else if (MATCH("WITHCHECKOPTION", 15))
2342  return_value = _readWithCheckOption();
2343  else if (MATCH("SORTGROUPCLAUSE", 15))
2344  return_value = _readSortGroupClause();
2345  else if (MATCH("GROUPINGSET", 11))
2346  return_value = _readGroupingSet();
2347  else if (MATCH("WINDOWCLAUSE", 12))
2348  return_value = _readWindowClause();
2349  else if (MATCH("ROWMARKCLAUSE", 13))
2350  return_value = _readRowMarkClause();
2351  else if (MATCH("COMMONTABLEEXPR", 15))
2352  return_value = _readCommonTableExpr();
2353  else if (MATCH("SETOPERATIONSTMT", 16))
2354  return_value = _readSetOperationStmt();
2355  else if (MATCH("ALIAS", 5))
2356  return_value = _readAlias();
2357  else if (MATCH("RANGEVAR", 8))
2358  return_value = _readRangeVar();
2359  else if (MATCH("INTOCLAUSE", 10))
2360  return_value = _readIntoClause();
2361  else if (MATCH("VAR", 3))
2362  return_value = _readVar();
2363  else if (MATCH("CONST", 5))
2364  return_value = _readConst();
2365  else if (MATCH("PARAM", 5))
2366  return_value = _readParam();
2367  else if (MATCH("AGGREF", 6))
2368  return_value = _readAggref();
2369  else if (MATCH("GROUPINGFUNC", 12))
2370  return_value = _readGroupingFunc();
2371  else if (MATCH("WINDOWFUNC", 10))
2372  return_value = _readWindowFunc();
2373  else if (MATCH("ARRAYREF", 8))
2374  return_value = _readArrayRef();
2375  else if (MATCH("FUNCEXPR", 8))
2376  return_value = _readFuncExpr();
2377  else if (MATCH("NAMEDARGEXPR", 12))
2378  return_value = _readNamedArgExpr();
2379  else if (MATCH("OPEXPR", 6))
2380  return_value = _readOpExpr();
2381  else if (MATCH("DISTINCTEXPR", 12))
2382  return_value = _readDistinctExpr();
2383  else if (MATCH("NULLIFEXPR", 10))
2384  return_value = _readNullIfExpr();
2385  else if (MATCH("SCALARARRAYOPEXPR", 17))
2386  return_value = _readScalarArrayOpExpr();
2387  else if (MATCH("BOOLEXPR", 8))
2388  return_value = _readBoolExpr();
2389  else if (MATCH("SUBLINK", 7))
2390  return_value = _readSubLink();
2391  else if (MATCH("FIELDSELECT", 11))
2392  return_value = _readFieldSelect();
2393  else if (MATCH("FIELDSTORE", 10))
2394  return_value = _readFieldStore();
2395  else if (MATCH("RELABELTYPE", 11))
2396  return_value = _readRelabelType();
2397  else if (MATCH("COERCEVIAIO", 11))
2398  return_value = _readCoerceViaIO();
2399  else if (MATCH("ARRAYCOERCEEXPR", 15))
2400  return_value = _readArrayCoerceExpr();
2401  else if (MATCH("CONVERTROWTYPEEXPR", 18))
2402  return_value = _readConvertRowtypeExpr();
2403  else if (MATCH("COLLATE", 7))
2404  return_value = _readCollateExpr();
2405  else if (MATCH("CASE", 4))
2406  return_value = _readCaseExpr();
2407  else if (MATCH("WHEN", 4))
2408  return_value = _readCaseWhen();
2409  else if (MATCH("CASETESTEXPR", 12))
2410  return_value = _readCaseTestExpr();
2411  else if (MATCH("ARRAY", 5))
2412  return_value = _readArrayExpr();
2413  else if (MATCH("ROW", 3))
2414  return_value = _readRowExpr();
2415  else if (MATCH("ROWCOMPARE", 10))
2416  return_value = _readRowCompareExpr();
2417  else if (MATCH("COALESCE", 8))
2418  return_value = _readCoalesceExpr();
2419  else if (MATCH("MINMAX", 6))
2420  return_value = _readMinMaxExpr();
2421  else if (MATCH("SQLVALUEFUNCTION", 16))
2422  return_value = _readSQLValueFunction();
2423  else if (MATCH("XMLEXPR", 7))
2424  return_value = _readXmlExpr();
2425  else if (MATCH("NULLTEST", 8))
2426  return_value = _readNullTest();
2427  else if (MATCH("BOOLEANTEST", 11))
2428  return_value = _readBooleanTest();
2429  else if (MATCH("COERCETODOMAIN", 14))
2430  return_value = _readCoerceToDomain();
2431  else if (MATCH("COERCETODOMAINVALUE", 19))
2432  return_value = _readCoerceToDomainValue();
2433  else if (MATCH("SETTODEFAULT", 12))
2434  return_value = _readSetToDefault();
2435  else if (MATCH("CURRENTOFEXPR", 13))
2436  return_value = _readCurrentOfExpr();
2437  else if (MATCH("INFERENCEELEM", 13))
2438  return_value = _readInferenceElem();
2439  else if (MATCH("TARGETENTRY", 11))
2440  return_value = _readTargetEntry();
2441  else if (MATCH("RANGETBLREF", 11))
2442  return_value = _readRangeTblRef();
2443  else if (MATCH("JOINEXPR", 8))
2444  return_value = _readJoinExpr();
2445  else if (MATCH("FROMEXPR", 8))
2446  return_value = _readFromExpr();
2447  else if (MATCH("ONCONFLICTEXPR", 14))
2448  return_value = _readOnConflictExpr();
2449  else if (MATCH("RTE", 3))
2450  return_value = _readRangeTblEntry();
2451  else if (MATCH("RANGETBLFUNCTION", 16))
2452  return_value = _readRangeTblFunction();
2453  else if (MATCH("TABLESAMPLECLAUSE", 17))
2454  return_value = _readTableSampleClause();
2455  else if (MATCH("NOTIFY", 6))
2456  return_value = _readNotifyStmt();
2457  else if (MATCH("DEFELEM", 7))
2458  return_value = _readDefElem();
2459  else if (MATCH("DECLARECURSOR", 13))
2460  return_value = _readDeclareCursorStmt();
2461  else if (MATCH("PLANNEDSTMT", 11))
2462  return_value = _readPlannedStmt();
2463  else if (MATCH("PLAN", 4))
2464  return_value = _readPlan();
2465  else if (MATCH("RESULT", 6))
2466  return_value = _readResult();
2467  else if (MATCH("PROJECTSET", 10))
2468  return_value = _readProjectSet();
2469  else if (MATCH("MODIFYTABLE", 11))
2470  return_value = _readModifyTable();
2471  else if (MATCH("APPEND", 6))
2472  return_value = _readAppend();
2473  else if (MATCH("MERGEAPPEND", 11))
2474  return_value = _readMergeAppend();
2475  else if (MATCH("RECURSIVEUNION", 14))
2476  return_value = _readRecursiveUnion();
2477  else if (MATCH("BITMAPAND", 9))
2478  return_value = _readBitmapAnd();
2479  else if (MATCH("BITMAPOR", 8))
2480  return_value = _readBitmapOr();
2481  else if (MATCH("SCAN", 4))
2482  return_value = _readScan();
2483  else if (MATCH("SEQSCAN", 7))
2484  return_value = _readSeqScan();
2485  else if (MATCH("SAMPLESCAN", 10))
2486  return_value = _readSampleScan();
2487  else if (MATCH("INDEXSCAN", 9))
2488  return_value = _readIndexScan();
2489  else if (MATCH("INDEXONLYSCAN", 13))
2490  return_value = _readIndexOnlyScan();
2491  else if (MATCH("BITMAPINDEXSCAN", 15))
2492  return_value = _readBitmapIndexScan();
2493  else if (MATCH("BITMAPHEAPSCAN", 14))
2494  return_value = _readBitmapHeapScan();
2495  else if (MATCH("TIDSCAN", 7))
2496  return_value = _readTidScan();
2497  else if (MATCH("SUBQUERYSCAN", 12))
2498  return_value = _readSubqueryScan();
2499  else if (MATCH("FUNCTIONSCAN", 12))
2500  return_value = _readFunctionScan();
2501  else if (MATCH("VALUESSCAN", 10))
2502  return_value = _readValuesScan();
2503  else if (MATCH("CTESCAN", 7))
2504  return_value = _readCteScan();
2505  else if (MATCH("WORKTABLESCAN", 13))
2506  return_value = _readWorkTableScan();
2507  else if (MATCH("FOREIGNSCAN", 11))
2508  return_value = _readForeignScan();
2509  else if (MATCH("CUSTOMSCAN", 10))
2510  return_value = _readCustomScan();
2511  else if (MATCH("JOIN", 4))
2512  return_value = _readJoin();
2513  else if (MATCH("NESTLOOP", 8))
2514  return_value = _readNestLoop();
2515  else if (MATCH("MERGEJOIN", 9))
2516  return_value = _readMergeJoin();
2517  else if (MATCH("HASHJOIN", 8))
2518  return_value = _readHashJoin();
2519  else if (MATCH("MATERIAL", 8))
2520  return_value = _readMaterial();
2521  else if (MATCH("SORT", 4))
2522  return_value = _readSort();
2523  else if (MATCH("GROUP", 5))
2524  return_value = _readGroup();
2525  else if (MATCH("AGG", 3))
2526  return_value = _readAgg();
2527  else if (MATCH("WINDOWAGG", 9))
2528  return_value = _readWindowAgg();
2529  else if (MATCH("UNIQUE", 6))
2530  return_value = _readUnique();
2531  else if (MATCH("GATHER", 6))
2532  return_value = _readGather();
2533  else if (MATCH("HASH", 4))
2534  return_value = _readHash();
2535  else if (MATCH("SETOP", 5))
2536  return_value = _readSetOp();
2537  else if (MATCH("LOCKROWS", 8))
2538  return_value = _readLockRows();
2539  else if (MATCH("LIMIT", 5))
2540  return_value = _readLimit();
2541  else if (MATCH("NESTLOOPPARAM", 13))
2542  return_value = _readNestLoopParam();
2543  else if (MATCH("PLANROWMARK", 11))
2544  return_value = _readPlanRowMark();
2545  else if (MATCH("PLANINVALITEM", 13))
2546  return_value = _readPlanInvalItem();
2547  else if (MATCH("SUBPLAN", 7))
2548  return_value = _readSubPlan();
2549  else if (MATCH("ALTERNATIVESUBPLAN", 18))
2550  return_value = _readAlternativeSubPlan();
2551  else if (MATCH("EXTENSIBLENODE", 14))
2552  return_value = _readExtensibleNode();
2553  else if (MATCH("PARTITIONBOUND", 14))
2554  return_value = _readPartitionBoundSpec();
2555  else if (MATCH("PARTRANGEDATUM", 14))
2556  return_value = _readPartitionRangeDatum();
2557  else
2558  {
2559  elog(ERROR, "badly formatted node string \"%.32s\"...", token);
2560  return_value = NULL; /* keep compiler quiet */
2561  }
2562 
2563  return (Node *) return_value;
2564 }
static NullTest * _readNullTest(void)
Definition: readfuncs.c:1089
static JoinExpr * _readJoinExpr(void)
Definition: readfuncs.c:1232
static RangeVar * _readRangeVar(void)
Definition: readfuncs.c:446
static RangeTblEntry * _readRangeTblEntry(void)
Definition: readfuncs.c:1290
static DefElem * _readDefElem(void)
Definition: readfuncs.c:1389
static RowExpr * _readRowExpr(void)
Definition: readfuncs.c:983
int length(const List *list)
Definition: list.c:1271
static MergeJoin * _readMergeJoin(void)
Definition: readfuncs.c:1932
static MinMaxExpr * _readMinMaxExpr(void)
Definition: readfuncs.c:1034
static RowMarkClause * _readRowMarkClause(void)
Definition: readfuncs.c:375
static FuncExpr * _readFuncExpr(void)
Definition: readfuncs.c:635
static Hash * _readHash(void)
Definition: readfuncs.c:2101
char * pg_strtok(int *length)
Definition: read.c:107
static Result * _readResult(void)
Definition: readfuncs.c:1475
static Query * _readQuery(void)
Definition: readfuncs.c:229
static RowCompareExpr * _readRowCompareExpr(void)
Definition: readfuncs.c:1000
static Param * _readParam(void)
Definition: readfuncs.c:529
static PlanInvalItem * _readPlanInvalItem(void)
Definition: readfuncs.c:2208
static WindowAgg * _readWindowAgg(void)
Definition: readfuncs.c:2043
static IndexScan * _readIndexScan(void)
Definition: readfuncs.c:1674
static NotifyStmt * _readNotifyStmt(void)
Definition: readfuncs.c:276
static Scan * _readScan(void)
Definition: readfuncs.c:1633
static NamedArgExpr * _readNamedArgExpr(void)
Definition: readfuncs.c:656
static LockRows * _readLockRows(void)
Definition: readfuncs.c:2142
static CurrentOfExpr * _readCurrentOfExpr(void)
Definition: readfuncs.c:1170
static CollateExpr * _readCollateExpr(void)
Definition: readfuncs.c:902
static SubqueryScan * _readSubqueryScan(void)
Definition: readfuncs.c:1761
static BitmapIndexScan * _readBitmapIndexScan(void)
Definition: readfuncs.c:1714
static CaseExpr * _readCaseExpr(void)
Definition: readfuncs.c:917
static FunctionScan * _readFunctionScan(void)
Definition: readfuncs.c:1776
static PartitionBoundSpec * _readPartitionBoundSpec(void)
Definition: readfuncs.c:2293
static Unique * _readUnique(void)
Definition: readfuncs.c:2067
static MergeAppend * _readMergeAppend(void)
Definition: readfuncs.c:1550
Definition: nodes.h:508
static WindowFunc * _readWindowFunc(void)
Definition: readfuncs.c:593
static WindowClause * _readWindowClause(void)
Definition: readfuncs.c:354
static OpExpr * _readOpExpr(void)
Definition: readfuncs.c:672
static IndexOnlyScan * _readIndexOnlyScan(void)
Definition: readfuncs.c:1695
static BitmapAnd * _readBitmapAnd(void)
Definition: readfuncs.c:1589
static FromExpr * _readFromExpr(void)
Definition: readfuncs.c:1252
static Aggref * _readAggref(void)
Definition: readfuncs.c:547
static NestLoop * _readNestLoop(void)
Definition: readfuncs.c:1917
static ModifyTable * _readModifyTable(void)
Definition: readfuncs.c:1503
static DistinctExpr * _readDistinctExpr(void)
Definition: readfuncs.c:692
static ArrayCoerceExpr * _readArrayCoerceExpr(void)
Definition: readfuncs.c:866
static TargetEntry * _readTargetEntry(void)
Definition: readfuncs.c:1200
static Agg * _readAgg(void)
Definition: readfuncs.c:2020
static SeqScan * _readSeqScan(void)
Definition: readfuncs.c:1646
static AlternativeSubPlan * _readAlternativeSubPlan(void)
Definition: readfuncs.c:2250
static CteScan * _readCteScan(void)
Definition: readfuncs.c:1807
#define ERROR
Definition: elog.h:43
static GroupingFunc * _readGroupingFunc(void)
Definition: readfuncs.c:576
static CoerceToDomain * _readCoerceToDomain(void)
Definition: readfuncs.c:1120
static SubLink * _readSubLink(void)
Definition: readfuncs.c:776
static HashJoin * _readHashJoin(void)
Definition: readfuncs.c:1956
static ValuesScan * _readValuesScan(void)
Definition: readfuncs.c:1792
static ConvertRowtypeExpr * _readConvertRowtypeExpr(void)
Definition: readfuncs.c:886
static OnConflictExpr * _readOnConflictExpr(void)
Definition: readfuncs.c:1266
static NullIfExpr * _readNullIfExpr(void)
Definition: readfuncs.c:712
static Append * _readAppend(void)
Definition: readfuncs.c:1535
static ExtensibleNode * _readExtensibleNode(void)
Definition: readfuncs.c:2263
static PlanRowMark * _readPlanRowMark(void)
Definition: readfuncs.c:2188
static FieldSelect * _readFieldSelect(void)
Definition: readfuncs.c:798
static ArrayRef * _readArrayRef(void)
Definition: readfuncs.c:615
static CaseWhen * _readCaseWhen(void)
Definition: readfuncs.c:935
static SQLValueFunction * _readSQLValueFunction(void)
Definition: readfuncs.c:1052
#define MATCH(tokname, namelen)
static ForeignScan * _readForeignScan(void)
Definition: readfuncs.c:1838
static RelabelType * _readRelabelType(void)
Definition: readfuncs.c:831
static SetOp * _readSetOp(void)
Definition: readfuncs.c:2120
static SortGroupClause * _readSortGroupClause(void)
Definition: readfuncs.c:322
static Limit * _readLimit(void)
Definition: readfuncs.c:2158
static PartitionRangeDatum * _readPartitionRangeDatum(void)
Definition: readfuncs.c:2309
static DeclareCursorStmt * _readDeclareCursorStmt(void)
Definition: readfuncs.c:290
static Gather * _readGather(void)
Definition: readfuncs.c:2084
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:52
static Var * _readVar(void)
Definition: readfuncs.c:483
static SampleScan * _readSampleScan(void)
Definition: readfuncs.c:1659
static SubPlan * _readSubPlan(void)
Definition: readfuncs.c:2222
#define NULL
Definition: c.h:226
static TidScan * _readTidScan(void)
Definition: readfuncs.c:1746
static CoerceToDomainValue * _readCoerceToDomainValue(void)
Definition: readfuncs.c:1138
static IntoClause * _readIntoClause(void)
Definition: readfuncs.c:464
static Const * _readConst(void)
Definition: readfuncs.c:504
static SetOperationStmt * _readSetOperationStmt(void)
Definition: readfuncs.c:413
static PlannedStmt * _readPlannedStmt(void)
Definition: readfuncs.c:1406
static Material * _readMaterial(void)
Definition: readfuncs.c:1971
static CaseTestExpr * _readCaseTestExpr(void)
Definition: readfuncs.c:950
static Alias * _readAlias(void)
Definition: readfuncs.c:435
static BitmapOr * _readBitmapOr(void)
Definition: readfuncs.c:1604
static RangeTblRef * _readRangeTblRef(void)
Definition: readfuncs.c:1219
static RecursiveUnion * _readRecursiveUnion(void)
Definition: readfuncs.c:1570
static FieldStore * _readFieldStore(void)
Definition: readfuncs.c:815
static CoalesceExpr * _readCoalesceExpr(void)
Definition: readfuncs.c:1018
static SetToDefault * _readSetToDefault(void)
Definition: readfuncs.c:1154
static WithCheckOption * _readWithCheckOption(void)
Definition: readfuncs.c:305
static InferenceElem * _readInferenceElem(void)
Definition: readfuncs.c:1185
static ScalarArrayOpExpr * _readScalarArrayOpExpr(void)
Definition: readfuncs.c:732
static BoolExpr * _readBoolExpr(void)
Definition: readfuncs.c:750
static CustomScan * _readCustomScan(void)
Definition: readfuncs.c:1860
static CommonTableExpr * _readCommonTableExpr(void)
Definition: readfuncs.c:391
static ArrayExpr * _readArrayExpr(void)
Definition: readfuncs.c:965
#define elog
Definition: elog.h:219
static RangeTblFunction * _readRangeTblFunction(void)
Definition: readfuncs.c:1355
static BooleanTest * _readBooleanTest(void)
Definition: readfuncs.c:1105
static Plan * _readPlan(void)
Definition: readfuncs.c:1462
static XmlExpr * _readXmlExpr(void)
Definition: readfuncs.c:1068
static TableSampleClause * _readTableSampleClause(void)
Definition: readfuncs.c:1374
static NestLoopParam * _readNestLoopParam(void)
Definition: readfuncs.c:2174
static ProjectSet * _readProjectSet(void)
Definition: readfuncs.c:1490
static BitmapHeapScan * _readBitmapHeapScan(void)
Definition: readfuncs.c:1731
static Join * _readJoin(void)
Definition: readfuncs.c:1904
static Sort * _readSort(void)
Definition: readfuncs.c:1984
static CoerceViaIO * _readCoerceViaIO(void)
Definition: readfuncs.c:849
static Group * _readGroup(void)
Definition: readfuncs.c:2003
static GroupingSet * _readGroupingSet(void)
Definition: readfuncs.c:339
static WorkTableScan * _readWorkTableScan(void)
Definition: readfuncs.c:1823
AttrNumber* readAttrNumberCols ( int  numCols)

Definition at line 2632 of file readfuncs.c.

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

2633 {
2634  int tokenLength,
2635  i;
2636  char *token;
2637  AttrNumber *attr_vals;
2638 
2639  if (numCols <= 0)
2640  return NULL;
2641 
2642  attr_vals = (AttrNumber *) palloc(numCols * sizeof(AttrNumber));
2643  for (i = 0; i < numCols; i++)
2644  {
2645  token = pg_strtok(&tokenLength);
2646  attr_vals[i] = atoi(token);
2647  }
2648 
2649  return attr_vals;
2650 }
char * pg_strtok(int *length)
Definition: read.c:107
#define NULL
Definition: c.h:226
void * palloc(Size size)
Definition: mcxt.c:891
int i
int16 AttrNumber
Definition: attnum.h:21
Bitmapset* readBitmapset ( void  )

Definition at line 220 of file readfuncs.c.

References _readBitmapset().

221 {
222  return _readBitmapset();
223 }
static Bitmapset * _readBitmapset(void)
Definition: readfuncs.c:179
bool* readBoolCols ( int  numCols)

Definition at line 2704 of file readfuncs.c.

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

2705 {
2706  int tokenLength,
2707  i;
2708  char *token;
2709  bool *bool_vals;
2710 
2711  if (numCols <= 0)
2712  return NULL;
2713 
2714  bool_vals = (bool *) palloc(numCols * sizeof(bool));
2715  for (i = 0; i < numCols; i++)
2716  {
2717  token = pg_strtok(&tokenLength);
2718  bool_vals[i] = strtobool(token);
2719  }
2720 
2721  return bool_vals;
2722 }
char * pg_strtok(int *length)
Definition: read.c:107
#define strtobool(x)
Definition: readfuncs.c:169
#define NULL
Definition: c.h:226
void * palloc(Size size)
Definition: mcxt.c:891
int i
static void ReadCommonJoin ( Join local_node)
static

Definition at line 1890 of file readfuncs.c.

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

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

1891 {
1892  READ_TEMP_LOCALS();
1893 
1894  ReadCommonPlan(&local_node->plan);
1895 
1896  READ_ENUM_FIELD(jointype, JoinType);
1897  READ_NODE_FIELD(joinqual);
1898 }
JoinType
Definition: nodes.h:665
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:92
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:52
Plan plan
Definition: plannodes.h:618
static void ReadCommonPlan ( Plan local_node)
static

Definition at line 1439 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(), _readGroup(), _readHash(), _readLimit(), _readLockRows(), _readMaterial(), _readMergeAppend(), _readModifyTable(), _readPlan(), _readProjectSet(), _readRecursiveUnion(), _readResult(), _readSetOp(), _readSort(), _readUnique(), _readWindowAgg(), ReadCommonJoin(), and ReadCommonScan().

1440 {
1441  READ_TEMP_LOCALS();
1442 
1443  READ_FLOAT_FIELD(startup_cost);
1444  READ_FLOAT_FIELD(total_cost);
1445  READ_FLOAT_FIELD(plan_rows);
1446  READ_INT_FIELD(plan_width);
1447  READ_BOOL_FIELD(parallel_aware);
1448  READ_INT_FIELD(plan_node_id);
1449  READ_NODE_FIELD(targetlist);
1450  READ_NODE_FIELD(qual);
1451  READ_NODE_FIELD(lefttree);
1452  READ_NODE_FIELD(righttree);
1453  READ_NODE_FIELD(initPlan);
1454  READ_BITMAPSET_FIELD(extParam);
1455  READ_BITMAPSET_FIELD(allParam);
1456 }
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:104
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:98
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:123
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:52
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:129
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:62
static void ReadCommonScan ( Scan local_node)
static

Definition at line 1620 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(), _readTidScan(), _readValuesScan(), and _readWorkTableScan().

1621 {
1622  READ_TEMP_LOCALS();
1623 
1624  ReadCommonPlan(&local_node->plan);
1625 
1626  READ_UINT_FIELD(scanrelid);
1627 }
Plan plan
Definition: plannodes.h:305
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1439
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:68
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:52
Datum readDatum ( bool  typbyval)

Definition at line 2575 of file readfuncs.c.

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

Referenced by _readConst().

2576 {
2577  Size length,
2578  i;
2579  int tokenLength;
2580  char *token;
2581  Datum res;
2582  char *s;
2583 
2584  /*
2585  * read the actual length of the value
2586  */
2587  token = pg_strtok(&tokenLength);
2588  length = atoui(token);
2589 
2590  token = pg_strtok(&tokenLength); /* read the '[' */
2591  if (token == NULL || token[0] != '[')
2592  elog(ERROR, "expected \"[\" to start datum, but got \"%s\"; length = %zu",
2593  token ? (const char *) token : "[NULL]", length);
2594 
2595  if (typbyval)
2596  {
2597  if (length > (Size) sizeof(Datum))
2598  elog(ERROR, "byval datum but length = %zu", length);
2599  res = (Datum) 0;
2600  s = (char *) (&res);
2601  for (i = 0; i < (Size) sizeof(Datum); i++)
2602  {
2603  token = pg_strtok(&tokenLength);
2604  s[i] = (char) atoi(token);
2605  }
2606  }
2607  else if (length <= 0)
2608  res = (Datum) NULL;
2609  else
2610  {
2611  s = (char *) palloc(length);
2612  for (i = 0; i < length; i++)
2613  {
2614  token = pg_strtok(&tokenLength);
2615  s[i] = (char) atoi(token);
2616  }
2617  res = PointerGetDatum(s);
2618  }
2619 
2620  token = pg_strtok(&tokenLength); /* read the ']' */
2621  if (token == NULL || token[0] != ']')
2622  elog(ERROR, "expected \"]\" to end datum, but got \"%s\"; length = %zu",
2623  token ? (const char *) token : "[NULL]", length);
2624 
2625  return res;
2626 }
#define atoui(x)
Definition: readfuncs.c:165
int length(const List *list)
Definition: list.c:1271
char * pg_strtok(int *length)
Definition: read.c:107
#define PointerGetDatum(X)
Definition: postgres.h:564
#define ERROR
Definition: elog.h:43
uintptr_t Datum
Definition: postgres.h:374
#define NULL
Definition: c.h:226
size_t Size
Definition: c.h:352
void * palloc(Size size)
Definition: mcxt.c:891
int i
#define elog
Definition: elog.h:219
int* readIntCols ( int  numCols)

Definition at line 2680 of file readfuncs.c.

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

2681 {
2682  int tokenLength,
2683  i;
2684  char *token;
2685  int *int_vals;
2686 
2687  if (numCols <= 0)
2688  return NULL;
2689 
2690  int_vals = (int *) palloc(numCols * sizeof(int));
2691  for (i = 0; i < numCols; i++)
2692  {
2693  token = pg_strtok(&tokenLength);
2694  int_vals[i] = atoi(token);
2695  }
2696 
2697  return int_vals;
2698 }
char * pg_strtok(int *length)
Definition: read.c:107
#define NULL
Definition: c.h:226
void * palloc(Size size)
Definition: mcxt.c:891
int i
Oid* readOidCols ( int  numCols)

Definition at line 2656 of file readfuncs.c.

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

2657 {
2658  int tokenLength,
2659  i;
2660  char *token;
2661  Oid *oid_vals;
2662 
2663  if (numCols <= 0)
2664  return NULL;
2665 
2666  oid_vals = (Oid *) palloc(numCols * sizeof(Oid));
2667  for (i = 0; i < numCols; i++)
2668  {
2669  token = pg_strtok(&tokenLength);
2670  oid_vals[i] = atooid(token);
2671  }
2672 
2673  return oid_vals;
2674 }
char * pg_strtok(int *length)
Definition: read.c:107
unsigned int Oid
Definition: postgres_ext.h:31
#define atooid(x)
Definition: readfuncs.c:167
#define NULL
Definition: c.h:226
void * palloc(Size size)
Definition: mcxt.c:891
int i