---------- * exec_eval_integer Evaluate an expression, coerce result to int4 * * Note we do not do exec_eval_cleanup here; the caller must do it at * some later point. (We do this because the caller may be holding the * results of other, pass-by-reference, expression evaluations, such as * an array value to be subscripted.) * ---------- */
| 5566 | * ---------- |
| 5567 | */ |
| 5568 | static int |
| 5569 | exec_eval_integer(PLpgSQL_execstate *estate, |
| 5570 | PLpgSQL_expr *expr, |
| 5571 | bool *isNull) |
| 5572 | { |
| 5573 | Datum exprdatum; |
| 5574 | Oid exprtypeid; |
| 5575 | int32 exprtypmod; |
| 5576 | |
| 5577 | exprdatum = exec_eval_expr(estate, expr, isNull, &exprtypeid, &exprtypmod); |
| 5578 | exprdatum = exec_cast_value(estate, exprdatum, isNull, |
| 5579 | exprtypeid, exprtypmod, |
| 5580 | INT4OID, -1); |
| 5581 | return DatumGetInt32(exprdatum); |
| 5582 | } |
| 5583 | |
| 5584 | /* ---------- |
| 5585 | * exec_eval_boolean Evaluate an expression, coerce result to bool |
no test coverage detected