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

Function conditional_stack_push

src/fe_utils/conditional.c:40–50  ·  view source on GitHub ↗

* Create a new conditional branch. */

Source from the content-addressed store, hash-verified

38 * Create a new conditional branch.
39 */
40void
41conditional_stack_push(ConditionalStack cstack, ifState new_state)
42{
43 IfStackElem *p = (IfStackElem *) pg_malloc(sizeof(IfStackElem));
44
45 p->if_state = new_state;
46 p->query_len = -1;
47 p->paren_depth = -1;
48 p->next = cstack->head;
49 cstack->head = p;
50}
51
52/*
53 * Destroy the topmost conditional branch.

Callers 5

HandleSlashCmdsFunction · 0.85
exec_command_ifFunction · 0.85
advanceConnectionStateFunction · 0.85
executeMetaCommandFunction · 0.85
CheckConditionalFunction · 0.85

Calls 1

pg_mallocFunction · 0.85

Tested by

no test coverage detected