* error context callback to let us supply the failing SQL statement's text */
| 1812 | * error context callback to let us supply the failing SQL statement's text |
| 1813 | */ |
| 1814 | static void |
| 1815 | import_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 | } |
nothing calls this directly
no test coverage detected