1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Add xheader_width pset option to psql

The setting controls tha maximum length of the header line in expanded
format output. Possible settings are full, column, page, or an integer.
the default is full, the current behaviour, and in this case the header
line is the length of the widest line of output. column causes the
header to be truncated to the width of the first column, page causes it
to be truncated to the width of the terminal page, and an integer causes
it to be truncated to that value. If the full value is less than the
page or integer value no truncation occurs. If given without an argument
this option prints its current setting.

Platon Pronko, somewhat modified by me.

Discussion: https://postgr.es/m/f03d38a3-db96-a56e-d1bc-dbbc80bbde4d@gmail.com
This commit is contained in:
Andrew Dunstan
2022-07-25 14:24:50 -04:00
parent b35617de37
commit a45388d6e0
7 changed files with 164 additions and 18 deletions

View File

@ -2842,6 +2842,39 @@ lo_import 152801
</listitem>
</varlistentry>
<varlistentry>
<term><literal>xheader_width</literal></term>
<listitem>
<para>
Sets the maximum width of the header for expanded output to one of
<literal>full</literal> (the default value),
<literal>column</literal>, <literal>page</literal>, or an
<replaceable class="parameter">integer value</replaceable>.
</para>
<para>
<literal>full</literal>: the expanded header is not truncated,
and will be as wide as the widest output
line.
</para>
<para>
<literal>column</literal>: truncate the header line at the
width of the first column.
</para>
<para>
<literal>page</literal>: truncate the the header line at the terminal
width.
</para>
<para>
<replaceable class="parameter">integer value</replaceable>: specify
the exact maximum width of the header line.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fieldsep</literal></term>
<listitem>