v.24.3Improvement

PrettyCompact Output Format Default in ClickHouse Tools

If stdout is a terminal and the output format is not specified, clickhouse-client and similar tools will use PrettyCompact by default, similarly to the interactive mode. clickhouse-client and clickhouse-local will handle command line arguments for input and output formats in a unified fashion. This closes #61272. #61800 (Alexey Milovidov).
The clickhouse-client and clickhouse-local tools now default to the PrettyCompact output format when writing to a terminal without an explicitly specified format, and they handle input and output format command line arguments in a consistent manner.

Why it matters

This feature improves usability by automatically selecting a human-friendly default output format (PrettyCompact) when the output is a terminal and no format is specified. It also unifies the way clickhouse-client and clickhouse-local process input and output format arguments, simplifying user experience and reducing confusion.

How to use it

When running clickhouse-client or clickhouse-local without specifying an output format and the output is directed to a terminal, the output will use the PrettyCompact format by default. Users can still explicitly set input and output formats using the supported command line arguments for consistent behavior.