---------- * exec_stmt_while Loop over statements as long * as an expression evaluates to * true or an exit occurs. * ---------- */
| 2606 | * ---------- |
| 2607 | */ |
| 2608 | static int |
| 2609 | exec_stmt_while(PLpgSQL_execstate *estate, PLpgSQL_stmt_while *stmt) |
| 2610 | { |
| 2611 | int rc = PLPGSQL_RC_OK; |
| 2612 | |
| 2613 | for (;;) |
| 2614 | { |
| 2615 | bool value; |
| 2616 | bool isnull; |
| 2617 | |
| 2618 | value = exec_eval_boolean(estate, stmt->cond, &isnull); |
| 2619 | exec_eval_cleanup(estate); |
| 2620 | |
| 2621 | if (isnull || !value) |
| 2622 | break; |
| 2623 | |
| 2624 | rc = exec_stmts(estate, stmt->body); |
| 2625 | |
| 2626 | LOOP_RC_PROCESSING(stmt->label, break); |
| 2627 | } |
| 2628 | |
| 2629 | return rc; |
| 2630 | } |
| 2631 | |
| 2632 | |
| 2633 | /* ---------- |
no test coverage detected