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

Function sql_inline_error_callback

src/backend/optimizer/util/clauses.c:5023–5039  ·  view source on GitHub ↗

* error context callback to let us supply a call-stack traceback */

Source from the content-addressed store, hash-verified

5021 * error context callback to let us supply a call-stack traceback
5022 */
5023static void
5024sql_inline_error_callback(void *arg)
5025{
5026 inline_error_callback_arg *callback_arg = (inline_error_callback_arg *) arg;
5027 int syntaxerrposition;
5028
5029 /* If it's a syntax error, convert to internal syntax error report */
5030 syntaxerrposition = geterrposition();
5031 if (syntaxerrposition > 0)
5032 {
5033 errposition(0);
5034 internalerrposition(syntaxerrposition);
5035 internalerrquery(callback_arg->prosrc);
5036 }
5037
5038 errcontext("SQL function \"%s\" during inlining", callback_arg->proname);
5039}
5040
5041/*
5042 * evaluate_expr: pre-evaluate a constant expression

Callers

nothing calls this directly

Calls 4

geterrpositionFunction · 0.50
errpositionFunction · 0.50
internalerrpositionFunction · 0.50
internalerrqueryFunction · 0.50

Tested by

no test coverage detected