setting some perminfoindexes to 0

naisila/check_router_fix
naisila 2023-07-21 16:27:18 +03:00
parent 40c4711906
commit 0294892873
4 changed files with 15 additions and 0 deletions

View File

@ -358,6 +358,9 @@ ConvertRteToSubqueryWithEmptyResult(RangeTblEntry *rte)
subquery->jointree = joinTree;
rte->rtekind = RTE_SUBQUERY;
#if PG_VERSION_NUM >= PG_VERSION_16
rte->perminfoindex = 0;
#endif
rte->subquery = subquery;
rte->alias = copyObject(rte->eref);
}

View File

@ -775,6 +775,9 @@ ConvertCteRTEIntoSubquery(Query *mergeQuery, RangeTblEntry *sourceRte)
Query *cteQuery = (Query *) copyObject(sourceCte->ctequery);
sourceRte->rtekind = RTE_SUBQUERY;
#if PG_VERSION_NUM >= PG_VERSION_16
sourceRte->perminfoindex = 0;
#endif
/*
* As we are delinking the CTE from main query, we have to walk through the
@ -865,6 +868,9 @@ ConvertRelationRTEIntoSubquery(Query *mergeQuery, RangeTblEntry *sourceRte,
/* replace the function with the constructed subquery */
sourceRte->rtekind = RTE_SUBQUERY;
#if PG_VERSION_NUM >= PG_VERSION_16
sourceRte->perminfoindex = 0;
#endif
sourceRte->subquery = sourceResultsQuery;
sourceRte->inh = false;
}

View File

@ -2196,6 +2196,9 @@ TransformFunctionRTE(RangeTblEntry *rangeTblEntry)
/* replace the function with the constructed subquery */
rangeTblEntry->rtekind = RTE_SUBQUERY;
#if PG_VERSION_NUM >= PG_VERSION_16
rangeTblEntry->perminfoindex = 0;
#endif
rangeTblEntry->subquery = subquery;
}

View File

@ -148,6 +148,9 @@ SetRangeTblExtraData(RangeTblEntry *rte, CitusRTEKind rteKind, char *fragmentSch
fauxFunction->funccolcollations = funcCollations;
rte->rtekind = RTE_FUNCTION;
#if PG_VERSION_NUM >= PG_VERSION_16
rte->perminfoindex = 0;
#endif
rte->functions = list_make1(fauxFunction);
}