Home Explore Blog CI



postgresql

52th chunk of `doc/src/sgml/ref/psql-ref.sgml`
1d95f51c8697ba89ba164131152a29b08b9d2483e17678400000000100000fa9
 <literal>'0.2 0.2 0.6'</literal>.  Unspecified output columns
          use the last specified value.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-title">
          <term><literal>title</literal> (or <literal>C</literal>)</term>
          <listitem>
          <para>
          Sets the table title for any subsequently printed tables. This
          can be used to give your output descriptive tags. If no
          <replaceable class="parameter">value</replaceable> is given,
          the title is unset.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-tuples-only">
          <term><literal>tuples_only</literal> (or <literal>t</literal>)</term>
          <listitem>
          <para>
          If <replaceable class="parameter">value</replaceable> is specified
          it must be either <literal>on</literal> or <literal>off</literal>
          which will enable or disable tuples-only mode.
          If <replaceable class="parameter">value</replaceable> is omitted the
          command toggles between regular and tuples-only output.
          Regular output includes extra information such
          as column headers, titles, and various footers. In tuples-only
          mode, only actual table data is shown.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-unicode-border-linestyle">
          <term><literal>unicode_border_linestyle</literal></term>
          <listitem>
          <para>
          Sets the border drawing style for the <literal>unicode</literal>
          line style to one of <literal>single</literal>
          or <literal>double</literal>.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-unicode-column-linestyle">
          <term><literal>unicode_column_linestyle</literal></term>
          <listitem>
          <para>
          Sets the column drawing style for the <literal>unicode</literal>
          line style to one of <literal>single</literal>
          or <literal>double</literal>.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-unicode-header-linestyle">
          <term><literal>unicode_header_linestyle</literal></term>
          <listitem>
          <para>
          Sets the header drawing style for the <literal>unicode</literal>
          line style to one of <literal>single</literal>
          or <literal>double</literal>.
          </para>
          </listitem>
          </varlistentry>

          <varlistentry id="app-psql-meta-command-pset-xheader-width">
          <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 to the
           width of the first column.
          </para>

          <para>
           <literal>page</literal>: truncate the header line to the terminal
           width.
          </para>

          <para>
           <replaceable class="parameter">integer value</replaceable>: specify
           the exact maximum width of the header line.
          </para>
          </listitem>
          </varlistentry>
        </variablelist>
        </para>

        <para>
        Illustrations of how these different formats look can be seen in
        <xref linkend="app-psql-examples"/>,

Title: psql Meta-Command \pset: title, tuples_only, unicode line styles, and xheader_width
Summary
This section describes the \pset options for controlling output formatting in psql. It covers setting a title for tables, enabling/disabling tuples-only mode, customizing Unicode line styles (border, column, header), and adjusting the maximum width of headers in expanded output with the xheader_width option (full, column, page, or an integer value). Illustrations of these formats can be found in the examples section.