* ExecSetParamPlanMulti * * Apply ExecSetParamPlan to evaluate any not-yet-evaluated initplan output * parameters whose ParamIDs are listed in "params". Any listed params that * are not initplan outputs are ignored. * * As with ExecSetParamPlan, any ExprContext belonging to the current EState * can be used, but in principle a shorter-lived ExprContext is better than a * longer-lived one.
| 1487 | * longer-lived one. |
| 1488 | */ |
| 1489 | void |
| 1490 | ExecSetParamPlanMulti(const Bitmapset *params, ExprContext *econtext, QueryDesc *queryDesc) |
| 1491 | { |
| 1492 | int paramid; |
| 1493 | |
| 1494 | paramid = -1; |
| 1495 | while ((paramid = bms_next_member(params, paramid)) >= 0) |
| 1496 | { |
| 1497 | ParamExecData *prm = &(econtext->ecxt_param_exec_vals[paramid]); |
| 1498 | |
| 1499 | if (prm->execPlan != NULL) |
| 1500 | { |
| 1501 | /* Parameter not evaluated yet, so go do it */ |
| 1502 | ExecSetParamPlan(prm->execPlan, econtext, queryDesc); |
| 1503 | /* ExecSetParamPlan should have processed this param... */ |
| 1504 | Assert(prm->execPlan == NULL); |
| 1505 | } |
| 1506 | } |
| 1507 | } |
| 1508 | |
| 1509 | /* |
| 1510 | * Mark an initplan as needing recalculation |
no test coverage detected