9.6 integration

pull/896/head
Onder Kalaci 2016-10-19 10:43:32 +03:00
parent 1c1803dd3b
commit 616f370885
1 changed files with 6 additions and 0 deletions

View File

@ -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 */