* Evaluate a PARAM_EXEC parameter. * * PARAM_EXEC params (internal executor parameters) are stored in the * ecxt_param_exec_vals array, and can be accessed by array index. */
| 2485 | * ecxt_param_exec_vals array, and can be accessed by array index. |
| 2486 | */ |
| 2487 | void |
| 2488 | ExecEvalParamExec(ExprState *state, ExprEvalStep *op, ExprContext *econtext) |
| 2489 | { |
| 2490 | ParamExecData *prm; |
| 2491 | |
| 2492 | prm = &(econtext->ecxt_param_exec_vals[op->d.param.paramid]); |
| 2493 | if (unlikely(prm->execPlan != NULL)) |
| 2494 | { |
| 2495 | /* Parameter not evaluated yet, so go do it */ |
| 2496 | ExecSetParamPlan(prm->execPlan, econtext, NULL); |
| 2497 | /* ExecSetParamPlan should have processed this param... */ |
| 2498 | Assert(prm->execPlan == NULL); |
| 2499 | } |
| 2500 | *op->resvalue = prm->value; |
| 2501 | *op->resnull = prm->isnull; |
| 2502 | } |
| 2503 | |
| 2504 | /* |
| 2505 | * Evaluate a PARAM_EXTERN parameter. |
no test coverage detected