* 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 */
| 1218 | * This is currently not supported and is checked for in the parsing stage |
| 1219 | */ |
| 1220 | static void |
| 1221 | checkSelfRefInRangeSubSelect(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: |
no test coverage detected