From 616f3708850c626cd92d72603a7f441d1173c660 Mon Sep 17 00:00:00 2001 From: Onder Kalaci Date: Wed, 19 Oct 2016 10:43:32 +0300 Subject: [PATCH] 9.6 integration --- src/backend/distributed/planner/multi_router_planner.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/distributed/planner/multi_router_planner.c b/src/backend/distributed/planner/multi_router_planner.c index 44d83cac8..4424f6e0f 100644 --- a/src/backend/distributed/planner/multi_router_planner.c +++ b/src/backend/distributed/planner/multi_router_planner.c @@ -2225,9 +2225,15 @@ ReorderInsertSelectTargetLists(Query *originalQuery, RangeTblEntry *insertRte, * It is safe to pull Var clause and ignore the coercions since that * are already going to be added on the workers implicitly. */ +#if (PG_VERSION_NUM >= 90600) + targetVarList = pull_var_clause((Node *) oldInsertTargetEntry->expr, + PVC_RECURSE_AGGREGATES); +#else targetVarList = pull_var_clause((Node *) oldInsertTargetEntry->expr, PVC_RECURSE_AGGREGATES, PVC_RECURSE_PLACEHOLDERS); +#endif + targetVarCount = list_length(targetVarList); /* a single INSERT target entry cannot have more than one Var */