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

Function save_query_text_state

src/bin/psql/command.c:2989–2997  ·  view source on GitHub ↗

* Prepare to possibly restore query buffer to its current state * (cf. discard_query_text). * * We need to remember the length of the query buffer, and the lexer's * notion of the parenthesis nesting depth. */

Source from the content-addressed store, hash-verified

2987 * notion of the parenthesis nesting depth.
2988 */
2989static void
2990save_query_text_state(PsqlScanState scan_state, ConditionalStack cstack,
2991 PQExpBuffer query_buf)
2992{
2993 if (query_buf)
2994 conditional_stack_set_query_len(cstack, query_buf->len);
2995 conditional_stack_set_paren_depth(cstack,
2996 psql_scan_get_paren_depth(scan_state));
2997}
2998
2999/*
3000 * Discard any query text absorbed during an inactive conditional branch.

Callers 3

exec_command_ifFunction · 0.85
exec_command_elifFunction · 0.85
exec_command_elseFunction · 0.85

Tested by

no test coverage detected