mirror of https://github.com/citusdata/citus.git
create Set_ptr_value
Since PG13 changed the list, a listcell doesn't contain data anymore. Therefore Set_ptr_value macro is created, so that depending on the version it will either use cell->data.ptr_value or cell->ptr_value. Commit on Postgres side: 1cff1b95ab6ddae32faa3efe0d95a820dbfdc164pull/3900/head
parent
ab85a8129d
commit
4ed30a0824
|
@ -5141,7 +5141,7 @@ GreedyAssignTask(WorkerNode *workerNode, List *taskList, List *activeShardPlacem
|
||||||
rotatePlacementListBy = replicaIndex;
|
rotatePlacementListBy = replicaIndex;
|
||||||
|
|
||||||
/* overwrite task list to signal that this task is assigned */
|
/* overwrite task list to signal that this task is assigned */
|
||||||
taskCell->data.ptr_value = NULL;
|
Set_ptr_value(taskCell, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2976,8 +2976,7 @@ NormalizeMultiRowInsertTargetList(Query *query)
|
||||||
|
|
||||||
expandedValuesList = lappend(expandedValuesList, targetExpr);
|
expandedValuesList = lappend(expandedValuesList, targetExpr);
|
||||||
}
|
}
|
||||||
|
Set_ptr_value(valuesListCell, (void *) expandedValuesList);
|
||||||
valuesListCell->data.ptr_value = (void *) expandedValuesList;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reset coltypes, coltypmods, colcollations and rebuild them below */
|
/* reset coltypes, coltypmods, colcollations and rebuild them below */
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g,h)
|
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g,h)
|
||||||
#define varoattno varattnosyn
|
#define varoattno varattnosyn
|
||||||
#define varnoold varnosyn
|
#define varnoold varnosyn
|
||||||
|
#define Set_ptr_value(a,b) a->ptr_value = b
|
||||||
#else /* pre PG13 */
|
#else /* pre PG13 */
|
||||||
#define lnext_compat(l, r) lnext(r)
|
#define lnext_compat(l, r) lnext(r)
|
||||||
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c,p)
|
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c,p)
|
||||||
|
@ -48,6 +49,7 @@
|
||||||
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,"SELECT",e,f)
|
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,"SELECT",e,f)
|
||||||
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a,b)
|
#define getOwnedSequencesCompat(a,b) getOwnedSequences(a,b)
|
||||||
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g)
|
#define ExplainOnePlanCompat(a,b,c,d,e,f,g,h) ExplainOnePlan(a,b,c,d,e,f,g)
|
||||||
|
#define Set_ptr_value(a,b) a->data.ptr_value = b
|
||||||
#endif
|
#endif
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_12
|
#if PG_VERSION_NUM >= PG_VERSION_12
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue