v.20.5Improvement

Add Output Format Pretty Max Value Width Setting

Add setting "output_format_pretty_max_value_width". If value is longer, it will be cut to avoid output of too large values in terminal. This closes #11140. #11324 (alexey-milovidov).
Added the output_format_pretty_max_value_width setting to limit the maximum width of values in pretty-formatted output, truncating longer values to prevent excessive terminal output size.

Why it matters

This feature addresses the issue of very large values causing overly wide output in terminal displays, which can be difficult to read and manage. By truncating values that exceed a specified width, it improves readability and usability of query results in the terminal.

How to use it

Set the output_format_pretty_max_value_width setting to a desired maximum width (integer) to limit the length of values displayed in pretty formatted output. Values longer than this setting will be cut off. Example:

SET output_format_pretty_max_value_width = 50;
SELECT * FROM table FORMAT Pretty;