* Walk a list of SubPlans (or initPlans, which also use SubPlan nodes). */
| 4393 | * Walk a list of SubPlans (or initPlans, which also use SubPlan nodes). |
| 4394 | */ |
| 4395 | static bool |
| 4396 | planstate_walk_subplans(List *plans, |
| 4397 | bool (*walker) (), |
| 4398 | void *context) |
| 4399 | { |
| 4400 | ListCell *lc; |
| 4401 | |
| 4402 | foreach(lc, plans) |
| 4403 | { |
| 4404 | SubPlanState *sps = lfirst_node(SubPlanState, lc); |
| 4405 | |
| 4406 | if (walker(sps->planstate, context)) |
| 4407 | return true; |
| 4408 | } |
| 4409 | |
| 4410 | return false; |
| 4411 | } |
| 4412 | |
| 4413 | /* |
| 4414 | * Walk the constituent plans of a ModifyTable, Append, MergeAppend, |
no test coverage detected