diff options
Diffstat (limited to 'src/backend/nodes/readfuncs.c')
-rw-r--r-- | src/backend/nodes/readfuncs.c | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index da58aad4b32..f41e590a155 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -1328,52 +1328,6 @@ _readOnConflictExpr(void) READ_DONE(); } -static PartitionPruneStepOp * -_readPartitionPruneStepOp(void) -{ - READ_LOCALS(PartitionPruneStepOp); - - READ_INT_FIELD(step.step_id); - READ_INT_FIELD(opstrategy); - READ_NODE_FIELD(exprs); - READ_NODE_FIELD(cmpfns); - READ_BITMAPSET_FIELD(nullkeys); - - READ_DONE(); -} - -static PartitionPruneStepCombine * -_readPartitionPruneStepCombine(void) -{ - READ_LOCALS(PartitionPruneStepCombine); - - READ_INT_FIELD(step.step_id); - READ_ENUM_FIELD(combineOp, PartitionPruneCombineOp); - READ_NODE_FIELD(source_stepids); - - READ_DONE(); -} - -static PartitionPruneInfo * -_readPartitionPruneInfo(void) -{ - READ_LOCALS(PartitionPruneInfo); - - READ_OID_FIELD(reloid); - READ_NODE_FIELD(pruning_steps); - READ_BITMAPSET_FIELD(present_parts); - READ_INT_FIELD(nparts); - READ_INT_FIELD(nexprs); - READ_INT_ARRAY(subnode_map, local_node->nparts); - READ_INT_ARRAY(subpart_map, local_node->nparts); - READ_BOOL_ARRAY(hasexecparam, local_node->nexprs); - READ_BOOL_FIELD(do_initial_prune); - READ_BOOL_FIELD(do_exec_prune); - READ_BITMAPSET_FIELD(execparamids); - - READ_DONE(); -} - /* * Stuff from parsenodes.h. */ @@ -1506,6 +1460,10 @@ _readDefElem(void) } /* + * Stuff from plannodes.h. + */ + +/* * _readPlannedStmt */ static PlannedStmt * @@ -1651,9 +1609,9 @@ _readAppend(void) ReadCommonPlan(&local_node->plan); - READ_NODE_FIELD(partitioned_rels); READ_NODE_FIELD(appendplans); READ_INT_FIELD(first_partial_plan); + READ_NODE_FIELD(partitioned_rels); READ_NODE_FIELD(part_prune_infos); READ_DONE(); @@ -2365,6 +2323,52 @@ _readPlanRowMark(void) READ_DONE(); } +static PartitionPruneInfo * +_readPartitionPruneInfo(void) +{ + READ_LOCALS(PartitionPruneInfo); + + READ_OID_FIELD(reloid); + READ_NODE_FIELD(pruning_steps); + READ_BITMAPSET_FIELD(present_parts); + READ_INT_FIELD(nparts); + READ_INT_FIELD(nexprs); + READ_INT_ARRAY(subnode_map, local_node->nparts); + READ_INT_ARRAY(subpart_map, local_node->nparts); + READ_BOOL_ARRAY(hasexecparam, local_node->nexprs); + READ_BOOL_FIELD(do_initial_prune); + READ_BOOL_FIELD(do_exec_prune); + READ_BITMAPSET_FIELD(execparamids); + + READ_DONE(); +} + +static PartitionPruneStepOp * +_readPartitionPruneStepOp(void) +{ + READ_LOCALS(PartitionPruneStepOp); + + READ_INT_FIELD(step.step_id); + READ_INT_FIELD(opstrategy); + READ_NODE_FIELD(exprs); + READ_NODE_FIELD(cmpfns); + READ_BITMAPSET_FIELD(nullkeys); + + READ_DONE(); +} + +static PartitionPruneStepCombine * +_readPartitionPruneStepCombine(void) +{ + READ_LOCALS(PartitionPruneStepCombine); + + READ_INT_FIELD(step.step_id); + READ_ENUM_FIELD(combineOp, PartitionPruneCombineOp); + READ_NODE_FIELD(source_stepids); + + READ_DONE(); +} + /* * _readPlanInvalItem */ @@ -2619,12 +2623,6 @@ parseNodeString(void) return_value = _readFromExpr(); else if (MATCH("ONCONFLICTEXPR", 14)) return_value = _readOnConflictExpr(); - else if (MATCH("PARTITIONPRUNESTEPOP", 20)) - return_value = _readPartitionPruneStepOp(); - else if (MATCH("PARTITIONPRUNESTEPCOMBINE", 25)) - return_value = _readPartitionPruneStepCombine(); - else if (MATCH("PARTITIONPRUNEINFO", 18)) - return_value = _readPartitionPruneInfo(); else if (MATCH("RTE", 3)) return_value = _readRangeTblEntry(); else if (MATCH("RANGETBLFUNCTION", 16)) @@ -2725,6 +2723,12 @@ parseNodeString(void) return_value = _readNestLoopParam(); else if (MATCH("PLANROWMARK", 11)) return_value = _readPlanRowMark(); + else if (MATCH("PARTITIONPRUNEINFO", 18)) + return_value = _readPartitionPruneInfo(); + else if (MATCH("PARTITIONPRUNESTEPOP", 20)) + return_value = _readPartitionPruneStepOp(); + else if (MATCH("PARTITIONPRUNESTEPCOMBINE", 25)) + return_value = _readPartitionPruneStepCombine(); else if (MATCH("PLANINVALITEM", 13)) return_value = _readPlanInvalItem(); else if (MATCH("SUBPLAN", 7)) |