]> granicus.if.org Git - postgresql/blobdiff - src/backend/nodes/outfuncs.c
Fix PARAM_EXEC assignment mechanism to be safe in the presence of WITH.
[postgresql] / src / backend / nodes / outfuncs.c
index 9dee0414f361dc17763295bd8d2638d7b2b6e1a7..02a0f62a53a4e3d06a3ad48d523e959d5d6b2ab7 100644 (file)
@@ -1666,7 +1666,6 @@ _outPlannerGlobal(StringInfo str, const PlannerGlobal *node)
        WRITE_NODE_TYPE("PLANNERGLOBAL");
 
        /* NB: this isn't a complete set of fields */
-       WRITE_NODE_FIELD(paramlist);
        WRITE_NODE_FIELD(subplans);
        WRITE_BITMAPSET_FIELD(rewindPlanIDs);
        WRITE_NODE_FIELD(finalrtable);
@@ -1674,6 +1673,7 @@ _outPlannerGlobal(StringInfo str, const PlannerGlobal *node)
        WRITE_NODE_FIELD(resultRelations);
        WRITE_NODE_FIELD(relationOids);
        WRITE_NODE_FIELD(invalItems);
+       WRITE_INT_FIELD(nParamExec);
        WRITE_UINT_FIELD(lastPHId);
        WRITE_UINT_FIELD(lastRowMarkId);
        WRITE_BOOL_FIELD(transientPlan);
@@ -1688,6 +1688,7 @@ _outPlannerInfo(StringInfo str, const PlannerInfo *node)
        WRITE_NODE_FIELD(parse);
        WRITE_NODE_FIELD(glob);
        WRITE_UINT_FIELD(query_level);
+       WRITE_NODE_FIELD(plan_params);
        WRITE_BITMAPSET_FIELD(all_baserels);
        WRITE_NODE_FIELD(join_rel_list);
        WRITE_INT_FIELD(join_cur_level);
@@ -1699,6 +1700,7 @@ _outPlannerInfo(StringInfo str, const PlannerInfo *node)
        WRITE_NODE_FIELD(right_join_clauses);
        WRITE_NODE_FIELD(full_join_clauses);
        WRITE_NODE_FIELD(join_info_list);
+       WRITE_NODE_FIELD(lateral_info_list);
        WRITE_NODE_FIELD(append_rel_list);
        WRITE_NODE_FIELD(rowMarks);
        WRITE_NODE_FIELD(placeholder_list);
@@ -1713,6 +1715,7 @@ _outPlannerInfo(StringInfo str, const PlannerInfo *node)
        WRITE_FLOAT_FIELD(limit_tuples, "%.0f");
        WRITE_BOOL_FIELD(hasInheritedTarget);
        WRITE_BOOL_FIELD(hasJoinRTEs);
+       WRITE_BOOL_FIELD(hasLateralRTEs);
        WRITE_BOOL_FIELD(hasHavingQual);
        WRITE_BOOL_FIELD(hasPseudoConstantQuals);
        WRITE_BOOL_FIELD(hasRecursion);
@@ -1731,6 +1734,7 @@ _outRelOptInfo(StringInfo str, const RelOptInfo *node)
        WRITE_BITMAPSET_FIELD(relids);
        WRITE_FLOAT_FIELD(rows, "%.0f");
        WRITE_INT_FIELD(width);
+       WRITE_BOOL_FIELD(consider_startup);
        WRITE_NODE_FIELD(reltargetlist);
        WRITE_NODE_FIELD(pathlist);
        WRITE_NODE_FIELD(ppilist);
@@ -1743,12 +1747,15 @@ _outRelOptInfo(StringInfo str, const RelOptInfo *node)
        WRITE_ENUM_FIELD(rtekind, RTEKind);
        WRITE_INT_FIELD(min_attr);
        WRITE_INT_FIELD(max_attr);
+       WRITE_NODE_FIELD(lateral_vars);
+       WRITE_BITMAPSET_FIELD(lateral_relids);
        WRITE_NODE_FIELD(indexlist);
        WRITE_UINT_FIELD(pages);
        WRITE_FLOAT_FIELD(tuples, "%.0f");
        WRITE_FLOAT_FIELD(allvisfrac, "%.6f");
        WRITE_NODE_FIELD(subplan);
        WRITE_NODE_FIELD(subroot);
+       WRITE_NODE_FIELD(subplan_params);
        /* we don't try to print fdwroutine or fdw_private */
        WRITE_NODE_FIELD(baserestrictinfo);
        WRITE_NODE_FIELD(joininfo);
@@ -1890,6 +1897,15 @@ _outSpecialJoinInfo(StringInfo str, const SpecialJoinInfo *node)
        WRITE_NODE_FIELD(join_quals);
 }
 
+static void
+_outLateralJoinInfo(StringInfo str, const LateralJoinInfo *node)
+{
+       WRITE_NODE_TYPE("LATERALJOININFO");
+
+       WRITE_UINT_FIELD(lateral_rhs);
+       WRITE_BITMAPSET_FIELD(lateral_lhs);
+}
+
 static void
 _outAppendRelInfo(StringInfo str, const AppendRelInfo *node)
 {
@@ -1936,7 +1952,7 @@ _outPlannerParamItem(StringInfo str, const PlannerParamItem *node)
        WRITE_NODE_TYPE("PLANNERPARAMITEM");
 
        WRITE_NODE_FIELD(item);
-       WRITE_UINT_FIELD(abslevel);
+       WRITE_INT_FIELD(paramId);
 }
 
 /*****************************************************************************
@@ -3036,6 +3052,9 @@ _outNode(StringInfo str, const void *obj)
                        case T_SpecialJoinInfo:
                                _outSpecialJoinInfo(str, obj);
                                break;
+                       case T_LateralJoinInfo:
+                               _outLateralJoinInfo(str, obj);
+                               break;
                        case T_AppendRelInfo:
                                _outAppendRelInfo(str, obj);
                                break;