mirror of https://github.com/citusdata/citus.git
introduce PortalDefineQuerySelectCompat
PortalDefineQuery doesn't accept char* for command tag anymore with PG >= 13. We are currently only using it with Select, therefore a Portal define query compat for select is created. Commit on PG side: 2f9661311b83dc481fc19f6e3bda015392010a40pull/3900/head
parent
62879ee8c1
commit
00e7386007
|
@ -628,10 +628,9 @@ ExecutePlanIntoDestReceiver(PlannedStmt *queryPlan, ParamListInfo params,
|
|||
/* don't display the portal in pg_cursors, it is for internal use only */
|
||||
portal->visible = false;
|
||||
|
||||
PortalDefineQuery(portal,
|
||||
PortalDefineQuerySelectCompat(portal,
|
||||
NULL,
|
||||
"",
|
||||
"SELECT",
|
||||
list_make1(queryPlan),
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ StartPortalForQueryExecution(const char *queryString)
|
|||
/* don't display the portal in pg_cursors, it is for internal use only */
|
||||
portal->visible = false;
|
||||
|
||||
PortalDefineQuery(portal, NULL, queryString, "SELECT", list_make1(queryPlan), NULL);
|
||||
PortalDefineQuerySelectCompat(portal, NULL, queryString, list_make1(queryPlan), NULL);
|
||||
int eflags = 0;
|
||||
PortalStart(portal, NULL, eflags, GetActiveSnapshot());
|
||||
|
||||
|
|
|
@ -24,16 +24,22 @@
|
|||
#include "optimizer/optimizer.h"
|
||||
#endif
|
||||
|
||||
#if (PG_VERSION_NUM >= PG_VERSION_13)
|
||||
#include "tcop/tcopprot.h"
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_13
|
||||
#define lnext_compat(l, r) lnext(l, r)
|
||||
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c)
|
||||
#define pg_plan_query_compat(p,q,c,b) pg_plan_query(p,q,c,b)
|
||||
#define planner_compat(p,q,c,b) planner(p,q,c,b)
|
||||
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,CMDTAG_SELECT,e,f)
|
||||
#else /* pre PG13 */
|
||||
#define lnext_compat(l, r) lnext(r)
|
||||
#define list_delete_cell_compat(l,c,p) list_delete_cell(l,c,p)
|
||||
#define pg_plan_query_compat(p,q,c,b) pg_plan_query(p,c,b)
|
||||
#define planner_compat(p,q,c,b) planner(p,c,b)
|
||||
#define PortalDefineQuerySelectCompat(a,b,c,e,f) PortalDefineQuery(a,b,c,"SELECT",e,f)
|
||||
#endif
|
||||
#if PG_VERSION_NUM >= PG_VERSION_12
|
||||
|
||||
|
|
Loading…
Reference in New Issue