PostgreSQL Source Code  git master
readfuncs.c File Reference
#include "postgres.h"
#include <math.h>
#include "miscadmin.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_UINT64_FIELD(fldname)
 
#define READ_LONG_FIELD(fldname)
 
#define READ_OID_FIELD(fldname)
 
#define READ_CHAR_FIELD(fldname)
 
#define READ_ENUM_FIELD(fldname, enumtype)
 
#define READ_FLOAT_FIELD(fldname)
 
#define READ_BOOL_FIELD(fldname)
 
#define READ_STRING_FIELD(fldname)
 
#define READ_LOCATION_FIELD(fldname)
 
#define READ_NODE_FIELD(fldname)
 
#define READ_BITMAPSET_FIELD(fldname)
 
#define READ_ATTRNUMBER_ARRAY(fldname, len)
 
#define READ_OID_ARRAY(fldname, len)
 
#define READ_INT_ARRAY(fldname, len)
 
#define READ_BOOL_ARRAY(fldname, len)
 
#define READ_DONE()    return local_node
 
#define atoui(x)   ((unsigned int) strtoul((x), NULL, 10))
 
#define strtobool(x)   ((*(x) == 't') ? true : false)
 
#define nullable_string(token, length)    ((length) == 0 ? NULL : debackslash(token, length))
 
#define MATCH(tokname, namelen)    (length == namelen && memcmp(token, tokname, namelen) == 0)
 

Functions

static Bitmapset_readBitmapset (void)
 
BitmapsetreadBitmapset (void)
 
static Query_readQuery (void)
 
static NotifyStmt_readNotifyStmt (void)
 
static DeclareCursorStmt_readDeclareCursorStmt (void)
 
static WithCheckOption_readWithCheckOption (void)
 
static SortGroupClause_readSortGroupClause (void)
 
static GroupingSet_readGroupingSet (void)
 
static WindowClause_readWindowClause (void)
 
static RowMarkClause_readRowMarkClause (void)
 
static CTESearchClause_readCTESearchClause (void)
 
static CTECycleClause_readCTECycleClause (void)
 
static CommonTableExpr_readCommonTableExpr (void)
 
static SetOperationStmt_readSetOperationStmt (void)
 
static Alias_readAlias (void)
 
static RangeVar_readRangeVar (void)
 
static TableFunc_readTableFunc (void)
 
static IntoClause_readIntoClause (void)
 
static Var_readVar (void)
 
static Const_readConst (void)
 
static Param_readParam (void)
 
static Aggref_readAggref (void)
 
static GroupingFunc_readGroupingFunc (void)
 
static WindowFunc_readWindowFunc (void)
 
static SubscriptingRef_readSubscriptingRef (void)
 
static FuncExpr_readFuncExpr (void)
 
static NamedArgExpr_readNamedArgExpr (void)
 
static OpExpr_readOpExpr (void)
 
static DistinctExpr_readDistinctExpr (void)
 
static NullIfExpr_readNullIfExpr (void)
 
static ScalarArrayOpExpr_readScalarArrayOpExpr (void)
 
static BoolExpr_readBoolExpr (void)
 
static SubLink_readSubLink (void)
 
static FieldSelect_readFieldSelect (void)
 
static FieldStore_readFieldStore (void)
 
static RelabelType_readRelabelType (void)
 
static CoerceViaIO_readCoerceViaIO (void)
 
static ArrayCoerceExpr_readArrayCoerceExpr (void)
 
static ConvertRowtypeExpr_readConvertRowtypeExpr (void)
 
static CollateExpr_readCollateExpr (void)
 
static CaseExpr_readCaseExpr (void)
 
static CaseWhen_readCaseWhen (void)
 
static CaseTestExpr_readCaseTestExpr (void)
 
static ArrayExpr_readArrayExpr (void)
 
static RowExpr_readRowExpr (void)
 
static RowCompareExpr_readRowCompareExpr (void)
 
static CoalesceExpr_readCoalesceExpr (void)
 
static MinMaxExpr_readMinMaxExpr (void)
 
static SQLValueFunction_readSQLValueFunction (void)
 
static XmlExpr_readXmlExpr (void)
 
static NullTest_readNullTest (void)
 
static BooleanTest_readBooleanTest (void)
 
static CoerceToDomain_readCoerceToDomain (void)
 
static CoerceToDomainValue_readCoerceToDomainValue (void)
 
static SetToDefault_readSetToDefault (void)
 
static CurrentOfExpr_readCurrentOfExpr (void)
 
static NextValueExpr_readNextValueExpr (void)
 
static InferenceElem_readInferenceElem (void)
 
static TargetEntry_readTargetEntry (void)
 
static RangeTblRef_readRangeTblRef (void)
 
static JoinExpr_readJoinExpr (void)
 
static FromExpr_readFromExpr (void)
 
static OnConflictExpr_readOnConflictExpr (void)
 
