MCPcopy Create free account
hub / github.com/apache/cloudberry / checkSelfRefInRangeSubSelect

Function checkSelfRefInRangeSubSelect

src/backend/parser/parse_cte.c:1220–1237  ·  view source on GitHub ↗

* Check if a recursive cte is referred to in a RangeSubSelect's SelectStmt. * This is currently not supported and is checked for in the parsing stage */

Source from the content-addressed store, hash-verified

1218 * This is currently not supported and is checked for in the parsing stage
1219 */
1220static void
1221checkSelfRefInRangeSubSelect(SelectStmt *stmt, CteState *cstate)
1222{
1223 ListCell *lc;
1224 RecursionContext cxt = cstate->context;
1225
1226 foreach(lc, stmt->fromClause)
1227 {
1228 if (IsA((Node *) lfirst(lc), RangeSubselect))
1229 {
1230 cstate->context = RECURSION_SUBLINK;
1231 RangeSubselect *rs = (RangeSubselect *) lfirst(lc);
1232 SelectStmt *subquery = (SelectStmt *) rs->subquery;
1233 checkWellFormedSelectStmt(subquery, cstate);
1234 }
1235 }
1236 cstate->context = cxt;
1237}
1238
1239/*
1240 * GPDB:

Callers 1

Calls 2

foreachFunction · 0.50

Tested by

no test coverage detected