* Read a boolean expression, return true if the expression * was a valid boolean expression that evaluated to true. * Otherwise return false. * * Note: conditional stack's top state must be active, else lexer will * fail to expand variables and backticks. */
| 2891 | * fail to expand variables and backticks. |
| 2892 | */ |
| 2893 | static bool |
| 2894 | is_true_boolean_expression(PsqlScanState scan_state, const char *name) |
| 2895 | { |
| 2896 | PQExpBuffer buf = gather_boolean_expression(scan_state); |
| 2897 | bool value = false; |
| 2898 | bool success = ParseVariableBool(buf->data, name, &value); |
| 2899 | |
| 2900 | destroyPQExpBuffer(buf); |
| 2901 | return success && value; |
| 2902 | } |
| 2903 | |
| 2904 | /* |
| 2905 | * Read a boolean expression, but do nothing with it. |
no test coverage detected