static AppendRelInfo_readAppendRelInfo (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 TidRangeScan_readTidRangeScan (void)
 
static SubqueryScan_readSubqueryScan (void)
 
static FunctionScan_readFunctionScan (void)
 
static ValuesScan_readValuesScan (void)
 
static TableFuncScan_readTableFuncScan (void)
 
static CteScan_readCteScan (void)
 
static NamedTuplestoreScan_readNamedTuplestoreScan (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 Memoize_readMemoize (void)
 
static void ReadCommonSort (Sort *local_node)
 
static Sort_readSort (void)
 
static IncrementalSort_readIncrementalSort (void)
 
static Group_readGroup (void)
 
static Agg_readAgg (void)
 
static WindowAgg_readWindowAgg (void)
 
static Unique_readUnique (void)
 
static Gather_readGather (void)
 
static GatherMerge_readGatherMerge (void)
 
static Hash_readHash (void)
 
static SetOp_readSetOp (void)
 
static LockRows_readLockRows (void)
 
static Limit_readLimit (void)
 
static NestLoopParam_readNestLoopParam (void)
 
static PlanRowMark_readPlanRowMark (void)
 
static PartitionPruneInfo_readPartitionPruneInfo (void)
 
static PartitionedRelPruneInfo_readPartitionedRelPruneInfo (void)
 
static PartitionPruneStepOp_readPartitionPruneStepOp (void)
 
static PartitionPruneStepCombine_readPartitionPruneStepCombine (void)
 
static PlanInvalItem_readPlanInvalItem (void)
 
static SubPlan_readSubPlan (void)
 
static AlternativeSubPlan_readAlternativeSubPlan (void)
 
static ExtensibleNode_readExtensibleNode (void)
 
static PartitionBoundSpec_readPartitionBoundSpec (void)
 
static PartitionRangeDatum_readPartitionRangeDatum (void)
 
NodeparseNodeString (void)
 
Datum readDatum (bool typbyval)
 
AttrNumberreadAttrNumberCols (int numCols)
 
OidreadOidCols (int numCols)
 
int * readIntCols (int numCols)
 
boolreadBoolCols (int numCols)
 

Macro Definition Documentation

◆ atoui

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

Definition at line 183 of file readfuncs.c.

◆ MATCH

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

◆ nullable_string

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

Definition at line 187 of file readfuncs.c.

◆ READ_ATTRNUMBER_ARRAY

#define READ_ATTRNUMBER_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readAttrNumberCols(len)
const void size_t len
const char * pg_strtok(int *length)
Definition: read.c:152
AttrNumber * readAttrNumberCols(int numCols)
Definition: readfuncs.c:3052

Definition at line 153 of file readfuncs.c.

◆ READ_BITMAPSET_FIELD

#define READ_BITMAPSET_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
(void) token; /* in case not used elsewhere */ \
local_node->fldname = _readBitmapset()
static Bitmapset * _readBitmapset(void)
Definition: readfuncs.c:195

Definition at line 147 of file readfuncs.c.

◆ READ_BOOL_ARRAY

#define READ_BOOL_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readBoolCols(len)
bool * readBoolCols(int numCols)
Definition: readfuncs.c:3124

Definition at line 168 of file readfuncs.c.

◆ READ_BOOL_FIELD

#define READ_BOOL_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = strtobool(token)
#define strtobool(x)
Definition: readfuncs.c:185

Definition at line 115 of file readfuncs.c.

◆ READ_CHAR_FIELD

#define READ_CHAR_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
/* avoid overhead of calling debackslash() for one char */ \
local_node->fldname = (length == 0) ? '\0' : (token[0] == '\\' ? token[1] : token[0])

Definition at line 96 of file readfuncs.c.

◆ READ_DONE

#define READ_DONE ( )     return local_node

Definition at line 173 of file readfuncs.c.

◆ READ_ENUM_FIELD

#define READ_ENUM_FIELD (   fldname,
  enumtype 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = (enumtype) atoi(token)

Definition at line 103 of file readfuncs.c.

◆ READ_FLOAT_FIELD

#define READ_FLOAT_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atof(token)

Definition at line 109 of file readfuncs.c.

◆ READ_INT_ARRAY

#define READ_INT_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readIntCols(len)
int * readIntCols(int numCols)
Definition: readfuncs.c:3100

Definition at line 163 of file readfuncs.c.

◆ READ_INT_FIELD

#define READ_INT_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atoi(token)

Definition at line 66 of file readfuncs.c.

◆ READ_LOCALS

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

Definition at line 61 of file readfuncs.c.

◆ READ_LOCALS_NO_FIELDS

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

Definition at line 52 of file readfuncs.c.

◆ READ_LOCATION_FIELD

#define READ_LOCATION_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
(void) token; /* in case not used elsewhere */ \
local_node->fldname = -1 /* set field to "unknown" */

Definition at line 133 of file readfuncs.c.

◆ READ_LONG_FIELD

#define READ_LONG_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atol(token)

Definition at line 84 of file readfuncs.c.

◆ READ_NODE_FIELD

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

Definition at line 141 of file readfuncs.c.

◆ READ_OID_ARRAY

#define READ_OID_ARRAY (   fldname,
  len 
)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
local_node->fldname = readOidCols(len)
Oid * readOidCols(int numCols)
Definition: readfuncs.c:3076

Definition at line 158 of file readfuncs.c.

◆ READ_OID_FIELD

#define READ_OID_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atooid(token)
#define atooid(x)
Definition: postgres_ext.h:42

Definition at line 90 of file readfuncs.c.

◆ READ_STRING_FIELD

#define READ_STRING_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = nullable_string(token, length)
#define nullable_string(token, length)
Definition: readfuncs.c:187

Definition at line 121 of file readfuncs.c.

◆ READ_TEMP_LOCALS

#define READ_TEMP_LOCALS ( )
Value:
const char *token; \
int length

Definition at line 56 of file readfuncs.c.

◆ READ_UINT64_FIELD

#define READ_UINT64_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = strtou64(token, NULL, 10)
#define strtou64(str, endptr, base)
Definition: c.h:1322

Definition at line 78 of file readfuncs.c.

◆ READ_UINT_FIELD

#define READ_UINT_FIELD (   fldname)
Value:
token = pg_strtok(&length); /* skip :fldname */ \
token = pg_strtok(&length); /* get field value */ \
local_node->fldname = atoui(token)
#define atoui(x)
Definition: readfuncs.c:183

Definition at line 72 of file readfuncs.c.

◆ strtobool

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

Definition at line 185 of file readfuncs.c.

Function Documentation

◆ _readAgg()

static Agg* _readAgg ( void  )
static

Definition at line 2307 of file readfuncs.c.

2308 {
2309  READ_LOCALS(Agg);
2310 
2311  ReadCommonPlan(&local_node->plan);
2312 
2313  READ_ENUM_FIELD(aggstrategy, AggStrategy);
2314  READ_ENUM_FIELD(aggsplit, AggSplit);
2315  READ_INT_FIELD(numCols);
2316  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2317  READ_OID_ARRAY(grpOperators, local_node->numCols);
2318  READ_OID_ARRAY(grpCollations, local_node->numCols);
2319  READ_LONG_FIELD(numGroups);
2320  READ_UINT64_FIELD(transitionSpace);
2321  READ_BITMAPSET_FIELD(aggParams);
2322  READ_NODE_FIELD(groupingSets);
2323  READ_NODE_FIELD(chain);
2324 
2325  READ_DONE();
2326 }
AggStrategy
Definition: nodes.h:770
AggSplit
Definition: nodes.h:792
static void ReadCommonPlan(Plan *local_node)
Definition: readfuncs.c:1611
#define READ_INT_FIELD(fldname)
Definition: readfuncs.c:66
#define READ_NODE_FIELD(fldname)
Definition: readfuncs.c:141
#define READ_BITMAPSET_FIELD(fldname)
Definition: readfuncs.c:147
#define READ_LONG_FIELD(fldname)
Definition: readfuncs.c:84
#define READ_ATTRNUMBER_ARRAY(fldname, len)
Definition: readfuncs.c:153
#define READ_UINT64_FIELD(fldname)
Definition: readfuncs.c:78
#define READ_ENUM_FIELD(fldname, enumtype)
Definition: readfuncs.c:103
#define READ_LOCALS(nodeTypeName)
Definition: readfuncs.c:61
#define READ_DONE()
Definition: readfuncs.c:173
#define READ_OID_ARRAY(fldname, len)
Definition: readfuncs.c:158
Definition: plannodes.h:879

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

Referenced by parseNodeString().

◆ _readAggref()

static Aggref* _readAggref ( void  )
static

Definition at line 638 of file readfuncs.c.

639 {
641 
642  READ_OID_FIELD(aggfnoid);
643  READ_OID_FIELD(aggtype);
644  READ_OID_FIELD(aggcollid);
645  READ_OID_FIELD(inputcollid);
646  READ_OID_FIELD(aggtranstype);
647  READ_NODE_FIELD(aggargtypes);
648  READ_NODE_FIELD(aggdirectargs);
650  READ_NODE_FIELD(aggorder);
651  READ_NODE_FIELD(aggdistinct);
652  READ_NODE_FIELD(aggfilter);
653  READ_BOOL_FIELD(aggstar);
654  READ_BOOL_FIELD(aggvariadic);
655  READ_CHAR_FIELD(aggkind);
656  READ_UINT_FIELD(agglevelsup);
657  READ_ENUM_FIELD(aggsplit, AggSplit);
658  READ_INT_FIELD(aggno);
659  READ_INT_FIELD(aggtransno);
660  READ_LOCATION_FIELD(location);
661 
662  READ_DONE();
663 }
#define READ_UINT_FIELD(fldname)
Definition: readfuncs.c:72
#define READ_CHAR_FIELD(fldname)
Definition: readfuncs.c:96
#define READ_OID_FIELD(fldname)
Definition: readfuncs.c:90
#define READ_LOCATION_FIELD(fldname)
Definition: readfuncs.c:133
#define READ_BOOL_FIELD(fldname)
Definition: readfuncs.c:115

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

Referenced by parseNodeString().

◆ _readAlias()

static Alias* _readAlias ( void  )
static

Definition at line 501 of file readfuncs.c.

502 {
504 
505  READ_STRING_FIELD(aliasname);
506  READ_NODE_FIELD(colnames);
507 
508  READ_DONE();
509 }
#define READ_STRING_FIELD(fldname)
Definition: readfuncs.c:121

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_STRING_FIELD.

Referenced by parseNodeString().

◆ _readAlternativeSubPlan()

static AlternativeSubPlan* _readAlternativeSubPlan ( void  )
static

Definition at line 2632 of file readfuncs.c.

2633 {
2635 
2636  READ_NODE_FIELD(subplans);
2637 
2638  READ_DONE();
2639 }

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readAppend()

static Append* _readAppend ( void  )
static

Definition at line 1711 of file readfuncs.c.

1712 {
1714 
1715  ReadCommonPlan(&local_node->plan);
1716 
1717  READ_BITMAPSET_FIELD(apprelids);
1718  READ_NODE_FIELD(appendplans);
1719  READ_INT_FIELD(nasyncplans);
1720  READ_INT_FIELD(first_partial_plan);
1721  READ_NODE_FIELD(part_prune_info);
1722 
1723  READ_DONE();
1724 }

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

Referenced by parseNodeString().

◆ _readAppendRelInfo()

static AppendRelInfo* _readAppendRelInfo ( void  )
static

Definition at line 1403 of file readfuncs.c.

1404 {
1406 
1407  READ_UINT_FIELD(parent_relid);
1408  READ_UINT_FIELD(child_relid);
1409  READ_OID_FIELD(parent_reltype);
1410  READ_OID_FIELD(child_reltype);
1411  READ_NODE_FIELD(translated_vars);
1412  READ_INT_FIELD(num_child_cols);
1413  READ_ATTRNUMBER_ARRAY(parent_colnos, local_node->num_child_cols);
1414  READ_OID_FIELD(parent_reloid);
1415 
1416  READ_DONE();
1417 }

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

Referenced by parseNodeString().

◆ _readArrayCoerceExpr()

static ArrayCoerceExpr* _readArrayCoerceExpr ( void  )
static

Definition at line 962 of file readfuncs.c.

963 {
965 
967  READ_NODE_FIELD(elemexpr);
968  READ_OID_FIELD(resulttype);
969  READ_INT_FIELD(resulttypmod);
970  READ_OID_FIELD(resultcollid);
971  READ_ENUM_FIELD(coerceformat, CoercionForm);
972  READ_LOCATION_FIELD(location);
973 
974  READ_DONE();
975 }
void * arg
CoercionForm
Definition: primnodes.h:482

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().

◆ _readArrayExpr()

static ArrayExpr* _readArrayExpr ( void  )
static

Definition at line 1060 of file readfuncs.c.

1061 {
1063 
1064  READ_OID_FIELD(array_typeid);
1065  READ_OID_FIELD(array_collid);
1066  READ_OID_FIELD(element_typeid);
1067  READ_NODE_FIELD(elements);
1068  READ_BOOL_FIELD(multidims);
1069  READ_LOCATION_FIELD(location);
1070 
1071  READ_DONE();
1072 }

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

Referenced by parseNodeString().

◆ _readBitmapAnd()

static BitmapAnd* _readBitmapAnd ( void  )
static

Definition at line 1772 of file readfuncs.c.

1773 {
1775 
1776  ReadCommonPlan(&local_node->plan);
1777 
1778  READ_NODE_FIELD(bitmapplans);
1779 
1780  READ_DONE();
1781 }

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

Referenced by parseNodeString().

◆ _readBitmapHeapScan()

static BitmapHeapScan* _readBitmapHeapScan ( void  )
static

Definition at line 1917 of file readfuncs.c.

1918 {
1920 
1921  ReadCommonScan(&local_node->scan);
1922 
1923  READ_NODE_FIELD(bitmapqualorig);
1924 
1925  READ_DONE();
1926 }
static void ReadCommonScan(Scan *local_node)
Definition: readfuncs.c:1804

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

Referenced by parseNodeString().

◆ _readBitmapIndexScan()

static BitmapIndexScan* _readBitmapIndexScan ( void  )
static

Definition at line 1899 of file readfuncs.c.

1900 {
1902 
1903  ReadCommonScan(&local_node->scan);
1904 
1905  READ_OID_FIELD(indexid);
1906  READ_BOOL_FIELD(isshared);
1907  READ_NODE_FIELD(indexqual);
1908  READ_NODE_FIELD(indexqualorig);
1909 
1910  READ_DONE();
1911 }

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

Referenced by parseNodeString().

◆ _readBitmapOr()

static BitmapOr* _readBitmapOr ( void  )
static

Definition at line 1787 of file readfuncs.c.

1788 {
1790 
1791  ReadCommonPlan(&local_node->plan);
1792 
1793  READ_BOOL_FIELD(isshared);
1794  READ_NODE_FIELD(bitmapplans);
1795 
1796  READ_DONE();
1797 }

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

Referenced by parseNodeString().

◆ _readBitmapset()

static Bitmapset* _readBitmapset ( void  )
static

Definition at line 195 of file readfuncs.c.

196 {
197  Bitmapset *result = NULL;
198 
200 
201  token = pg_strtok(&length);
202  if (token == NULL)
203  elog(ERROR, "incomplete Bitmapset structure");
204  if (length != 1 || token[0] != '(')
205  elog(ERROR, "unrecognized token: \"%.*s\"", length, token);
206 
207  token = pg_strtok(&length);
208  if (token == NULL)
209  elog(ERROR, "incomplete Bitmapset structure");
210  if (length != 1 || token[0] != 'b')
211  elog(ERROR, "unrecognized token: \"%.*s\"", length, token);
212 
213  for (;;)
214  {
215  int val;
216  char *endptr;
217 
218  token = pg_strtok(&length);
219  if (token == NULL)
220  elog(ERROR, "unterminated Bitmapset structure");
221  if (length == 1 && token[0] == ')')
222  break;
223  val = (int) strtol(token, &endptr, 10);
224  if (endptr != token + length)
225  elog(ERROR, "unrecognized integer: \"%.*s\"", length, token);
226  result = bms_add_member(result, val);
227  }
228 
229  return result;
230 }
Bitmapset * bms_add_member(Bitmapset *a, int x)
Definition: bitmapset.c:738
#define ERROR
Definition: elog.h:33
#define elog(elevel,...)
Definition: elog.h:218
long val
Definition: informix.c:664
#define READ_TEMP_LOCALS()
Definition: readfuncs.c:56

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

Referenced by readBitmapset().

◆ _readBooleanTest()

static BooleanTest* _readBooleanTest ( void  )
static

Definition at line 1200 of file readfuncs.c.

1201 {
1203 
1205  READ_ENUM_FIELD(booltesttype, BoolTestType);
1206  READ_LOCATION_FIELD(location);
1207 
1208  READ_DONE();
1209 }
BoolTestType
Definition: primnodes.h:1281

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

Referenced by parseNodeString().

◆ _readBoolExpr()

static BoolExpr* _readBoolExpr ( void  )
static

Definition at line 846 of file readfuncs.c.

847 {
849 
850  /* do-it-yourself enum representation */
851  token = pg_strtok(&length); /* skip :boolop */
852  token = pg_strtok(&length); /* get field value */
853  if (strncmp(token, "and", 3) == 0)
854  local_node->boolop = AND_EXPR;
855  else if (strncmp(token, "or", 2) == 0)
856  local_node->boolop = OR_EXPR;
857  else if (strncmp(token, "not", 3) == 0)
858  local_node->boolop = NOT_EXPR;
859  else
860  elog(ERROR, "unrecognized boolop \"%.*s\"", length, token);
861 
863  READ_LOCATION_FIELD(location);
864 
865  READ_DONE();
866 }
@ AND_EXPR
Definition: primnodes.h:619
@ OR_EXPR
Definition: primnodes.h:619
@ NOT_EXPR
Definition: primnodes.h:619

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

Referenced by parseNodeString().

◆ _readCaseExpr()

static CaseExpr* _readCaseExpr ( void  )
static

Definition at line 1012 of file readfuncs.c.

1013 {
1015 
1016  READ_OID_FIELD(casetype);
1017  READ_OID_FIELD(casecollid);
1020  READ_NODE_FIELD(defresult);
1021  READ_LOCATION_FIELD(location);
1022 
1023  READ_DONE();
1024 }

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

Referenced by parseNodeString().

◆ _readCaseTestExpr()

static CaseTestExpr* _readCaseTestExpr ( void  )
static

Definition at line 1045 of file readfuncs.c.

1046 {
1048 
1049  READ_OID_FIELD(typeId);
1050  READ_INT_FIELD(typeMod);
1051  READ_OID_FIELD(collation);
1052 
1053  READ_DONE();
1054 }

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_OID_FIELD.

Referenced by parseNodeString().

◆ _readCaseWhen()

static CaseWhen* _readCaseWhen ( void  )
static

Definition at line 1030 of file readfuncs.c.

1031 {
1033 
1034  READ_NODE_FIELD(expr);
1035  READ_NODE_FIELD(result);
1036  READ_LOCATION_FIELD(location);
1037 
1038  READ_DONE();
1039 }

References READ_DONE, READ_LOCALS, READ_LOCATION_FIELD, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readCoalesceExpr()

static CoalesceExpr* _readCoalesceExpr ( void  )
static

Definition at line 1113 of file readfuncs.c.

1114 {
1116 
1117  READ_OID_FIELD(coalescetype);
1118  READ_OID_FIELD(coalescecollid);
1120  READ_LOCATION_FIELD(location);
1121 
1122  READ_DONE();
1123 }

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

Referenced by parseNodeString().

◆ _readCoerceToDomain()

static CoerceToDomain* _readCoerceToDomain ( void  )
static

Definition at line 1215 of file readfuncs.c.

1216 {
1218 
1220  READ_OID_FIELD(resulttype);
1221  READ_INT_FIELD(resulttypmod);
1222  READ_OID_FIELD(resultcollid);
1223  READ_ENUM_FIELD(coercionformat, CoercionForm);
1224  READ_LOCATION_FIELD(location);
1225 
1226  READ_DONE();
1227 }

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().

◆ _readCoerceToDomainValue()

static CoerceToDomainValue* _readCoerceToDomainValue ( void  )
static

Definition at line 1233 of file readfuncs.c.

1234 {
1236 
1237  READ_OID_FIELD(typeId);
1238  READ_INT_FIELD(typeMod);
1239  READ_OID_FIELD(collation);
1240  READ_LOCATION_FIELD(location);
1241 
1242  READ_DONE();
1243 }

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

Referenced by parseNodeString().

◆ _readCoerceViaIO()

static CoerceViaIO* _readCoerceViaIO ( void  )
static

Definition at line 945 of file readfuncs.c.

946 {
948 
950  READ_OID_FIELD(resulttype);
951  READ_OID_FIELD(resultcollid);
952  READ_ENUM_FIELD(coerceformat, CoercionForm);
953  READ_LOCATION_FIELD(location);
954 
955  READ_DONE();
956 }

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

Referenced by parseNodeString().

◆ _readCollateExpr()

static CollateExpr* _readCollateExpr ( void  )
static

Definition at line 997 of file readfuncs.c.

998 {
1000 
1002  READ_OID_FIELD(collOid);
1003  READ_LOCATION_FIELD(location);
1004 
1005  READ_DONE();
1006 }

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

Referenced by parseNodeString().

◆ _readCommonTableExpr()

static CommonTableExpr* _readCommonTableExpr ( void  )
static

Definition at line 454 of file readfuncs.c.

455 {
457 
458  READ_STRING_FIELD(ctename);
459  READ_NODE_FIELD(aliascolnames);
460  READ_ENUM_FIELD(ctematerialized, CTEMaterialize);
461  READ_NODE_FIELD(ctequery);
462  READ_NODE_FIELD(search_clause);
463  READ_NODE_FIELD(cycle_clause);
464  READ_LOCATION_FIELD(location);
465  READ_BOOL_FIELD(cterecursive);
466  READ_INT_FIELD(cterefcount);
467  READ_NODE_FIELD(ctecolnames);
468  READ_NODE_FIELD(ctecoltypes);
469  READ_NODE_FIELD(ctecoltypmods);
470  READ_NODE_FIELD(ctecolcollations);
471 
472  READ_DONE();
473 }
CTEMaterialize
Definition: parsenodes.h:1478

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

Referenced by parseNodeString().

◆ _readConst()

static Const* _readConst ( void  )
static

Definition at line 595 of file readfuncs.c.

596 {
598 
599  READ_OID_FIELD(consttype);
600  READ_INT_FIELD(consttypmod);
601  READ_OID_FIELD(constcollid);
602  READ_INT_FIELD(constlen);
603  READ_BOOL_FIELD(constbyval);
604  READ_BOOL_FIELD(constisnull);
605  READ_LOCATION_FIELD(location);
606 
607  token = pg_strtok(&length); /* skip :constvalue */
608  if (local_node->constisnull)
609  token = pg_strtok(&length); /* skip "<>" */
610  else
611  local_node->constvalue = readDatum(local_node->constbyval);
612 
613  READ_DONE();
614 }
Datum readDatum(bool typbyval)
Definition: readfuncs.c:2995

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

Referenced by parseNodeString().

◆ _readConvertRowtypeExpr()

static ConvertRowtypeExpr* _readConvertRowtypeExpr ( void  )
static

Definition at line 981 of file readfuncs.c.

982 {
984 
986  READ_OID_FIELD(resulttype);
987  READ_ENUM_FIELD(convertformat, CoercionForm);
988  READ_LOCATION_FIELD(location);
989 
990  READ_DONE();
991 }

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

Referenced by parseNodeString().

◆ _readCTECycleClause()

static CTECycleClause* _readCTECycleClause ( void  )
static

Definition at line 432 of file readfuncs.c.

433 {
435 
436  READ_NODE_FIELD(cycle_col_list);
437  READ_STRING_FIELD(cycle_mark_column);
438  READ_NODE_FIELD(cycle_mark_value);
439  READ_NODE_FIELD(cycle_mark_default);
440  READ_STRING_FIELD(cycle_path_column);
441  READ_LOCATION_FIELD(location);
442  READ_OID_FIELD(cycle_mark_type);
443  READ_INT_FIELD(cycle_mark_typmod);
444  READ_OID_FIELD(cycle_mark_collation);
445  READ_OID_FIELD(cycle_mark_neop);
446 
447  READ_DONE();
448 }

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

Referenced by parseNodeString().

◆ _readCteScan()

static CteScan* _readCteScan ( void  )
static

Definition at line 2023 of file readfuncs.c.

2024 {
2026 
2027  ReadCommonScan(&local_node->scan);
2028 
2029  READ_INT_FIELD(ctePlanId);
2030  READ_INT_FIELD(cteParam);
2031 
2032  READ_DONE();
2033 }

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

Referenced by parseNodeString().

◆ _readCTESearchClause()

static CTESearchClause* _readCTESearchClause ( void  )
static

Definition at line 416 of file readfuncs.c.

417 {
419 
420  READ_NODE_FIELD(search_col_list);
421  READ_BOOL_FIELD(search_breadth_first);
422  READ_STRING_FIELD(search_seq_column);
423  READ_LOCATION_FIELD(location);
424 
425  READ_DONE();
426 }

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

Referenced by parseNodeString().

◆ _readCurrentOfExpr()

static CurrentOfExpr* _readCurrentOfExpr ( void  )
static

Definition at line 1265 of file readfuncs.c.

1266 {
1268 
1269  READ_UINT_FIELD(cvarno);
1270  READ_STRING_FIELD(cursor_name);
1271  READ_INT_FIELD(cursor_param);
1272 
1273  READ_DONE();
1274 }

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

Referenced by parseNodeString().

◆ _readCustomScan()

static CustomScan* _readCustomScan ( void  )
static

Definition at line 2092 of file readfuncs.c.

2093 {
2095  char *custom_name;
2096  const CustomScanMethods *methods;
2097 
2098  ReadCommonScan(&local_node->scan);
2099 
2100  READ_UINT_FIELD(flags);
2101  READ_NODE_FIELD(custom_plans);
2102  READ_NODE_FIELD(custom_exprs);
2103  READ_NODE_FIELD(custom_private);
2104  READ_NODE_FIELD(custom_scan_tlist);
2105  READ_BITMAPSET_FIELD(custom_relids);
2106 
2107  /* Lookup CustomScanMethods by CustomName */
2108  token = pg_strtok(&length); /* skip methods: */
2109  token = pg_strtok(&length); /* CustomName */
2110  custom_name = nullable_string(token, length);
2111  methods = GetCustomScanMethods(custom_name, false);
2112  local_node->methods = methods;
2113 
2114  READ_DONE();
2115 }
const CustomScanMethods * GetCustomScanMethods(const char *CustomName, bool missing_ok)
Definition: extensible.c:137

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

Referenced by parseNodeString().

◆ _readDeclareCursorStmt()

static DeclareCursorStmt* _readDeclareCursorStmt ( void  )
static

Definition at line 310 of file readfuncs.c.

311 {
313 
314  READ_STRING_FIELD(portalname);
316  READ_NODE_FIELD(query);
317 
318  READ_DONE();
319 }

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

Referenced by parseNodeString().

◆ _readDefElem()

static DefElem* _readDefElem ( void  )
static

Definition at line 1555 of file readfuncs.c.

1556 {
1558 
1559  READ_STRING_FIELD(defnamespace);
1560  READ_STRING_FIELD(defname);
1562  READ_ENUM_FIELD(defaction, DefElemAction);
1563  READ_LOCATION_FIELD(location);
1564 
1565  READ_DONE();
1566 }
DefElemAction
Definition: parsenodes.h:747

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

Referenced by parseNodeString().

◆ _readDistinctExpr()

static DistinctExpr* _readDistinctExpr ( void  )
static

Definition at line 786 of file readfuncs.c.

787 {
789 
790  READ_OID_FIELD(opno);
791  READ_OID_FIELD(opfuncid);
792  READ_OID_FIELD(opresulttype);
793  READ_BOOL_FIELD(opretset);
794  READ_OID_FIELD(opcollid);
795  READ_OID_FIELD(inputcollid);
797  READ_LOCATION_FIELD(location);
798 
799  READ_DONE();
800 }

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().

◆ _readExtensibleNode()

static ExtensibleNode* _readExtensibleNode ( void  )
static

Definition at line 2645 of file readfuncs.c.

2646 {
2647  const ExtensibleNodeMethods *methods;
2648  ExtensibleNode *local_node;
2649  const char *extnodename;
2650 
2651  READ_TEMP_LOCALS();
2652 
2653  token = pg_strtok(&length); /* skip :extnodename */
2654  token = pg_strtok(&length); /* get extnodename */
2655 
2656  extnodename = nullable_string(token, length);
2657  if (!extnodename)
2658  elog(ERROR, "extnodename has to be supplied");
2659  methods = GetExtensibleNodeMethods(extnodename, false);
2660 
2661  local_node = (ExtensibleNode *) newNode(methods->node_size,
2663  local_node->extnodename = extnodename;
2664 
2665  /* deserialize the private fields */
2666  methods->nodeRead(local_node);
2667 
2668  READ_DONE();
2669 }
const ExtensibleNodeMethods * GetExtensibleNodeMethods(const char *extnodename, bool missing_ok)
Definition: extensible.c:125
#define newNode(size, tag)
Definition: nodes.h:577
@ T_ExtensibleNode
Definition: nodes.h:309
void(* nodeRead)(struct ExtensibleNode *node)
Definition: extensible.h:70
const char * extnodename
Definition: extensible.h:35

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

Referenced by parseNodeString().

◆ _readFieldSelect()

static FieldSelect* _readFieldSelect ( void  )
static

Definition at line 894 of file readfuncs.c.

895 {
897 
899  READ_INT_FIELD(fieldnum);
900  READ_OID_FIELD(resulttype);
901  READ_INT_FIELD(resulttypmod);
902  READ_OID_FIELD(resultcollid);
903 
904  READ_DONE();
905 }

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

Referenced by parseNodeString().

◆ _readFieldStore()

static FieldStore* _readFieldStore ( void  )
static

Definition at line 911 of file readfuncs.c.

912 {
914 
916  READ_NODE_FIELD(newvals);
917  READ_NODE_FIELD(fieldnums);
918  READ_OID_FIELD(resulttype);
919 
920  READ_DONE();
921 }

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

Referenced by parseNodeString().

◆ _readForeignScan()

static ForeignScan* _readForeignScan ( void  )
static

Definition at line 2069 of file readfuncs.c.

2070 {
2072 
2073  ReadCommonScan(&local_node->scan);
2074 
2075  READ_ENUM_FIELD(operation, CmdType);
2076  READ_UINT_FIELD(resultRelation);
2077  READ_OID_FIELD(fs_server);
2078  READ_NODE_FIELD(fdw_exprs);
2079  READ_NODE_FIELD(fdw_private);
2080  READ_NODE_FIELD(fdw_scan_tlist);
2081  READ_NODE_FIELD(fdw_recheck_quals);
2082  READ_BITMAPSET_FIELD(fs_relids);
2083  READ_BOOL_FIELD(fsSystemCol);
2084 
2085  READ_DONE();
2086 }
CmdType
Definition: nodes.h:684

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

Referenced by parseNodeString().

◆ _readFromExpr()

static FromExpr* _readFromExpr ( void  )
static

Definition at line 1362 of file readfuncs.c.

1363 {
1365 
1366  READ_NODE_FIELD(fromlist);
1367  READ_NODE_FIELD(quals);
1368 
1369  READ_DONE();
1370 }

References READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readFuncExpr()

static FuncExpr* _readFuncExpr ( void  )
static

Definition at line 729 of file readfuncs.c.

730 {
732 
733  READ_OID_FIELD(funcid);
734  READ_OID_FIELD(funcresulttype);
735  READ_BOOL_FIELD(funcretset);
736  READ_BOOL_FIELD(funcvariadic);
737  READ_ENUM_FIELD(funcformat, CoercionForm);
738  READ_OID_FIELD(funccollid);
739  READ_OID_FIELD(inputcollid);
741  READ_LOCATION_FIELD(location);
742 
743  READ_DONE();
744 }

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().

◆ _readFunctionScan()

static FunctionScan* _readFunctionScan ( void  )
static

Definition at line 1977 of file readfuncs.c.

1978 {
1980 
1981  ReadCommonScan(&local_node->scan);
1982 
1984  READ_BOOL_FIELD(funcordinality);
1985 
1986  READ_DONE();
1987 }
static const struct fns functions
Definition: regcomp.c:313

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

Referenced by parseNodeString().

◆ _readGather()

static Gather* _readGather ( void  )
static

Definition at line 2381 of file readfuncs.c.

2382 {
2384 
2385  ReadCommonPlan(&local_node->plan);
2386 
2387  READ_INT_FIELD(num_workers);
2388  READ_INT_FIELD(rescan_param);
2389  READ_BOOL_FIELD(single_copy);
2390  READ_BOOL_FIELD(invisible);
2391  READ_BITMAPSET_FIELD(initParam);
2392 
2393  READ_DONE();
2394 }

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

Referenced by parseNodeString().

◆ _readGatherMerge()

static GatherMerge* _readGatherMerge ( void  )
static

Definition at line 2400 of file readfuncs.c.

2401 {
2403 
2404  ReadCommonPlan(&local_node->plan);
2405 
2406  READ_INT_FIELD(num_workers);
2407  READ_INT_FIELD(rescan_param);
2408  READ_INT_FIELD(numCols);
2409  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
2410  READ_OID_ARRAY(sortOperators, local_node->numCols);
2411  READ_OID_ARRAY(collations, local_node->numCols);
2412  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
2413  READ_BITMAPSET_FIELD(initParam);
2414 
2415  READ_DONE();
2416 }
#define READ_BOOL_ARRAY(fldname, len)
Definition: readfuncs.c:168

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

Referenced by parseNodeString().

◆ _readGroup()

static Group* _readGroup ( void  )
static

Definition at line 2289 of file readfuncs.c.

2290 {
2291  READ_LOCALS(Group);
2292 
2293  ReadCommonPlan(&local_node->plan);
2294 
2295  READ_INT_FIELD(numCols);
2296  READ_ATTRNUMBER_ARRAY(grpColIdx, local_node->numCols);
2297  READ_OID_ARRAY(grpOperators, local_node->numCols);
2298  READ_OID_ARRAY(grpCollations, local_node->numCols);
2299 
2300  READ_DONE();
2301 }

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

Referenced by parseNodeString().

◆ _readGroupingFunc()

static GroupingFunc* _readGroupingFunc ( void  )
static

Definition at line 669 of file readfuncs.c.

670 {
672 
674  READ_NODE_FIELD(refs);
675  READ_NODE_FIELD(cols);
676  READ_UINT_FIELD(agglevelsup);
677  READ_LOCATION_FIELD(location);
678 
679  READ_DONE();
680 }

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

Referenced by parseNodeString().

◆ _readGroupingSet()

static GroupingSet* _readGroupingSet ( void  )
static

Definition at line 359 of file readfuncs.c.

360 {
362 
364  READ_NODE_FIELD(content);
365  READ_LOCATION_FIELD(location);
366 
367  READ_DONE();
368 }
GroupingSetKind
Definition: parsenodes.h:1353

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

Referenced by parseNodeString().

◆ _readHash()

static Hash* _readHash ( void  )
static

Definition at line 2422 of file readfuncs.c.

2423 {
2424  READ_LOCALS(Hash);
2425 
2426  ReadCommonPlan(&local_node->plan);
2427 
2428  READ_NODE_FIELD(hashkeys);
2429  READ_OID_FIELD(skewTable);
2430  READ_INT_FIELD(skewColumn);
2431  READ_BOOL_FIELD(skewInherit);
2432  READ_FLOAT_FIELD(rows_total);
2433 
2434  READ_DONE();
2435 }
#define READ_FLOAT_FIELD(fldname)
Definition: readfuncs.c:109

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

Referenced by parseNodeString().

◆ _readHashJoin()

static HashJoin* _readHashJoin ( void  )
static

Definition at line 2190 of file readfuncs.c.

2191 {
2193 
2194  ReadCommonJoin(&local_node->join);
2195 
2196  READ_NODE_FIELD(hashclauses);
2197  READ_NODE_FIELD(hashoperators);
2198  READ_NODE_FIELD(hashcollations);
2199  READ_NODE_FIELD(hashkeys);
2200 
2201  READ_DONE();
2202 }
static void ReadCommonJoin(Join *local_node)
Definition: readfuncs.c:2122

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

Referenced by parseNodeString().

◆ _readIncrementalSort()

static IncrementalSort* _readIncrementalSort ( void  )
static

Definition at line 2274 of file readfuncs.c.

2275 {
2277 
2278  ReadCommonSort(&local_node->sort);
2279 
2280  READ_INT_FIELD(nPresortedCols);
2281 
2282  READ_DONE();
2283 }
static void ReadCommonSort(Sort *local_node)
Definition: readfuncs.c:2244

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

Referenced by parseNodeString().

◆ _readIndexOnlyScan()

static IndexOnlyScan* _readIndexOnlyScan ( void  )
static

Definition at line 1879 of file readfuncs.c.

1880 {
1882 
1883  ReadCommonScan(&local_node->scan);
1884 
1885  READ_OID_FIELD(indexid);
1886  READ_NODE_FIELD(indexqual);
1887  READ_NODE_FIELD(recheckqual);
1888  READ_NODE_FIELD(indexorderby);
1889  READ_NODE_FIELD(indextlist);
1890  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1891 
1892  READ_DONE();
1893 }
ScanDirection
Definition: sdir.h:23

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

Referenced by parseNodeString().

◆ _readIndexScan()

static IndexScan* _readIndexScan ( void  )
static

Definition at line 1858 of file readfuncs.c.

1859 {
1861 
1862  ReadCommonScan(&local_node->scan);
1863 
1864  READ_OID_FIELD(indexid);
1865  READ_NODE_FIELD(indexqual);
1866  READ_NODE_FIELD(indexqualorig);
1867  READ_NODE_FIELD(indexorderby);
1868  READ_NODE_FIELD(indexorderbyorig);
1869  READ_NODE_FIELD(indexorderbyops);
1870  READ_ENUM_FIELD(indexorderdir, ScanDirection);
1871 
1872  READ_DONE();
1873 }

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

Referenced by parseNodeString().

◆ _readInferenceElem()

static InferenceElem* _readInferenceElem ( void  )
static

Definition at line 1294 of file readfuncs.c.

1295 {
1297 
1298  READ_NODE_FIELD(expr);
1299  READ_OID_FIELD(infercollid);
1300  READ_OID_FIELD(inferopclass);
1301 
1302  READ_DONE();
1303 }

References READ_DONE, READ_LOCALS, READ_NODE_FIELD, and READ_OID_FIELD.

Referenced by parseNodeString().

◆ _readIntoClause()

static IntoClause* _readIntoClause ( void  )
static

Definition at line 554 of file readfuncs.c.

555 {
557 
558  READ_NODE_FIELD(rel);
559  READ_NODE_FIELD(colNames);
560  READ_STRING_FIELD(accessMethod);
562  READ_ENUM_FIELD(onCommit, OnCommitAction);
563  READ_STRING_FIELD(tableSpaceName);
564  READ_NODE_FIELD(viewQuery);
565  READ_BOOL_FIELD(skipData);
566 
567  READ_DONE();
568 }
OnCommitAction
Definition: primnodes.h:48

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

Referenced by parseNodeString().

◆ _readJoin()

static Join* _readJoin ( void  )
static

Definition at line 2137 of file readfuncs.c.

2138 {
2140 
2141  ReadCommonJoin(local_node);
2142 
2143  READ_DONE();
2144 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonJoin().

Referenced by parseNodeString().

◆ _readJoinExpr()

static JoinExpr* _readJoinExpr ( void  )
static

Definition at line 1341 of file readfuncs.c.

1342 {
1344 
1345  READ_ENUM_FIELD(jointype, JoinType);
1346  READ_BOOL_FIELD(isNatural);
1347  READ_NODE_FIELD(larg);
1348  READ_NODE_FIELD(rarg);
1349  READ_NODE_FIELD(usingClause);
1350  READ_NODE_FIELD(join_using_alias);
1351  READ_NODE_FIELD(quals);
1352  READ_NODE_FIELD(alias);
1353  READ_INT_FIELD(rtindex);
1354 
1355  READ_DONE();
1356 }
JoinType
Definition: nodes.h:708

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

Referenced by parseNodeString().

◆ _readLimit()

static Limit* _readLimit ( void  )
static

Definition at line 2480 of file readfuncs.c.

2481 {
2482  READ_LOCALS(Limit);
2483 
2484  ReadCommonPlan(&local_node->plan);
2485 
2486  READ_NODE_FIELD(limitOffset);
2487  READ_NODE_FIELD(limitCount);
2488  READ_ENUM_FIELD(limitOption, LimitOption);
2489  READ_INT_FIELD(uniqNumCols);
2490  READ_ATTRNUMBER_ARRAY(uniqColIdx, local_node->uniqNumCols);
2491  READ_OID_ARRAY(uniqOperators, local_node->uniqNumCols);
2492  READ_OID_ARRAY(uniqCollations, local_node->uniqNumCols);
2493 
2494  READ_DONE();
2495 }
LimitOption
Definition: nodes.h:847

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

Referenced by parseNodeString().

◆ _readLockRows()

static LockRows* _readLockRows ( void  )
static

Definition at line 2464 of file readfuncs.c.

2465 {
2467 
2468  ReadCommonPlan(&local_node->plan);
2469 
2470  READ_NODE_FIELD(rowMarks);
2471  READ_INT_FIELD(epqParam);
2472 
2473  READ_DONE();
2474 }

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

Referenced by parseNodeString().

◆ _readMaterial()

static Material* _readMaterial ( void  )
static

Definition at line 2208 of file readfuncs.c.

2209 {
2211 
2212  ReadCommonPlan(&local_node->plan);
2213 
2214  READ_DONE();
2215 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

◆ _readMemoize()

static Memoize* _readMemoize ( void  )
static

Definition at line 2221 of file readfuncs.c.

2222 {
2224 
2225  ReadCommonPlan(&local_node->plan);
2226 
2227  READ_INT_FIELD(numKeys);
2228  READ_OID_ARRAY(hashOperators, local_node->numKeys);
2229  READ_OID_ARRAY(collations, local_node->numKeys);
2230  READ_NODE_FIELD(param_exprs);
2231  READ_BOOL_FIELD(singlerow);
2232  READ_BOOL_FIELD(binary_mode);
2233  READ_UINT_FIELD(est_entries);
2234  READ_BITMAPSET_FIELD(keyparamids);
2235 
2236  READ_DONE();
2237 }

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

Referenced by parseNodeString().

◆ _readMergeAppend()

static MergeAppend* _readMergeAppend ( void  )
static

Definition at line 1730 of file readfuncs.c.

1731 {
1733 
1734  ReadCommonPlan(&local_node->plan);
1735 
1736  READ_BITMAPSET_FIELD(apprelids);
1737  READ_NODE_FIELD(mergeplans);
1738  READ_INT_FIELD(numCols);
1739  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
1740  READ_OID_ARRAY(sortOperators, local_node->numCols);
1741  READ_OID_ARRAY(collations, local_node->numCols);
1742  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
1743  READ_NODE_FIELD(part_prune_info);
1744 
1745  READ_DONE();
1746 }

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

Referenced by parseNodeString().

◆ _readMergeJoin()

static MergeJoin* _readMergeJoin ( void  )
static

Definition at line 2165 of file readfuncs.c.

2166 {
2167  int numCols;
2168 
2170 
2171  ReadCommonJoin(&local_node->join);
2172 
2173  READ_BOOL_FIELD(skip_mark_restore);
2174  READ_NODE_FIELD(mergeclauses);
2175 
2176  numCols = list_length(local_node->mergeclauses);
2177 
2178  READ_OID_ARRAY(mergeFamilies, numCols);
2179  READ_OID_ARRAY(mergeCollations, numCols);
2180  READ_INT_ARRAY(mergeStrategies, numCols);
2181  READ_BOOL_ARRAY(mergeNullsFirst, numCols);
2182 
2183  READ_DONE();
2184 }
static int list_length(const List *l)
Definition: pg_list.h:149
#define READ_INT_ARRAY(fldname, len)
Definition: readfuncs.c:163

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

Referenced by parseNodeString().

◆ _readMinMaxExpr()

static MinMaxExpr* _readMinMaxExpr ( void  )
static

Definition at line 1129 of file readfuncs.c.

1130 {
1132 
1133  READ_OID_FIELD(minmaxtype);
1134  READ_OID_FIELD(minmaxcollid);
1135  READ_OID_FIELD(inputcollid);
1138  READ_LOCATION_FIELD(location);
1139 
1140  READ_DONE();
1141 }
MinMaxOp
Definition: primnodes.h:1140

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().

◆ _readModifyTable()

static ModifyTable* _readModifyTable ( void  )
static

Definition at line 1677 of file readfuncs.c.

1678 {
1680 
1681  ReadCommonPlan(&local_node->plan);
1682 
1683  READ_ENUM_FIELD(operation, CmdType);
1684  READ_BOOL_FIELD(canSetTag);
1685  READ_UINT_FIELD(nominalRelation);
1686  READ_UINT_FIELD(rootRelation);
1687  READ_BOOL_FIELD(partColsUpdated);
1688  READ_NODE_FIELD(resultRelations);
1689  READ_NODE_FIELD(updateColnosLists);
1690  READ_NODE_FIELD(withCheckOptionLists);
1691  READ_NODE_FIELD(returningLists);
1692  READ_NODE_FIELD(fdwPrivLists);
1693  READ_BITMAPSET_FIELD(fdwDirectModifyPlans);
1694  READ_NODE_FIELD(rowMarks);
1695  READ_INT_FIELD(epqParam);
1696  READ_ENUM_FIELD(onConflictAction, OnConflictAction);
1697  READ_NODE_FIELD(arbiterIndexes);
1698  READ_NODE_FIELD(onConflictSet);
1699  READ_NODE_FIELD(onConflictCols);
1700  READ_NODE_FIELD(onConflictWhere);
1701  READ_UINT_FIELD(exclRelRTI);
1702  READ_NODE_FIELD(exclRelTlist);
1703 
1704  READ_DONE();
1705 }
OnConflictAction
Definition: nodes.h:834

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().

◆ _readNamedArgExpr()

static NamedArgExpr* _readNamedArgExpr ( void  )
static

Definition at line 750 of file readfuncs.c.

751 {
753 
756  READ_INT_FIELD(argnumber);
757  READ_LOCATION_FIELD(location);
758 
759  READ_DONE();
760 }
const char * name
Definition: encode.c:561

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

Referenced by parseNodeString().

◆ _readNamedTuplestoreScan()

static NamedTuplestoreScan* _readNamedTuplestoreScan ( void  )
static

Definition at line 2039 of file readfuncs.c.

2040 {
2042 
2043  ReadCommonScan(&local_node->scan);
2044 
2045  READ_STRING_FIELD(enrname);
2046 
2047  READ_DONE();
2048 }

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

Referenced by parseNodeString().

◆ _readNestLoop()

static NestLoop* _readNestLoop ( void  )
static

Definition at line 2150 of file readfuncs.c.

2151 {
2153 
2154  ReadCommonJoin(&local_node->join);
2155 
2156  READ_NODE_FIELD(nestParams);
2157 
2158  READ_DONE();
2159 }

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

Referenced by parseNodeString().

◆ _readNestLoopParam()

static NestLoopParam* _readNestLoopParam ( void  )
static

Definition at line 2501 of file readfuncs.c.

2502 {
2504 
2505  READ_INT_FIELD(paramno);
2506  READ_NODE_FIELD(paramval);
2507 
2508  READ_DONE();
2509 }

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readNextValueExpr()

static NextValueExpr* _readNextValueExpr ( void  )
static

Definition at line 1280 of file readfuncs.c.

1281 {
1283 
1284  READ_OID_FIELD(seqid);
1285  READ_OID_FIELD(typeId);
1286 
1287  READ_DONE();
1288 }

References READ_DONE, READ_LOCALS, and READ_OID_FIELD.

Referenced by parseNodeString().

◆ _readNotifyStmt()

static NotifyStmt* _readNotifyStmt ( void  )
static

Definition at line 296 of file readfuncs.c.

297 {
299 
300  READ_STRING_FIELD(conditionname);
301  READ_STRING_FIELD(payload);
302 
303  READ_DONE();
304 }

References READ_DONE, READ_LOCALS, and READ_STRING_FIELD.

Referenced by parseNodeString().

◆ _readNullIfExpr()

static NullIfExpr* _readNullIfExpr ( void  )
static

Definition at line 806 of file readfuncs.c.

807 {
809 
810  READ_OID_FIELD(opno);
811  READ_OID_FIELD(opfuncid);
812  READ_OID_FIELD(opresulttype);
813  READ_BOOL_FIELD(opretset);
814  READ_OID_FIELD(opcollid);
815  READ_OID_FIELD(inputcollid);
817  READ_LOCATION_FIELD(location);
818 
819  READ_DONE();
820 }

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().

◆ _readNullTest()

static NullTest* _readNullTest ( void  )
static

Definition at line 1184 of file readfuncs.c.

1185 {
1187 
1189  READ_ENUM_FIELD(nulltesttype, NullTestType);
1190  READ_BOOL_FIELD(argisrow);
1191  READ_LOCATION_FIELD(location);
1192 
1193  READ_DONE();
1194 }
NullTestType
Definition: primnodes.h:1258

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

Referenced by parseNodeString().

◆ _readOnConflictExpr()

static OnConflictExpr* _readOnConflictExpr ( void  )
static

Definition at line 1376 of file readfuncs.c.

1377 {
1379 
1381  READ_NODE_FIELD(arbiterElems);
1382  READ_NODE_FIELD(arbiterWhere);
1383  READ_OID_FIELD(constraint);
1384  READ_NODE_FIELD(onConflictSet);
1385  READ_NODE_FIELD(onConflictWhere);
1386  READ_INT_FIELD(exclRelIndex);
1387  READ_NODE_FIELD(exclRelTlist);
1388 
1389  READ_DONE();
1390 }

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

Referenced by parseNodeString().

◆ _readOpExpr()

static OpExpr* _readOpExpr ( void  )
static

Definition at line 766 of file readfuncs.c.

767 {
769 
770  READ_OID_FIELD(opno);
771  READ_OID_FIELD(opfuncid);
772  READ_OID_FIELD(opresulttype);
773  READ_BOOL_FIELD(opretset);
774  READ_OID_FIELD(opcollid);
775  READ_OID_FIELD(inputcollid);
777  READ_LOCATION_FIELD(location);
778 
779  READ_DONE();
780 }

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().

◆ _readParam()

static Param* _readParam ( void  )
static

Definition at line 620 of file readfuncs.c.

621 {
623 
624  READ_ENUM_FIELD(paramkind, ParamKind);
625  READ_INT_FIELD(paramid);
626  READ_OID_FIELD(paramtype);
627  READ_INT_FIELD(paramtypmod);
628  READ_OID_FIELD(paramcollid);
629  READ_LOCATION_FIELD(location);
630 
631  READ_DONE();
632 }
ParamKind
Definition: primnodes.h:257

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

Referenced by parseNodeString().

◆ _readPartitionBoundSpec()

static PartitionBoundSpec* _readPartitionBoundSpec ( void  )
static

Definition at line 2675 of file readfuncs.c.

2676 {
2678 
2679  READ_CHAR_FIELD(strategy);
2680  READ_BOOL_FIELD(is_default);
2681  READ_INT_FIELD(modulus);
2682  READ_INT_FIELD(remainder);
2683  READ_NODE_FIELD(listdatums);
2684  READ_NODE_FIELD(lowerdatums);
2685  READ_NODE_FIELD(upperdatums);
2686  READ_LOCATION_FIELD(location);
2687 
2688  READ_DONE();
2689 }

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

Referenced by parseNodeString().

◆ _readPartitionedRelPruneInfo()

static PartitionedRelPruneInfo* _readPartitionedRelPruneInfo ( void  )
static

Definition at line 2543 of file readfuncs.c.

2544 {
2546 
2547  READ_UINT_FIELD(rtindex);
2548  READ_BITMAPSET_FIELD(present_parts);
2549  READ_INT_FIELD(nparts);
2550  READ_INT_ARRAY(subplan_map, local_node->nparts);
2551  READ_INT_ARRAY(subpart_map, local_node->nparts);
2552  READ_OID_ARRAY(relid_map, local_node->nparts);
2553  READ_NODE_FIELD(initial_pruning_steps);
2554  READ_NODE_FIELD(exec_pruning_steps);
2555  READ_BITMAPSET_FIELD(execparamids);
2556 
2557  READ_DONE();
2558 }

References READ_BITMAPSET_FIELD, READ_DONE, READ_INT_ARRAY, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_ARRAY, and READ_UINT_FIELD.

Referenced by parseNodeString().

◆ _readPartitionPruneInfo()

static PartitionPruneInfo* _readPartitionPruneInfo ( void  )
static

Definition at line 2532 of file readfuncs.c.

2533 {
2535 
2536  READ_NODE_FIELD(prune_infos);
2537  READ_BITMAPSET_FIELD(other_subplans);
2538 
2539  READ_DONE();
2540 }

References READ_BITMAPSET_FIELD, READ_DONE, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readPartitionPruneStepCombine()

static PartitionPruneStepCombine* _readPartitionPruneStepCombine ( void  )
static

Definition at line 2575 of file readfuncs.c.

2576 {
2578 
2579  READ_INT_FIELD(step.step_id);
2581  READ_NODE_FIELD(source_stepids);
2582 
2583  READ_DONE();
2584 }
PartitionPruneCombineOp
Definition: plannodes.h:1282

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

Referenced by parseNodeString().

◆ _readPartitionPruneStepOp()

static PartitionPruneStepOp* _readPartitionPruneStepOp ( void  )
static

Definition at line 2561 of file readfuncs.c.

2562 {
2564 
2565  READ_INT_FIELD(step.step_id);
2566  READ_INT_FIELD(opstrategy);
2567  READ_NODE_FIELD(exprs);
2568  READ_NODE_FIELD(cmpfns);
2569  READ_BITMAPSET_FIELD(nullkeys);
2570 
2571  READ_DONE();
2572 }

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

Referenced by parseNodeString().

◆ _readPartitionRangeDatum()

static PartitionRangeDatum* _readPartitionRangeDatum ( void  )
static

Definition at line 2695 of file readfuncs.c.

2696 {
2698 
2701  READ_LOCATION_FIELD(location);
2702 
2703  READ_DONE();
2704 }
static struct @142 value
PartitionRangeDatumKind
Definition: parsenodes.h:863

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

Referenced by parseNodeString().

◆ _readPlan()

static Plan* _readPlan ( void  )
static

Definition at line 1636 of file readfuncs.c.

1637 {
1639 
1640  ReadCommonPlan(local_node);
1641 
1642  READ_DONE();
1643 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

◆ _readPlanInvalItem()

static PlanInvalItem* _readPlanInvalItem ( void  )
static

Definition at line 2590 of file readfuncs.c.

2591 {
2593 
2594  READ_INT_FIELD(cacheId);
2595  READ_UINT_FIELD(hashValue);
2596 
2597  READ_DONE();
2598 }

References READ_DONE, READ_INT_FIELD, READ_LOCALS, and READ_UINT_FIELD.

Referenced by parseNodeString().

◆ _readPlannedStmt()

static PlannedStmt* _readPlannedStmt ( void  )
static

Definition at line 1576 of file readfuncs.c.

1577 {
1579 
1580  READ_ENUM_FIELD(commandType, CmdType);
1581  READ_UINT64_FIELD(queryId);
1582  READ_BOOL_FIELD(hasReturning);
1583  READ_BOOL_FIELD(hasModifyingCTE);
1584  READ_BOOL_FIELD(canSetTag);
1585  READ_BOOL_FIELD(transientPlan);
1586  READ_BOOL_FIELD(dependsOnRole);
1587  READ_BOOL_FIELD(parallelModeNeeded);
1588  READ_INT_FIELD(jitFlags);
1589  READ_NODE_FIELD(planTree);
1590  READ_NODE_FIELD(rtable);
1591  READ_NODE_FIELD(resultRelations);
1592  READ_NODE_FIELD(appendRelations);
1593  READ_NODE_FIELD(subplans);
1594  READ_BITMAPSET_FIELD(rewindPlanIDs);
1595  READ_NODE_FIELD(rowMarks);
1596  READ_NODE_FIELD(relationOids);
1597  READ_NODE_FIELD(invalItems);
1598  READ_NODE_FIELD(paramExecTypes);
1599  READ_NODE_FIELD(utilityStmt);
1600  READ_LOCATION_FIELD(stmt_location);
1601  READ_INT_FIELD(stmt_len);
1602 
1603  READ_DONE();
1604 }

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_UINT64_FIELD.

Referenced by parseNodeString().

◆ _readPlanRowMark()

static PlanRowMark* _readPlanRowMark ( void  )
static

Definition at line 2515 of file readfuncs.c.

2516 {
2518 
2519  READ_UINT_FIELD(rti);
2520  READ_UINT_FIELD(prti);
2521  READ_UINT_FIELD(rowmarkId);
2522  READ_ENUM_FIELD(markType, RowMarkType);
2523  READ_INT_FIELD(allMarkTypes);
2525  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
2526  READ_BOOL_FIELD(isParent);
2527 
2528  READ_DONE();
2529 }
LockWaitPolicy
Definition: lockoptions.h:37
LockClauseStrength
Definition: lockoptions.h:22
RowMarkType
Definition: plannodes.h:1086

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

Referenced by parseNodeString().

◆ _readProjectSet()

static ProjectSet* _readProjectSet ( void  )
static

Definition at line 1664 of file readfuncs.c.

1665 {
1667 
1668  ReadCommonPlan(&local_node->plan);
1669 
1670  READ_DONE();
1671 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonPlan().

Referenced by parseNodeString().

◆ _readQuery()

static Query* _readQuery ( void  )
static

Definition at line 245 of file readfuncs.c.

246 {
248 
249  READ_ENUM_FIELD(commandType, CmdType);
250  READ_ENUM_FIELD(querySource, QuerySource);
251  local_node->queryId = UINT64CONST(0); /* not saved in output format */
252  READ_BOOL_FIELD(canSetTag);
253  READ_NODE_FIELD(utilityStmt);
254  READ_INT_FIELD(resultRelation);
255  READ_BOOL_FIELD(hasAggs);
256  READ_BOOL_FIELD(hasWindowFuncs);
257  READ_BOOL_FIELD(hasTargetSRFs);
258  READ_BOOL_FIELD(hasSubLinks);
259  READ_BOOL_FIELD(hasDistinctOn);
260  READ_BOOL_FIELD(hasRecursive);
261  READ_BOOL_FIELD(hasModifyingCTE);
262  READ_BOOL_FIELD(hasForUpdate);
263  READ_BOOL_FIELD(hasRowSecurity);
264  READ_BOOL_FIELD(isReturn);
265  READ_NODE_FIELD(cteList);
266  READ_NODE_FIELD(rtable);
267  READ_NODE_FIELD(jointree);
268  READ_NODE_FIELD(targetList);
269  READ_ENUM_FIELD(override, OverridingKind);
270  READ_NODE_FIELD(onConflict);
271  READ_NODE_FIELD(returningList);
272  READ_NODE_FIELD(groupClause);
273  READ_BOOL_FIELD(groupDistinct);
274  READ_NODE_FIELD(groupingSets);
275  READ_NODE_FIELD(havingQual);
276  READ_NODE_FIELD(windowClause);
277  READ_NODE_FIELD(distinctClause);
278  READ_NODE_FIELD(sortClause);
279  READ_NODE_FIELD(limitOffset);
280  READ_NODE_FIELD(limitCount);
281  READ_ENUM_FIELD(limitOption, LimitOption);
282  READ_NODE_FIELD(rowMarks);
283  READ_NODE_FIELD(setOperations);
284  READ_NODE_FIELD(constraintDeps);
285  READ_NODE_FIELD(withCheckOptions);
286  READ_LOCATION_FIELD(stmt_location);
287  READ_INT_FIELD(stmt_len);
288 
289  READ_DONE();
290 }
QuerySource
Definition: parsenodes.h:41
OverridingKind
Definition: parsenodes.h:33

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

Referenced by parseNodeString().

◆ _readRangeTblEntry()

static RangeTblEntry* _readRangeTblEntry ( void  )
static

Definition at line 1427 of file readfuncs.c.

1428 {
1430 
1431  /* put alias + eref first to make dump more legible */
1432  READ_NODE_FIELD(alias);
1433  READ_NODE_FIELD(eref);
1434  READ_ENUM_FIELD(rtekind, RTEKind);
1435 
1436  switch (local_node->rtekind)
1437  {
1438  case RTE_RELATION:
1439  READ_OID_FIELD(relid);
1440  READ_CHAR_FIELD(relkind);
1441  READ_INT_FIELD(rellockmode);
1442  READ_NODE_FIELD(tablesample);
1443  break;
1444  case RTE_SUBQUERY:
1445  READ_NODE_FIELD(subquery);
1446  READ_BOOL_FIELD(security_barrier);
1447  break;
1448  case RTE_JOIN:
1449  READ_ENUM_FIELD(jointype, JoinType);
1450  READ_INT_FIELD(joinmergedcols);
1451  READ_NODE_FIELD(joinaliasvars);
1452  READ_NODE_FIELD(joinleftcols);
1453  READ_NODE_FIELD(joinrightcols);
1454  READ_NODE_FIELD(join_using_alias);
1455  break;
1456  case RTE_FUNCTION:
1458  READ_BOOL_FIELD(funcordinality);
1459  break;
1460  case RTE_TABLEFUNC:
1461  READ_NODE_FIELD(tablefunc);
1462  /* The RTE must have a copy of the column type info, if any */
1463  if (local_node->tablefunc)
1464  {
1465  TableFunc *tf = local_node->tablefunc;
1466 
1467  local_node->coltypes = tf->coltypes;
1468  local_node->coltypmods = tf->coltypmods;
1469  local_node->colcollations = tf->colcollations;
1470  }
1471  break;
1472  case RTE_VALUES:
1473  READ_NODE_FIELD(values_lists);
1474  READ_NODE_FIELD(coltypes);
1475  READ_NODE_FIELD(coltypmods);
1476  READ_NODE_FIELD(colcollations);
1477  break;
1478  case RTE_CTE:
1479  READ_STRING_FIELD(ctename);
1480  READ_UINT_FIELD(ctelevelsup);
1481  READ_BOOL_FIELD(self_reference);
1482  READ_NODE_FIELD(coltypes);
1483  READ_NODE_FIELD(coltypmods);
1484  READ_NODE_FIELD(colcollations);
1485  break;
1486  case RTE_NAMEDTUPLESTORE:
1487  READ_STRING_FIELD(enrname);
1488  READ_FLOAT_FIELD(enrtuples);
1489  READ_OID_FIELD(relid);
1490  READ_NODE_FIELD(coltypes);
1491  READ_NODE_FIELD(coltypmods);
1492  READ_NODE_FIELD(colcollations);
1493  break;
1494  case RTE_RESULT:
1495  /* no extra fields */
1496  break;
1497  default:
1498  elog(ERROR, "unrecognized RTE kind: %d",
1499  (int) local_node->rtekind);
1500  break;
1501  }
1502 
1503  READ_BOOL_FIELD(lateral);
1504  READ_BOOL_FIELD(inh);
1505  READ_BOOL_FIELD(inFromCl);
1506  READ_UINT_FIELD(requiredPerms);
1507  READ_OID_FIELD(checkAsUser);
1508  READ_BITMAPSET_FIELD(selectedCols);
1509  READ_BITMAPSET_FIELD(insertedCols);
1510  READ_BITMAPSET_FIELD(updatedCols);
1511  READ_BITMAPSET_FIELD(extraUpdatedCols);
1512  READ_NODE_FIELD(securityQuals);
1513 
1514  READ_DONE();
1515 }
RTEKind
Definition: parsenodes.h:989
@ RTE_JOIN
Definition: parsenodes.h:992
@ RTE_CTE
Definition: parsenodes.h:996
@ RTE_NAMEDTUPLESTORE
Definition: parsenodes.h:997
@ RTE_VALUES
Definition: parsenodes.h:995
@ RTE_SUBQUERY
Definition: parsenodes.h:991
@ RTE_RESULT
Definition: parsenodes.h:998
@ RTE_FUNCTION
Definition: parsenodes.h:993
@ RTE_TABLEFUNC
Definition: parsenodes.h:994
@ RTE_RELATION
Definition: parsenodes.h:990
List * coltypmods
Definition: primnodes.h:91
List * coltypes
Definition: primnodes.h:90
List * colcollations
Definition: primnodes.h:92

References TableFunc::colcollations, TableFunc::coltypes, TableFunc::coltypmods, elog, ERROR, functions, READ_BITMAPSET_FIELD, READ_BOOL_FIELD, READ_CHAR_FIELD, READ_DONE, READ_ENUM_FIELD, READ_FLOAT_FIELD, READ_INT_FIELD, READ_LOCALS, READ_NODE_FIELD, READ_OID_FIELD, READ_STRING_FIELD, READ_UINT_FIELD, RTE_CTE, RTE_FUNCTION, RTE_JOIN, RTE_NAMEDTUPLESTORE, RTE_RELATION, RTE_RESULT, RTE_SUBQUERY, RTE_TABLEFUNC, and RTE_VALUES.

Referenced by parseNodeString().

◆ _readRangeTblFunction()

static RangeTblFunction* _readRangeTblFunction ( void  )
static

Definition at line 1521 of file readfuncs.c.

1522 {
1524 
1525  READ_NODE_FIELD(funcexpr);
1526  READ_INT_FIELD(funccolcount);
1527  READ_NODE_FIELD(funccolnames);
1528  READ_NODE_FIELD(funccoltypes);
1529  READ_NODE_FIELD(funccoltypmods);
1530  READ_NODE_FIELD(funccolcollations);
1531  READ_BITMAPSET_FIELD(funcparams);
1532 
1533  READ_DONE();
1534 }

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

Referenced by parseNodeString().

◆ _readRangeTblRef()

static RangeTblRef* _readRangeTblRef ( void  )
static

Definition at line 1328 of file readfuncs.c.

1329 {
1331 
1332  READ_INT_FIELD(rtindex);
1333 
1334  READ_DONE();
1335 }

References READ_DONE, READ_INT_FIELD, and READ_LOCALS.

Referenced by parseNodeString().

◆ _readRangeVar()

static RangeVar* _readRangeVar ( void  )
static

Definition at line 512 of file readfuncs.c.

513 {
515 
516  local_node->catalogname = NULL; /* not currently saved in output format */
517 
518  READ_STRING_FIELD(schemaname);
520  READ_BOOL_FIELD(inh);
521  READ_CHAR_FIELD(relpersistence);
522  READ_NODE_FIELD(alias);
523  READ_LOCATION_FIELD(location);
524 
525  READ_DONE();
526 }
NameData relname
Definition: pg_class.h:38

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

Referenced by parseNodeString().

◆ _readRecursiveUnion()

static RecursiveUnion* _readRecursiveUnion ( void  )
static

Definition at line 1752 of file readfuncs.c.

1753 {
1755 
1756  ReadCommonPlan(&local_node->plan);
1757 
1758  READ_INT_FIELD(wtParam);
1759  READ_INT_FIELD(numCols);
1760  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
1761  READ_OID_ARRAY(dupOperators, local_node->numCols);
1762  READ_OID_ARRAY(dupCollations, local_node->numCols);
1763  READ_LONG_FIELD(numGroups);
1764 
1765  READ_DONE();
1766 }

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

Referenced by parseNodeString().

◆ _readRelabelType()

static RelabelType* _readRelabelType ( void  )
static

Definition at line 927 of file readfuncs.c.

928 {
930 
932  READ_OID_FIELD(resulttype);
933  READ_INT_FIELD(resulttypmod);
934  READ_OID_FIELD(resultcollid);
935  READ_ENUM_FIELD(relabelformat, CoercionForm);
936  READ_LOCATION_FIELD(location);
937 
938  READ_DONE();
939 }

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().

◆ _readResult()

static Result* _readResult ( void  )
static

Definition at line 1649 of file readfuncs.c.

1650 {
1652 
1653  ReadCommonPlan(&local_node->plan);
1654 
1655  READ_NODE_FIELD(resconstantqual);
1656 
1657  READ_DONE();
1658 }

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

Referenced by parseNodeString().

◆ _readRowCompareExpr()

static RowCompareExpr* _readRowCompareExpr ( void  )
static

Definition at line 1095 of file readfuncs.c.

1096 {
1098 
1100  READ_NODE_FIELD(opnos);
1101  READ_NODE_FIELD(opfamilies);
1102  READ_NODE_FIELD(inputcollids);
1103  READ_NODE_FIELD(largs);
1104  READ_NODE_FIELD(rargs);
1105 
1106  READ_DONE();
1107 }
RowCompareType
Definition: primnodes.h:1103

References READ_DONE, READ_ENUM_FIELD, READ_LOCALS, and READ_NODE_FIELD.

Referenced by parseNodeString().

◆ _readRowExpr()

static RowExpr* _readRowExpr ( void  )
static

Definition at line 1078 of file readfuncs.c.

1079 {
1081 
1083  READ_OID_FIELD(row_typeid);
1084  READ_ENUM_FIELD(row_format, CoercionForm);
1085  READ_NODE_FIELD(colnames);
1086  READ_LOCATION_FIELD(location);
1087 
1088  READ_DONE();
1089 }

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().

◆ _readRowMarkClause()

static RowMarkClause* _readRowMarkClause ( void  )
static

Definition at line 400 of file readfuncs.c.

401 {
403 
404  READ_UINT_FIELD(rti);
406  READ_ENUM_FIELD(waitPolicy, LockWaitPolicy);
407  READ_BOOL_FIELD(pushedDown);
408 
409  READ_DONE();
410 }

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

Referenced by parseNodeString().

◆ _readSampleScan()

static SampleScan* _readSampleScan ( void  )
static

Definition at line 1843 of file readfuncs.c.

1844 {
1846 
1847  ReadCommonScan(&local_node->scan);
1848 
1849  READ_NODE_FIELD(tablesample);
1850 
1851  READ_DONE();
1852 }

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

Referenced by parseNodeString().

◆ _readScalarArrayOpExpr()

static ScalarArrayOpExpr* _readScalarArrayOpExpr ( void  )
static

Definition at line 826 of file readfuncs.c.

827 {
829 
830  READ_OID_FIELD(opno);
831  READ_OID_FIELD(opfuncid);
832  READ_OID_FIELD(hashfuncid);
833  READ_OID_FIELD(negfuncid);
834  READ_BOOL_FIELD(useOr);
835  READ_OID_FIELD(inputcollid);
837  READ_LOCATION_FIELD(location);
838 
839  READ_DONE();
840 }

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().

◆ _readScan()

static Scan* _readScan ( void  )
static

Definition at line 1817 of file readfuncs.c.

1818 {
1820 
1821  ReadCommonScan(local_node);
1822 
1823  READ_DONE();
1824 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

◆ _readSeqScan()

static SeqScan* _readSeqScan ( void  )
static

Definition at line 1830 of file readfuncs.c.

1831 {
1833 
1834  ReadCommonScan(&local_node->scan);
1835 
1836  READ_DONE();
1837 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonScan().

Referenced by parseNodeString().

◆ _readSetOp()

static SetOp* _readSetOp ( void  )
static

Definition at line 2441 of file readfuncs.c.

2442 {
2443  READ_LOCALS(SetOp);
2444 
2445  ReadCommonPlan(&local_node->plan);
2446 
2447  READ_ENUM_FIELD(cmd, SetOpCmd);
2448  READ_ENUM_FIELD(strategy, SetOpStrategy);
2449  READ_INT_FIELD(numCols);
2450  READ_ATTRNUMBER_ARRAY(dupColIdx, local_node->numCols);
2451  READ_OID_ARRAY(dupOperators, local_node->numCols);
2452  READ_OID_ARRAY(dupCollations, local_node->numCols);
2453  READ_INT_FIELD(flagColIdx);
2454  READ_INT_FIELD(firstFlag);
2455  READ_LONG_FIELD(numGroups);
2456 
2457  READ_DONE();
2458 }
SetOpCmd
Definition: nodes.h:814
SetOpStrategy
Definition: nodes.h:822

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().

◆ _readSetOperationStmt()

static SetOperationStmt* _readSetOperationStmt ( void  )
static

Definition at line 479 of file readfuncs.c.

480 {
482 
484  READ_BOOL_FIELD(all);
485  READ_NODE_FIELD(larg);
486  READ_NODE_FIELD(rarg);
487  READ_NODE_FIELD(colTypes);
488  READ_NODE_FIELD(colTypmods);
489  READ_NODE_FIELD(colCollations);
490  READ_NODE_FIELD(groupClauses);
491 
492  READ_DONE();
493 }
SetOperation
Definition: parsenodes.h:1644

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

Referenced by parseNodeString().

◆ _readSetToDefault()

static SetToDefault* _readSetToDefault ( void  )
static

Definition at line 1249 of file readfuncs.c.

1250 {
1252 
1253  READ_OID_FIELD(typeId);
1254  READ_INT_FIELD(typeMod);
1255  READ_OID_FIELD(collation);
1256  READ_LOCATION_FIELD(location);
1257 
1258  READ_DONE();
1259 }

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

Referenced by parseNodeString().

◆ _readSort()

static Sort* _readSort ( void  )
static

Definition at line 2261 of file readfuncs.c.

2262 {
2264 
2265  ReadCommonSort(local_node);
2266 
2267  READ_DONE();
2268 }

References READ_DONE, READ_LOCALS_NO_FIELDS, and ReadCommonSort().

Referenced by parseNodeString().

◆ _readSortGroupClause()

static SortGroupClause* _readSortGroupClause ( void  )
static

Definition at line 342 of file readfuncs.c.

343 {
345 
346  READ_UINT_FIELD(tleSortGroupRef);
347  READ_OID_FIELD(eqop);
348  READ_OID_FIELD(sortop);
349  READ_BOOL_FIELD(nulls_first);
350  READ_BOOL_FIELD(hashable);
351 
352  READ_DONE();
353 }

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

Referenced by parseNodeString().

◆ _readSQLValueFunction()

static SQLValueFunction* _readSQLValueFunction ( void  )
static

◆ _readSubLink()

static SubLink* _readSubLink ( void  )
static

Definition at line 872 of file readfuncs.c.

873 {
875 
876  READ_ENUM_FIELD(subLinkType, SubLinkType);
877  READ_INT_FIELD(subLinkId);
878  READ_NODE_FIELD(testexpr);
879  READ_NODE_FIELD(operName);
880  READ_NODE_FIELD(subselect);
881  READ_LOCATION_FIELD(location);
882 
883  READ_DONE();
884 }
SubLinkType
Definition: primnodes.h:682

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

Referenced by parseNodeString().

◆ _readSubPlan()

static SubPlan* _readSubPlan ( void  )
static

Definition at line 2604 of file readfuncs.c.

2605 {
2607 
2608  READ_ENUM_FIELD(subLinkType, SubLinkType);
2609  READ_NODE_FIELD(testexpr);
2610  READ_NODE_FIELD(paramIds);
2611  READ_INT_FIELD(plan_id);
2612  READ_STRING_FIELD(plan_name);
2613  READ_OID_FIELD(firstColType);
2614  READ_INT_FIELD(firstColTypmod);
2615  READ_OID_FIELD(firstColCollation);
2616  READ_BOOL_FIELD(useHashTable);
2617  READ_BOOL_FIELD(unknownEqFalse);
2618  READ_BOOL_FIELD(parallel_safe);
2619  READ_NODE_FIELD(setParam);
2620  READ_NODE_FIELD(parParam);
2622  READ_FLOAT_FIELD(startup_cost);
2623  READ_FLOAT_FIELD(per_call_cost);
2624 
2625  READ_DONE();
2626 }

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().

◆ _readSubqueryScan()

static SubqueryScan* _readSubqueryScan ( void  )
static

Definition at line 1962 of file readfuncs.c.

1963 {
1965 
1966  ReadCommonScan(&local_node->scan);
1967 
1968  READ_NODE_FIELD(subplan);
1969 
1970  READ_DONE();
1971 }

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

Referenced by parseNodeString().

◆ _readSubscriptingRef()

static SubscriptingRef* _readSubscriptingRef ( void  )
static

Definition at line 708 of file readfuncs.c.

709 {
711 
712  READ_OID_FIELD(refcontainertype);
713  READ_OID_FIELD(refelemtype);
714  READ_OID_FIELD(refrestype);
715  READ_INT_FIELD(reftypmod);
716  READ_OID_FIELD(refcollid);
717  READ_NODE_FIELD(refupperindexpr);
718  READ_NODE_FIELD(reflowerindexpr);
719  READ_NODE_FIELD(refexpr);
720  READ_NODE_FIELD(refassgnexpr);
721 
722  READ_DONE();
723 }

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

Referenced by parseNodeString().

◆ _readTableFunc()

static TableFunc* _readTableFunc ( void  )
static

Definition at line 532 of file readfuncs.c.

533 {
535 
536  READ_NODE_FIELD(ns_uris);
537  READ_NODE_FIELD(ns_names);
538  READ_NODE_FIELD(docexpr);
539  READ_NODE_FIELD(rowexpr);
540  READ_NODE_FIELD(colnames);
541  READ_NODE_FIELD(coltypes);
542  READ_NODE_FIELD(coltypmods);
543  READ_NODE_FIELD(colcollations);
544  READ_NODE_FIELD(colexprs);
545  READ_NODE_FIELD(coldefexprs);
546  READ_BITMAPSET_FIELD(notnulls);
547  READ_INT_FIELD(ordinalitycol);
548  READ_LOCATION_FIELD(location);
549 
550  READ_DONE();
551 }

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

Referenced by parseNodeString().

◆ _readTableFuncScan()

static TableFuncScan* _readTableFuncScan ( void  )
static

Definition at line 2008 of file readfuncs.c.

2009 {
2011 
2012  ReadCommonScan(&local_node->scan);
2013 
2014  READ_NODE_FIELD(tablefunc);
2015 
2016  READ_DONE();
2017 }

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

Referenced by parseNodeString().

◆ _readTableSampleClause()

static TableSampleClause* _readTableSampleClause ( void  )
static

Definition at line 1540 of file readfuncs.c.

1541 {
1543 
1544  READ_OID_FIELD(tsmhandler);
1546  READ_NODE_FIELD(repeatable);
1547 
1548  READ_DONE();
1549 }

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

Referenced by parseNodeString().

◆ _readTargetEntry()

static TargetEntry* _readTargetEntry ( void  )
static

Definition at line 1309 of file readfuncs.c.

1310 {
1312 
1313  READ_NODE_FIELD(expr);
1314  READ_INT_FIELD(resno);
1315  READ_STRING_FIELD(resname);
1316  READ_UINT_FIELD(ressortgroupref);
1317  READ_OID_FIELD(resorigtbl);
1318  READ_INT_FIELD(resorigcol);
1319  READ_BOOL_FIELD(resjunk);
1320 
1321  READ_DONE();
1322 }

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().

◆ _readTidRangeScan()

static TidRangeScan* _readTidRangeScan ( void  )
static

Definition at line 1947 of file readfuncs.c.

1948 {
1950 
1951  ReadCommonScan(&local_node->scan);
1952 
1953  READ_NODE_FIELD(tidrangequals);
1954 
1955  READ_DONE();
1956 }

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

Referenced by parseNodeString().

◆ _readTidScan()

static TidScan* _readTidScan ( void  )
static

Definition at line 1932 of file readfuncs.c.

1933 {
1935 
1936  ReadCommonScan(&local_node->scan);
1937 
1938  READ_NODE_FIELD(tidquals);
1939 
1940  READ_DONE();
1941 }

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

Referenced by parseNodeString().

◆ _readUnique()

static Unique* _readUnique ( void  )
static

Definition at line 2363 of file readfuncs.c.

2364 {
2366 
2367  ReadCommonPlan(&local_node->plan);
2368 
2369  READ_INT_FIELD(numCols);
2370  READ_ATTRNUMBER_ARRAY(uniqColIdx, local_node->numCols);
2371  READ_OID_ARRAY(uniqOperators, local_node->numCols);
2372  READ_OID_ARRAY(uniqCollations, local_node->numCols);
2373 
2374  READ_DONE();
2375 }

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

Referenced by parseNodeString().

◆ _readValuesScan()

static ValuesScan* _readValuesScan ( void  )
static

Definition at line 1993 of file readfuncs.c.

1994 {
1996 
1997  ReadCommonScan(&local_node->scan);
1998 
1999  READ_NODE_FIELD(values_lists);
2000 
2001  READ_DONE();
2002 }

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

Referenced by parseNodeString().

◆ _readVar()

static Var* _readVar ( void  )
static

Definition at line 574 of file readfuncs.c.

575 {
576  READ_LOCALS(Var);
577 
578  READ_INT_FIELD(varno);
579  READ_INT_FIELD(varattno);
580  READ_OID_FIELD(vartype);
581  READ_INT_FIELD(vartypmod);
582  READ_OID_FIELD(varcollid);
583  READ_UINT_FIELD(varlevelsup);
584  READ_UINT_FIELD(varnosyn);
585  READ_INT_FIELD(varattnosyn);
586  READ_LOCATION_FIELD(location);
587 
588  READ_DONE();
589 }
Definition: primnodes.h:187

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

Referenced by parseNodeString().

◆ _readWindowAgg()

static WindowAgg* _readWindowAgg ( void  )
static

Definition at line 2332 of file readfuncs.c.

2333 {
2335 
2336  ReadCommonPlan(&local_node->plan);
2337 
2338  READ_UINT_FIELD(winref);
2339  READ_INT_FIELD(partNumCols);
2340  READ_ATTRNUMBER_ARRAY(partColIdx, local_node->partNumCols);
2341  READ_OID_ARRAY(partOperators, local_node->partNumCols);
2342  READ_OID_ARRAY(partCollations, local_node->partNumCols);
2343  READ_INT_FIELD(ordNumCols);
2344  READ_ATTRNUMBER_ARRAY(ordColIdx, local_node->ordNumCols);
2345  READ_OID_ARRAY(ordOperators, local_node->ordNumCols);
2346  READ_OID_ARRAY(ordCollations, local_node->ordNumCols);
2347  READ_INT_FIELD(frameOptions);
2348  READ_NODE_FIELD(startOffset);
2349  READ_NODE_FIELD(endOffset);
2350  READ_OID_FIELD(startInRangeFunc);
2351  READ_OID_FIELD(endInRangeFunc);
2352  READ_OID_FIELD(inRangeColl);
2353  READ_BOOL_FIELD(inRangeAsc);
2354  READ_BOOL_FIELD(inRangeNullsFirst);
2355 
2356  READ_DONE();
2357 }

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

Referenced by parseNodeString().

◆ _readWindowClause()

static WindowClause* _readWindowClause ( void  )
static

Definition at line 374 of file readfuncs.c.

375 {
377 
379  READ_STRING_FIELD(refname);
380  READ_NODE_FIELD(partitionClause);
381  READ_NODE_FIELD(orderClause);
382  READ_INT_FIELD(frameOptions);
383  READ_NODE_FIELD(startOffset);
384  READ_NODE_FIELD(endOffset);
385  READ_OID_FIELD(startInRangeFunc);
386  READ_OID_FIELD(endInRangeFunc);
387  READ_OID_FIELD(inRangeColl);
388  READ_BOOL_FIELD(inRangeAsc);
389  READ_BOOL_FIELD(inRangeNullsFirst);
390  READ_UINT_FIELD(winref);
391  READ_BOOL_FIELD(copiedOrder);
392 
393  READ_DONE();
394 }

References name, 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().

◆ _readWindowFunc()

static WindowFunc* _readWindowFunc ( void  )
static

Definition at line 686 of file readfuncs.c.

687 {
689 
690  READ_OID_FIELD(winfnoid);
691  READ_OID_FIELD(wintype);
692  READ_OID_FIELD(wincollid);
693  READ_OID_FIELD(inputcollid);
695  READ_NODE_FIELD(aggfilter);
696  READ_UINT_FIELD(winref);
697  READ_BOOL_FIELD(winstar);
698  READ_BOOL_FIELD(winagg);
699  READ_LOCATION_FIELD(location);
700 
701  READ_DONE();
702 }

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().

◆ _readWithCheckOption()

static WithCheckOption* _readWithCheckOption ( void  )
static

Definition at line 325 of file readfuncs.c.

326 {
328 
329  READ_ENUM_FIELD(kind, WCOKind);
331  READ_STRING_FIELD(polname);
332  READ_NODE_FIELD(qual);
333  READ_BOOL_FIELD(cascaded);
334 
335  READ_DONE();
336 }
WCOKind
Definition: parsenodes.h:1217

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

Referenced by parseNodeString().

◆ _readWorkTableScan()

static WorkTableScan* _readWorkTableScan ( void  )
static

Definition at line 2054 of file readfuncs.c.

2055 {
2057 
2058  ReadCommonScan(&local_node->scan);
2059 
2060  READ_INT_FIELD(wtParam);
2061 
2062  READ_DONE();
2063 }

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

Referenced by parseNodeString().

◆ _readXmlExpr()

static XmlExpr* _readXmlExpr ( void  )
static

Definition at line 1163 of file readfuncs.c.

1164 {
1166 
1169  READ_NODE_FIELD(named_args);
1170  READ_NODE_FIELD(arg_names);
1174  READ_INT_FIELD(typmod);
1175  READ_LOCATION_FIELD(location);
1176 
1177  READ_DONE();
1178 }
XmlOptionType
Definition: primnodes.h:1219
XmlExprOp
Definition: primnodes.h:1207
int xmloption
Definition: xml.c:98

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

Referenced by parseNodeString().

◆ parseNodeString()

Node* parseNodeString ( void  )

Definition at line 2715 of file readfuncs.c.

2716 {
2717  void *return_value;
2718 
2719  READ_TEMP_LOCALS();
2720 
2721  /* Guard against stack overflow due to overly complex expressions */
2723 
2724  token = pg_strtok(&length);
2725 
2726 #define MATCH(tokname, namelen) \
2727  (length == namelen && memcmp(token, tokname, namelen) == 0)
2728 
2729  if (MATCH("QUERY", 5))
2730  return_value = _readQuery();
2731  else if (MATCH("WITHCHECKOPTION", 15))
2732  return_value = _readWithCheckOption();
2733  else if (MATCH("SORTGROUPCLAUSE", 15))
2734  return_value = _readSortGroupClause();
2735  else if (MATCH("GROUPINGSET", 11))
2736  return_value = _readGroupingSet();
2737  else if (MATCH("WINDOWCLAUSE", 12))
2738  return_value = _readWindowClause();
2739  else if (MATCH("ROWMARKCLAUSE", 13))
2740  return_value = _readRowMarkClause();
2741  else if (MATCH("CTESEARCHCLAUSE", 15))
2742  return_value = _readCTESearchClause();
2743  else if (MATCH("CTECYCLECLAUSE", 14))
2744  return_value = _readCTECycleClause();
2745  else if (MATCH("COMMONTABLEEXPR", 15))
2746  return_value = _readCommonTableExpr();
2747  else if (MATCH("SETOPERATIONSTMT", 16))
2748  return_value = _readSetOperationStmt();
2749  else if (MATCH("ALIAS", 5))
2750  return_value = _readAlias();
2751  else if (MATCH("RANGEVAR", 8))
2752  return_value = _readRangeVar();
2753  else if (MATCH("INTOCLAUSE", 10))
2754  return_value = _readIntoClause();
2755  else if (MATCH("TABLEFUNC", 9))
2756  return_value = _readTableFunc();
2757  else if (MATCH("VAR", 3))
2758  return_value = _readVar();
2759  else if (MATCH("CONST", 5))
2760  return_value = _readConst();
2761  else if (MATCH("PARAM", 5))
2762  return_value = _readParam();
2763  else if (MATCH("AGGREF", 6))
2764  return_value = _readAggref();
2765  else if (MATCH("GROUPINGFUNC", 12))
2766  return_value = _readGroupingFunc();
2767  else if (MATCH("WINDOWFUNC", 10))
2768  return_value = _readWindowFunc();
2769  else if (MATCH("SUBSCRIPTINGREF", 15))
2770  return_value = _readSubscriptingRef();
2771  else if (MATCH("FUNCEXPR", 8))
2772  return_value = _readFuncExpr();
2773  else if (MATCH("NAMEDARGEXPR", 12))
2774  return_value = _readNamedArgExpr();
2775  else if (MATCH("OPEXPR", 6))
2776  return_value = _readOpExpr();
2777  else if (MATCH("DISTINCTEXPR", 12))
2778  return_value = _readDistinctExpr();
2779  else if (MATCH("NULLIFEXPR", 10))
2780  return_value = _readNullIfExpr();
2781  else if (MATCH("SCALARARRAYOPEXPR", 17))
2782  return_value = _readScalarArrayOpExpr();
2783  else if (MATCH("BOOLEXPR", 8))
2784  return_value = _readBoolExpr();
2785  else if (MATCH("SUBLINK", 7))
2786  return_value = _readSubLink();
2787  else if (MATCH("FIELDSELECT", 11))
2788  return_value = _readFieldSelect();
2789  else if (MATCH("FIELDSTORE", 10))
2790  return_value = _readFieldStore();
2791  else if (MATCH("RELABELTYPE", 11))
2792  return_value = _readRelabelType();
2793  else if (MATCH("COERCEVIAIO", 11))
2794  return_value = _readCoerceViaIO();
2795  else if (MATCH("ARRAYCOERCEEXPR", 15))
2796  return_value = _readArrayCoerceExpr();
2797  else if (MATCH("CONVERTROWTYPEEXPR", 18))
2798  return_value = _readConvertRowtypeExpr();
2799  else if (MATCH("COLLATEEXPR", 11))
2800  return_value = _readCollateExpr();
2801  else if (MATCH("CASEEXPR", 8))
2802  return_value = _readCaseExpr();
2803  else if (MATCH("CASEWHEN", 8))
2804  return_value = _readCaseWhen();
2805  else if (MATCH("CASETESTEXPR", 12))
2806  return_value = _readCaseTestExpr();
2807  else if (MATCH("ARRAYEXPR", 9))
2808  return_value = _readArrayExpr();
2809  else if (MATCH("ROWEXPR", 7))
2810  return_value = _readRowExpr();
2811  else if (MATCH("ROWCOMPAREEXPR", 14))
2812  return_value = _readRowCompareExpr();
2813  else if (MATCH("COALESCEEXPR", 12))
2814  return_value = _readCoalesceExpr();
2815  else if (MATCH("MINMAXEXPR", 10))
2816  return_value = _readMinMaxExpr();
2817  else if (MATCH("SQLVALUEFUNCTION", 16))
2818  return_value = _readSQLValueFunction();
2819  else if (MATCH("XMLEXPR", 7))
2820  return_value = _readXmlExpr();
2821  else if (MATCH("NULLTEST", 8))
2822  return_value = _readNullTest();
2823  else if (MATCH("BOOLEANTEST", 11))
2824  return_value = _readBooleanTest();
2825  else if (MATCH("COERCETODOMAIN", 14))
2826  return_value = _readCoerceToDomain();
2827  else if (MATCH("COERCETODOMAINVALUE", 19))
2828  return_value = _readCoerceToDomainValue();
2829  else if (MATCH("SETTODEFAULT", 12))
2830  return_value = _readSetToDefault();
2831  else if (MATCH("CURRENTOFEXPR", 13))
2832  return_value = _readCurrentOfExpr();
2833  else if (MATCH("NEXTVALUEEXPR", 13))
2834  return_value = _readNextValueExpr();
2835  else if (MATCH("INFERENCEELEM", 13))
2836  return_value = _readInferenceElem();
2837  else if (MATCH("TARGETENTRY", 11))
2838  return_value = _readTargetEntry();
2839  else if (MATCH("RANGETBLREF", 11))
2840  return_value = _readRangeTblRef();
2841  else if (MATCH("JOINEXPR", 8))
2842  return_value = _readJoinExpr();
2843  else if (MATCH("FROMEXPR", 8))
2844  return_value = _readFromExpr();
2845  else if (MATCH("ONCONFLICTEXPR", 14))
2846  return_value = _readOnConflictExpr();
2847  else if (MATCH("APPENDRELINFO", 13))
2848  return_value = _readAppendRelInfo();
2849  else if (MATCH("RANGETBLENTRY", 13))
2850  return_value = _readRangeTblEntry();
2851  else if (MATCH("RANGETBLFUNCTION", 16))
2852  return_value = _readRangeTblFunction();
2853  else if (MATCH("TABLESAMPLECLAUSE", 17))
2854  return_value = _readTableSampleClause();
2855  else if (MATCH("NOTIFYSTMT", 10))
2856  return_value = _readNotifyStmt();
2857  else if (MATCH("DEFELEM", 7))
2858  return_value = _readDefElem();
2859  else if (MATCH("DECLARECURSORSTMT", 17))
2860  return_value = _readDeclareCursorStmt();
2861  else if (MATCH("PLANNEDSTMT", 11))
2862  return_value = _readPlannedStmt();
2863  else if (MATCH("PLAN", 4))
2864  return_value = _readPlan();
2865  else if (MATCH("RESULT", 6))
2866  return_value = _readResult();
2867  else if (MATCH("PROJECTSET", 10))
2868  return_value = _readProjectSet();
2869  else if (MATCH("MODIFYTABLE", 11))
2870  return_value = _readModifyTable();
2871  else if (MATCH("APPEND", 6))
2872  return_value = _readAppend();
2873  else if (MATCH("MERGEAPPEND", 11))
2874  return_value = _readMergeAppend();
2875  else if (MATCH("RECURSIVEUNION", 14))
2876  return_value = _readRecursiveUnion();
2877  else if (MATCH("BITMAPAND", 9))
2878  return_value = _readBitmapAnd();
2879  else if (MATCH("BITMAPOR", 8))
2880  return_value = _readBitmapOr();
2881  else if (MATCH("SCAN", 4))
2882  return_value = _readScan();
2883  else if (MATCH("SEQSCAN", 7))
2884  return_value = _readSeqScan();
2885  else if (MATCH("SAMPLESCAN", 10))
2886  return_value = _readSampleScan();
2887  else if (MATCH("INDEXSCAN", 9))
2888  return_value = _readIndexScan();
2889  else if (MATCH("INDEXONLYSCAN", 13))
2890  return_value = _readIndexOnlyScan();
2891  else if (MATCH("BITMAPINDEXSCAN", 15))
2892  return_value = _readBitmapIndexScan();
2893  else if (MATCH("BITMAPHEAPSCAN", 14))
2894  return_value = _readBitmapHeapScan();
2895  else if (MATCH("TIDSCAN", 7))
2896  return_value = _readTidScan();
2897  else if (MATCH("TIDRANGESCAN", 12))
2898  return_value = _readTidRangeScan();
2899  else if (MATCH("SUBQUERYSCAN", 12))
2900  return_value = _readSubqueryScan();
2901  else if (MATCH("FUNCTIONSCAN", 12))
2902  return_value = _readFunctionScan();
2903  else if (MATCH("VALUESSCAN", 10))
2904  return_value = _readValuesScan();
2905  else if (MATCH("TABLEFUNCSCAN", 13))
2906  return_value = _readTableFuncScan();
2907  else if (MATCH("CTESCAN", 7))
2908  return_value = _readCteScan();
2909  else if (MATCH("NAMEDTUPLESTORESCAN", 19))
2910  return_value = _readNamedTuplestoreScan();
2911  else if (MATCH("WORKTABLESCAN", 13))
2912  return_value = _readWorkTableScan();
2913  else if (MATCH("FOREIGNSCAN", 11))
2914  return_value = _readForeignScan();
2915  else if (MATCH("CUSTOMSCAN", 10))
2916  return_value = _readCustomScan();
2917  else if (MATCH("JOIN", 4))
2918  return_value = _readJoin();
2919  else if (MATCH("NESTLOOP", 8))
2920  return_value = _readNestLoop();
2921  else if (MATCH("MERGEJOIN", 9))
2922  return_value = _readMergeJoin();
2923  else if (MATCH("HASHJOIN", 8))
2924  return_value = _readHashJoin();
2925  else if (MATCH("MATERIAL", 8))
2926  return_value = _readMaterial();
2927  else if (MATCH("MEMOIZE", 7))
2928  return_value = _readMemoize();
2929  else if (MATCH("SORT", 4))
2930  return_value = _readSort();
2931  else if (MATCH("INCREMENTALSORT", 15))
2932  return_value = _readIncrementalSort();
2933  else if (MATCH("GROUP", 5))
2934  return_value = _readGroup();
2935  else if (MATCH("AGG", 3))
2936  return_value = _readAgg();
2937  else if (MATCH("WINDOWAGG", 9))
2938  return_value = _readWindowAgg();
2939  else if (MATCH("UNIQUE", 6))
2940  return_value = _readUnique();
2941  else if (MATCH("GATHER", 6))
2942  return_value = _readGather();
2943  else if (MATCH("GATHERMERGE", 11))
2944  return_value = _readGatherMerge();
2945  else if (MATCH("HASH", 4))
2946  return_value = _readHash();
2947  else if (MATCH("SETOP", 5))
2948  return_value = _readSetOp();
2949  else if (MATCH("LOCKROWS", 8))
2950  return_value = _readLockRows();
2951  else if (MATCH("LIMIT", 5))
2952  return_value = _readLimit();
2953  else if (MATCH("NESTLOOPPARAM", 13))
2954  return_value = _readNestLoopParam();
2955  else if (MATCH("PLANROWMARK", 11))
2956  return_value = _readPlanRowMark();
2957  else if (MATCH("PARTITIONPRUNEINFO", 18))
2958  return_value = _readPartitionPruneInfo();
2959  else if (MATCH("PARTITIONEDRELPRUNEINFO", 23))
2960  return_value = _readPartitionedRelPruneInfo();
2961  else if (MATCH("PARTITIONPRUNESTEPOP", 20))
2962  return_value = _readPartitionPruneStepOp();
2963  else if (MATCH("PARTITIONPRUNESTEPCOMBINE", 25))
2964  return_value = _readPartitionPruneStepCombine();
2965  else if (MATCH("PLANINVALITEM", 13))
2966  return_value = _readPlanInvalItem();
2967  else if (MATCH("SUBPLAN", 7))
2968  return_value = _readSubPlan();
2969  else if (MATCH("ALTERNATIVESUBPLAN", 18))
2970  return_value = _readAlternativeSubPlan();
2971  else if (MATCH("EXTENSIBLENODE", 14))
2972  return_value = _readExtensibleNode();
2973  else if (MATCH("PARTITIONBOUNDSPEC", 18))
2974  return_value = _readPartitionBoundSpec();
2975  else if (MATCH("PARTITIONRANGEDATUM", 19))
2976  return_value = _readPartitionRangeDatum();
2977  else
2978  {
2979  elog(ERROR, "badly formatted node string \"%.32s\"...", token);
2980  return_value = NULL; /* keep compiler quiet */
2981  }
2982 
2983  return (Node *) return_value;
2984 }
void check_stack_depth(void)
Definition: postgres.c:3470
static PlannedStmt * _readPlannedStmt(void)
Definition: readfuncs.c:1576
static PartitionedRelPruneInfo * _readPartitionedRelPruneInfo(void)
Definition: readfuncs.c:2543
static CollateExpr * _readCollateExpr(void)
Definition: readfuncs.c:997
static CoerceViaIO * _readCoerceViaIO(void)
Definition: readfuncs.c:945
static PlanInvalItem * _readPlanInvalItem(void)
Definition: readfuncs.c:2590
static WithCheckOption * _readWithCheckOption(void)
Definition: readfuncs.c:325
static Alias * _readAlias(void)
Definition: readfuncs.c:501
static NestLoopParam * _readNestLoopParam(void)
Definition: readfuncs.c:2501
static PartitionPruneStepOp * _readPartitionPruneStepOp(void)
Definition: readfuncs.c:2561
static RangeTblFunction * _readRangeTblFunction(void)
Definition: readfuncs.c:1521
static PartitionPruneInfo * _readPartitionPruneInfo(void)
Definition: readfuncs.c:2532
static Result * _readResult(void)
Definition: readfuncs.c:1649
static AlternativeSubPlan * _readAlternativeSubPlan(void)
Definition: readfuncs.c:2632
static PartitionRangeDatum * _readPartitionRangeDatum(void)
Definition: readfuncs.c:2695
static WorkTableScan * _readWorkTableScan(void)
Definition: readfuncs.c:2054
static CoerceToDomain * _readCoerceToDomain(void)
Definition: readfuncs.c:1215
static IndexScan * _readIndexScan(void)
Definition: readfuncs.c:1858
static ArrayCoerceExpr * _readArrayCoerceExpr(void)
Definition: readfuncs.c:962
static Group * _readGroup(void)
Definition: readfuncs.c:2289
static WindowAgg * _readWindowAgg(void)
Definition: readfuncs.c:2332
static NamedArgExpr * _readNamedArgExpr(void)
Definition: readfuncs.c:750
static RowExpr * _readRowExpr(void)
Definition: readfuncs.c:1078
static CoerceToDomainValue * _readCoerceToDomainValue(void)
Definition: readfuncs.c:1233
static RangeTblEntry * _readRangeTblEntry(void)
Definition: readfuncs.c:1427
static FieldStore * _readFieldStore(void)
Definition: readfuncs.c:911
static ScalarArrayOpExpr * _readScalarArrayOpExpr(void)
Definition: readfuncs.c:826
static TableFunc * _readTableFunc(void)
Definition: readfuncs.c:532
static SetOp * _readSetOp(void)
Definition: readfuncs.c:2441
static TableFuncScan * _readTableFuncScan(void)
Definition: readfuncs.c:2008
static CoalesceExpr * _readCoalesceExpr(void)
Definition: readfuncs.c:1113
static TableSampleClause * _readTableSampleClause(void)
Definition: readfuncs.c:1540
static DefElem * _readDefElem(void)
Definition: readfuncs.c:1555
static RangeTblRef * _readRangeTblRef(void)
Definition: readfuncs.c:1328
static BooleanTest * _readBooleanTest(void)
Definition: readfuncs.c:1200
static FuncExpr * _readFuncExpr(void)
Definition: readfuncs.c:729
static BitmapOr * _readBitmapOr(void)
Definition: readfuncs.c:1787
static Const * _readConst(void)
Definition: readfuncs.c:595
static JoinExpr * _readJoinExpr(void)
Definition: readfuncs.c:1341
static Sort * _readSort(void)
Definition: readfuncs.c:2261
static Aggref * _readAggref(void)
Definition: readfuncs.c:638
static SQLValueFunction * _readSQLValueFunction(void)
Definition: readfuncs.c:1147
static RowMarkClause * _readRowMarkClause(void)
Definition: readfuncs.c:400
static IncrementalSort * _readIncrementalSort(void)
Definition: readfuncs.c:2274
static AppendRelInfo * _readAppendRelInfo(void)
Definition: readfuncs.c:1403
static Plan * _readPlan(void)
Definition: readfuncs.c:1636
static RangeVar * _readRangeVar(void)
Definition: readfuncs.c:512
static CaseWhen * _readCaseWhen(void)
Definition: readfuncs.c:1030
static Scan * _readScan(void)
Definition: readfuncs.c:1817
static Memoize * _readMemoize(void)
Definition: readfuncs.c:2221
static ConvertRowtypeExpr * _readConvertRowtypeExpr(void)
Definition: readfuncs.c:981
static Gather * _readGather(void)
Definition: readfuncs.c:2381
static IntoClause * _readIntoClause(void)
Definition: readfuncs.c:554
static TidScan * _readTidScan(void)
Definition: readfuncs.c:1932
static CTESearchClause * _readCTESearchClause(void)
Definition: readfuncs.c:416
static InferenceElem * _readInferenceElem(void)
Definition: readfuncs.c:1294
static NextValueExpr * _readNextValueExpr(void)
Definition: readfuncs.c:1280
static NamedTuplestoreScan * _readNamedTuplestoreScan(void)
Definition: readfuncs.c:2039
static WindowFunc * _readWindowFunc(void)
Definition: readfuncs.c:686
static NestLoop * _readNestLoop(void)
Definition: readfuncs.c:2150
static Agg * _readAgg(void)
Definition: readfuncs.c:2307
static CustomScan * _readCustomScan(void)
Definition: readfuncs.c:2092
static MergeAppend * _readMergeAppend(void)
Definition: readfuncs.c:1730
static Var * _readVar(void)
Definition: readfuncs.c:574
static CommonTableExpr * _readCommonTableExpr(void)
Definition: readfuncs.c:454
static SampleScan * _readSampleScan(void)
Definition: readfuncs.c:1843
static TargetEntry * _readTargetEntry(void)
Definition: readfuncs.c:1309
static OnConflictExpr * _readOnConflictExpr(void)
Definition: readfuncs.c:1376
static BoolExpr * _readBoolExpr(void)
Definition: readfuncs.c:846
static ModifyTable * _readModifyTable(void)
Definition: readfuncs.c:1677
static CTECycleClause * _readCTECycleClause(void)
Definition: readfuncs.c:432
static WindowClause * _readWindowClause(void)
Definition: readfuncs.c:374
static BitmapIndexScan * _readBitmapIndexScan(void)
Definition: readfuncs.c:1899
static Query * _readQuery(void)
Definition: readfuncs.c:245
static CurrentOfExpr * _readCurrentOfExpr(void)
Definition: readfuncs.c:1265
static SeqScan * _readSeqScan(void)
Definition: readfuncs.c:1830
static LockRows * _readLockRows(void)
Definition: readfuncs.c:2464
static DistinctExpr * _readDistinctExpr(void)
Definition: readfuncs.c:786
static GroupingFunc * _readGroupingFunc(void)
Definition: readfuncs.c:669
static DeclareCursorStmt * _readDeclareCursorStmt(void)
Definition: readfuncs.c:310
static FromExpr * _readFromExpr(void)
Definition: readfuncs.c:1362
static NotifyStmt * _readNotifyStmt(void)
Definition: readfuncs.c:296
static Hash * _readHash(void)
Definition: readfuncs.c:2422
static PlanRowMark * _readPlanRowMark(void)
Definition: readfuncs.c:2515
static IndexOnlyScan * _readIndexOnlyScan(void)
Definition: readfuncs.c:1879
static PartitionPruneStepCombine * _readPartitionPruneStepCombine(void)
Definition: readfuncs.c:2575
static ExtensibleNode * _readExtensibleNode(void)
Definition: readfuncs.c:2645
static RecursiveUnion * _readRecursiveUnion(void)
Definition: readfuncs.c:1752
static ArrayExpr * _readArrayExpr(void)
Definition: readfuncs.c:1060
static Append * _readAppend(void)
Definition: readfuncs.c:1711
static ValuesScan * _readValuesScan(void)
Definition: readfuncs.c:1993
static XmlExpr * _readXmlExpr(void)
Definition: readfuncs.c:1163
#define MATCH(tokname, namelen)
static FunctionScan * _readFunctionScan(void)
Definition: readfuncs.c:1977
static SetToDefault * _readSetToDefault(void)
Definition: readfuncs.c:1249
static MergeJoin * _readMergeJoin(void)
Definition: readfuncs.c:2165
static BitmapHeapScan * _readBitmapHeapScan(void)
Definition: readfuncs.c:1917
static FieldSelect * _readFieldSelect(void)
Definition: readfuncs.c:894
static Join * _readJoin(void)
Definition: readfuncs.c:2137
static SubscriptingRef * _readSubscriptingRef(void)
Definition: readfuncs.c:708
static NullIfExpr * _readNullIfExpr(void)
Definition: readfuncs.c:806
static ProjectSet * _readProjectSet(void)
Definition: readfuncs.c:1664
static GatherMerge * _readGatherMerge(void)
Definition: readfuncs.c:2400
static CteScan * _readCteScan(void)
Definition: readfuncs.c:2023
static SetOperationStmt * _readSetOperationStmt(void)
Definition: readfuncs.c:479
static CaseTestExpr * _readCaseTestExpr(void)
Definition: readfuncs.c:1045
static RelabelType * _readRelabelType(void)
Definition: readfuncs.c:927
static RowCompareExpr * _readRowCompareExpr(void)
Definition: readfuncs.c:1095
static SubPlan * _readSubPlan(void)
Definition: readfuncs.c:2604
static PartitionBoundSpec * _readPartitionBoundSpec(void)
Definition: readfuncs.c:2675
static NullTest * _readNullTest(void)
Definition: readfuncs.c:1184
static Material * _readMaterial(void)
Definition: readfuncs.c:2208
static CaseExpr * _readCaseExpr(void)
Definition: readfuncs.c:1012
static Param * _readParam(void)
Definition: readfuncs.c:620
static GroupingSet * _readGroupingSet(void)
Definition: readfuncs.c:359
static HashJoin * _readHashJoin(void)
Definition: readfuncs.c:2190
static SubLink * _readSubLink(void)
Definition: readfuncs.c:872
static SubqueryScan * _readSubqueryScan(void)
Definition: readfuncs.c:1962
static BitmapAnd * _readBitmapAnd(void)
Definition: readfuncs.c:1772
static TidRangeScan * _readTidRangeScan(void)
Definition: readfuncs.c:1947
static OpExpr * _readOpExpr(void)
Definition: readfuncs.c:766
static SortGroupClause * _readSortGroupClause(void)
Definition: readfuncs.c:342
static Unique * _readUnique(void)
Definition: readfuncs.c:2363
static MinMaxExpr * _readMinMaxExpr(void)
Definition: readfuncs.c:1129
static ForeignScan * _readForeignScan(void)
Definition: readfuncs.c:2069
static Limit * _readLimit(void)
Definition: readfuncs.c:2480
Definition: nodes.h:540

References _readAgg(), _readAggref(), _readAlias(), _readAlternativeSubPlan(), _readAppend(), _readAppendRelInfo(), _readArrayCoerceExpr(), _readArrayExpr(), _readBitmapAnd(), _readBitmapHeapScan(), _readBitmapIndexScan(), _readBitmapOr(), _readBooleanTest(), _readBoolExpr(), _readCaseExpr(), _readCaseTestExpr(), _readCaseWhen(), _readCoalesceExpr(), _readCoerceToDomain(), _readCoerceToDomainValue(), _readCoerceViaIO(), _readCollateExpr(), _readCommonTableExpr(), _readConst(), _readConvertRowtypeExpr(), _readCTECycleClause(), _readCteScan(), _readCTESearchClause(), _readCurrentOfExpr(), _readCustomScan(), _readDeclareCursorStmt(), _readDefElem(), _readDistinctExpr(), _readExtensibleNode(), _readFieldSelect(), _readFieldStore(), _readForeignScan(), _readFromExpr(), _readFuncExpr(), _readFunctionScan(), _readGather(), _readGatherMerge(), _readGroup(), _readGroupingFunc(), _readGroupingSet(), _readHash(), _readHashJoin(), _readIncrementalSort(), _readIndexOnlyScan(), _readIndexScan(), _readInferenceElem(), _readIntoClause(), _readJoin(), _readJoinExpr(), _readLimit(), _readLockRows(), _readMaterial(), _readMemoize(), _readMergeAppend(), _readMergeJoin(), _readMinMaxExpr(), _readModifyTable(), _readNamedArgExpr(), _readNamedTuplestoreScan(), _readNestLoop(), _readNestLoopParam(), _readNextValueExpr(), _readNotifyStmt(), _readNullIfExpr(), _readNullTest(), _readOnConflictExpr(), _readOpExpr(), _readParam(), _readPartitionBoundSpec(), _readPartitionedRelPruneInfo(), _readPartitionPruneInfo(), _readPartitionPruneStepCombine(), _readPartitionPruneStepOp(), _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(), _readSubscriptingRef(), _readTableFunc(), _readTableFuncScan(), _readTableSampleClause(), _readTargetEntry(), _readTidRangeScan(), _readTidScan(), _readUnique(), _readValuesScan(), _readVar(), _readWindowAgg(), _readWindowClause(), _readWindowFunc(), _readWithCheckOption(), _readWorkTableScan(), _readXmlExpr(), check_stack_depth(), elog, ERROR, MATCH, pg_strtok(), and READ_TEMP_LOCALS.

Referenced by nodeRead().

◆ readAttrNumberCols()

AttrNumber* readAttrNumberCols ( int  numCols)

Definition at line 3052 of file readfuncs.c.

3053 {
3054  int tokenLength,
3055  i;
3056  const char *token;
3057  AttrNumber *attr_vals;
3058 
3059  if (numCols <= 0)
3060  return NULL;
3061 
3062  attr_vals = (AttrNumber *) palloc(numCols * sizeof(AttrNumber));
3063  for (i = 0; i < numCols; i++)
3064  {
3065  token = pg_strtok(&tokenLength);
3066  attr_vals[i] = atoi(token);
3067  }
3068 
3069  return attr_vals;
3070 }
int16 AttrNumber
Definition: attnum.h:21
int i
Definition: isn.c:73
void * palloc(Size size)
Definition: mcxt.c:1062

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

◆ readBitmapset()

Bitmapset* readBitmapset ( void  )

Definition at line 236 of file readfuncs.c.

237 {
238  return _readBitmapset();
239 }

References _readBitmapset().

◆ readBoolCols()

bool* readBoolCols ( int  numCols)

Definition at line 3124 of file readfuncs.c.

3125 {
3126  int tokenLength,
3127  i;
3128  const char *token;
3129  bool *bool_vals;
3130 
3131  if (numCols <= 0)
3132  return NULL;
3133 
3134  bool_vals = (bool *) palloc(numCols * sizeof(bool));
3135  for (i = 0; i < numCols; i++)
3136  {
3137  token = pg_strtok(&tokenLength);
3138  bool_vals[i] = strtobool(token);
3139  }
3140 
3141  return bool_vals;
3142 }

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

◆ ReadCommonJoin()

static void ReadCommonJoin ( Join local_node)
static

Definition at line 2122 of file readfuncs.c.

2123 {
2124  READ_TEMP_LOCALS();
2125 
2126  ReadCommonPlan(&local_node->plan);
2127 
2128  READ_ENUM_FIELD(jointype, JoinType);
2129  READ_BOOL_FIELD(inner_unique);
2130  READ_NODE_FIELD(joinqual);
2131 }
Plan plan
Definition: plannodes.h:721

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

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

◆ ReadCommonPlan()

static void ReadCommonPlan ( Plan local_node)
static

◆ ReadCommonScan()

◆ ReadCommonSort()

static void ReadCommonSort ( Sort local_node)
static

Definition at line 2244 of file readfuncs.c.

2245 {
2246  READ_TEMP_LOCALS();
2247 
2248  ReadCommonPlan(&local_node->plan);
2249 
2250  READ_INT_FIELD(numCols);
2251  READ_ATTRNUMBER_ARRAY(sortColIdx, local_node->numCols);
2252  READ_OID_ARRAY(sortOperators, local_node->numCols);
2253  READ_OID_ARRAY(collations, local_node->numCols);
2254  READ_BOOL_ARRAY(nullsFirst, local_node->numCols);
2255 }
int numCols
Definition: plannodes.h:832
Plan plan
Definition: plannodes.h:831

References Sort::numCols, Sort::plan, READ_ATTRNUMBER_ARRAY, READ_BOOL_ARRAY, READ_INT_FIELD, READ_OID_ARRAY, READ_TEMP_LOCALS, and ReadCommonPlan().

Referenced by _readIncrementalSort(), and _readSort().

◆ readDatum()

Datum readDatum ( bool  typbyval)

Definition at line 2995 of file readfuncs.c.

2996 {
2997  Size length,
2998  i;
2999  int tokenLength;
3000  const char *token;
3001  Datum res;
3002  char *s;
3003 
3004  /*
3005  * read the actual length of the value
3006  */
3007  token = pg_strtok(&tokenLength);
3008  length = atoui(token);
3009 
3010  token = pg_strtok(&tokenLength); /* read the '[' */
3011  if (token == NULL || token[0] != '[')
3012  elog(ERROR, "expected \"[\" to start datum, but got \"%s\"; length = %zu",
3013  token ? token : "[NULL]", length);
3014 
3015  if (typbyval)
3016  {
3017  if (length > (Size) sizeof(Datum))
3018  elog(ERROR, "byval datum but length = %zu", length);
3019  res = (Datum) 0;
3020  s = (char *) (&res);
3021  for (i = 0; i < (Size) sizeof(Datum); i++)
3022  {
3023  token = pg_strtok(&tokenLength);
3024  s[i] = (char) atoi(token);
3025  }
3026  }
3027  else if (length <= 0)
3028  res = (Datum) NULL;
3029  else
3030  {
3031  s = (char *) palloc(length);
3032  for (i = 0; i < length; i++)
3033  {
3034  token = pg_strtok(&tokenLength);
3035  s[i] = (char) atoi(token);
3036  }
3037  res = PointerGetDatum(s);
3038  }
3039 
3040  token = pg_strtok(&tokenLength); /* read the ']' */
3041  if (token == NULL || token[0] != ']')
3042  elog(ERROR, "expected \"]\" to end datum, but got \"%s\"; length = %zu",
3043  token ? token : "[NULL]", length);
3044 
3045  return res;
3046 }
size_t Size
Definition: c.h:540
uintptr_t Datum
Definition: postgres.h:411
#define PointerGetDatum(X)
Definition: postgres.h:600

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

Referenced by _readConst().

◆ readIntCols()

int* readIntCols ( int  numCols)

Definition at line 3100 of file readfuncs.c.

3101 {
3102  int tokenLength,
3103  i;
3104  const char *token;
3105  int *int_vals;
3106 
3107  if (numCols <= 0)
3108  return NULL;
3109 
3110  int_vals = (int *) palloc(numCols * sizeof(int));
3111  for (i = 0; i < numCols; i++)
3112  {
3113  token = pg_strtok(&tokenLength);
3114  int_vals[i] = atoi(token);
3115  }
3116 
3117  return int_vals;
3118 }

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

◆ readOidCols()

Oid* readOidCols ( int  numCols)

Definition at line 3076 of file readfuncs.c.

3077 {
3078  int tokenLength,
3079  i;
3080  const char *token;
3081  Oid *oid_vals;
3082 
3083  if (numCols <= 0)
3084  return NULL;
3085 
3086  oid_vals = (Oid *) palloc(numCols * sizeof(Oid));
3087  for (i = 0; i < numCols; i++)
3088  {
3089  token = pg_strtok(&tokenLength);
3090  oid_vals[i] = atooid(token);
3091  }
3092 
3093  return oid_vals;
3094 }
unsigned int Oid
Definition: postgres_ext.h:31

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