MCPcopy Create free account
hub / github.com/apache/cloudberry / exec_eval_boolean

Function exec_eval_boolean

src/pl/plpgsql/src/pl_exec.c:5591–5605  ·  view source on GitHub ↗

---------- * exec_eval_boolean Evaluate an expression, coerce result to bool * * Note we do not do exec_eval_cleanup here; the caller must do it at * some later point. * ---------- */

Source from the content-addressed store, hash-verified

5589 * ----------
5590 */
5591static bool
5592exec_eval_boolean(PLpgSQL_execstate *estate,
5593 PLpgSQL_expr *expr,
5594 bool *isNull)
5595{
5596 Datum exprdatum;
5597 Oid exprtypeid;
5598 int32 exprtypmod;
5599
5600 exprdatum = exec_eval_expr(estate, expr, isNull, &exprtypeid, &exprtypmod);
5601 exprdatum = exec_cast_value(estate, exprdatum, isNull,
5602 exprtypeid, exprtypmod,
5603 BOOLOID, -1);
5604 return DatumGetBool(exprdatum);
5605}
5606
5607/* ----------
5608 * exec_eval_expr Evaluate an expression and return

Callers 5

exec_stmt_ifFunction · 0.85
exec_stmt_caseFunction · 0.85
exec_stmt_whileFunction · 0.85
exec_stmt_exitFunction · 0.85
exec_stmt_assertFunction · 0.85

Calls 3

exec_eval_exprFunction · 0.85
exec_cast_valueFunction · 0.85
DatumGetBoolFunction · 0.85

Tested by

no test coverage detected