v.20.10New Feature

Allow Configurable NULL Representation for TSV Output Format

Allow configurable NULL representation for TSV output format. It is controlled by the setting output_format_tsv_null_representation which is \N by default. This closes #9375. Note that the setting only controls output format and \N is the only supported NULL representation for TSV input format. #14586 (Kruglov Pavel).
Introduced a configurable NULL representation for the TSV output format via the setting output_format_tsv_null_representation, which defaults to \N.

Why it matters

This feature allows users to customize how NULL values are represented when exporting data in TSV format, enabling better integration with different systems or workflows that require specific NULL markers. It solves the limitation of having a fixed NULL representation in TSV output, increasing flexibility and usability.

How to use it

To use this feature, set the output_format_tsv_null_representation setting to your desired string before executing your query or exporting data. For example:

SET output_format_tsv_null_representation = 'NULL';
SELECT * FROM table FORMAT TSV;

Note that this setting only affects TSV output format; the input format only supports \N as the NULL representation.