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

Function import_error_callback

src/backend/commands/foreigncmds.c:1814–1832  ·  view source on GitHub ↗

* error context callback to let us supply the failing SQL statement's text */

Source from the content-addressed store, hash-verified

1812 * error context callback to let us supply the failing SQL statement's text
1813 */
1814static void
1815import_error_callback(void *arg)
1816{
1817 import_error_callback_arg *callback_arg = (import_error_callback_arg *) arg;
1818 int syntaxerrposition;
1819
1820 /* If it's a syntax error, convert to internal syntax error report */
1821 syntaxerrposition = geterrposition();
1822 if (syntaxerrposition > 0)
1823 {
1824 errposition(0);
1825 internalerrposition(syntaxerrposition);
1826 internalerrquery(callback_arg->cmd);
1827 }
1828
1829 if (callback_arg->tablename)
1830 errcontext("importing foreign table \"%s\"",
1831 callback_arg->tablename);
1832}

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