Currently executing queries like: 

```
SELECT * FROM system.tables LIMIT 10;\G 
SELECT * FROM system.tables LIMIT 10\G;
```

Ends up with a syntax error.

From the documentation, it should not be an error:

> You can specify \G instead of or after the semicolon.


processed_rows = 0;
    written_first_block = false;
    progress_indication.resetProgress(
    profile_events.watch.restart(
    {
        /// Temporarily apply query settings to context.
        std::optional<Settings> old_settings;
        SCOPE_EXIT_SAFE({
            if (old_settings)
                global_context->setSettings(*old_settings
        }
        auto apply_query_settings = [&](const IAST & settings_ast)
        {
            if (!old_settings)
                old_settings.emplace(global_context->getSettingsRef()
            global_context->applySettingsChanges(settings_ast.as<ASTSetQuery>()->changes
        };
        const auto * insert = parsed_query->as<ASTInsertQuery>(
        if (insert && insert->settings_ast)
            apply_query_settings(*insert->settings_ast
        /// FIXME: try to prettify this cast using `as<>()`
        const auto * with_output = dynamic_cast<const ASTQueryWithOutput *>(parsed_query.get()
        if (with_output && with_output->settings_ast)
            apply_query_settings(*with_output->settings_ast
        if (!connection->checkConnected())
            connect(
        ASTPtr input_function;
        if (insert && insert->select)
            insert->tryFindInputFunction(input_function
        bool is_async_insert = global_context->getSettingsRef().async_insert && insert && insert->hasInlinedData(