```
cat /etc/clickhouse-client/conf.d/propmt.xml
<config>
    <prompt_by_server_display_name>
	    <default>{database}@{host} :) </default>
    </prompt_by_server_display_name>
</config>


cat /etc/clickhouse-server/conf.d/default_database.xml
<?xml version="1.0"?>
<yandex>
    <default_database>dw</default_database>
</yandex>

$ clickhouse-client
ClickHouse client version 21.6.5.37 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.6.5 revision 54448.

default@localhost :) select currentDatabase();

SELECT currentDatabase()

Query id: efd2952e-a0d5-4250-be3c-5c3a929d3256

┌─currentDatabase()─┐
│ dw                │
└───────────────────┘
```

now: `default@localhost :)`
expected: `dw@localhost :)`
}
            else if (query_with_output->out_file)
            {
                const auto & format_name = FormatFactory::instance().getFormatFromFileName(out_file);
                if (!format_name.empty())
                    current_format = format_name;
            }
        }
        if (has_vertical_output_suffix)
            current_format = "Vertical";
        bool logs_into_stdout = server_logs_file == "-";
        bool extras_into_stdout = need_render_progress || logs_into_stdout;
        bool select_only_into_file = select_into_file && !select_into_file_and_stdout;
        /// It is not clear how to write progress and logs
        /// intermixed with data with parallel formatting.
        /// It may increase code complexity significantly.
        if (!extras_into_stdout || select_only_into_file)
            output_format = global_context->getOutputFormatParallelIfPossible(
                current_format, out_file_buf ? *out_file_buf : *out_buf, block);
        else
            output_format = global_context->getOutputFormat(
                current_format, out_file_buf ? *out_file_buf : *out_buf, block);
        output_format->setAutoFlush();
    }
}
catch (...)
{
    throw LocalFormatError(getCurrentExceptionMessage(print_stack_trace), getCurrentExceptionCode());
}
void ClientBase::initLogsOutputStream()