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

Function setup_parser_errposition_callback

src/backend/parser/parse_node.c:144–155  ·  view source on GitHub ↗

* setup_parser_errposition_callback * Arrange for non-parser errors to report an error position * * Sometimes the parser calls functions that aren't part of the parser * subsystem and can't reasonably be passed a ParseState; yet we would * like any errors thrown in those functions to be tagged with a parse * error location. Use this function to set up an error context stack * entry that w

Source from the content-addressed store, hash-verified

142 * cancel_parser_errposition_callback(&pcbstate);
143 */
144void
145setup_parser_errposition_callback(ParseCallbackState *pcbstate,
146 ParseState *pstate, int location)
147{
148 /* Setup error traceback support for ereport() */
149 pcbstate->pstate = pstate;
150 pcbstate->location = location;
151 pcbstate->errcallback.callback = pcb_error_callback;
152 pcbstate->errcallback.arg = (void *) pcbstate;
153 pcbstate->errcallback.previous = error_context_stack;
154 error_context_stack = &pcbstate->errcallback;
155}
156
157/*
158 * Cancel a previously-set-up errposition callback.

Callers 14

transformCreateStmtFunction · 0.85
transformTableLikeClauseFunction · 0.85
coerce_typeFunction · 0.85
coerceSetOpTypesFunction · 0.85
parserOpenTableFunction · 0.85
make_oper_cache_keyFunction · 0.85
make_constFunction · 0.85
ParseFuncOrColumnFunction · 0.85
setTargetTableFunction · 0.85
addTargetToSortListFunction · 0.85
addTargetToGroupListFunction · 0.85
LookupTypeNameExtendedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected