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

Function conditional_active

src/fe_utils/conditional.c:127–133  ·  view source on GitHub ↗

* True if we should execute commands normally; that is, the current * conditional branch is active, or there is no open \if block. */

Source from the content-addressed store, hash-verified

125 * conditional branch is active, or there is no open \if block.
126 */
127bool
128conditional_active(ConditionalStack cstack)
129{
130 ifState s = conditional_stack_peek(cstack);
131
132 return s == IFSTATE_NONE || s == IFSTATE_TRUE || s == IFSTATE_ELSE_TRUE;
133}
134
135/*
136 * Save current query buffer length in topmost stack entry.

Callers 7

psql_get_variableFunction · 0.85
HandleSlashCmdsFunction · 0.85
exec_commandFunction · 0.85
exec_command_ifFunction · 0.85
MainLoopFunction · 0.85
get_promptFunction · 0.85
advanceConnectionStateFunction · 0.85

Calls 1

conditional_stack_peekFunction · 0.85

Tested by

no test coverage detected