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

Function sql_query_parse_error_callback

src/backend/utils/adt/gp_dump_oids.c:65–78  ·  view source on GitHub ↗

* Error context callback for handling errors in the SQL query passed as * argument to gp_dump_query_oids() */

Source from the content-addressed store, hash-verified

63 * argument to gp_dump_query_oids()
64 */
65static void
66sql_query_parse_error_callback(void *arg)
67{
68 const char *query_text = (const char *) arg;
69 int syntaxerrposition = geterrposition();
70
71 /*
72 * The error is not in the original query. Report the query that was
73 * passed as argument as an "internal query", and the position in it.
74 */
75 errposition(0);
76 internalerrposition(syntaxerrposition);
77 internalerrquery(query_text);
78}
79
80void
81add_proc_oids_for_dump(Oid funcid)

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