Home Explore Blog CI



postgresql

65th chunk of `doc/src/sgml/ref/psql-ref.sgml`
6bd88fc63aa6dcb2fa4f020912664553f89fcd7c0f9d226a0000000100000fa7
  limited amount of memory is used, regardless of the size of
        the result set.  Settings of 100 to 1000 are commonly used
        when enabling this feature.
        Keep in mind that when using this feature, a query might
        fail after having already displayed some rows.
        </para>

        <tip>
        <para>
        Although you can use any output format with this feature,
        the default <literal>aligned</literal> format tends to look bad
        because each group of <varname>FETCH_COUNT</varname> rows
        will be formatted separately, leading to varying column
        widths across the row groups.  The other output formats work better.
        </para>
        </tip>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-hide-tableam">
        <term><varname>HIDE_TABLEAM</varname></term>
        <listitem>
        <para>
         If this variable is set to <literal>true</literal>, a table's access
         method details are not displayed. This is mainly useful for
         regression tests.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-hide-toast-compression">
        <term><varname>HIDE_TOAST_COMPRESSION</varname></term>
        <listitem>
        <para>
         If this variable is set to <literal>true</literal>, column
         compression method details are not displayed. This is mainly
         useful for regression tests.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-histcontrol">
        <term><varname>HISTCONTROL</varname></term>
        <listitem>
        <para>
         If this variable is set to <literal>ignorespace</literal>,
         lines which begin with a space are not entered into the history
         list. If set to a value of <literal>ignoredups</literal>, lines
         matching the previous history line are not entered. A value of
         <literal>ignoreboth</literal> combines the two options. If
         set to <literal>none</literal> (the default), all lines
         read in interactive mode are saved on the history list.
        </para>
        <note>
        <para>
        This feature was shamelessly plagiarized from
        <application>Bash</application>.
        </para>
        </note>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-histfile">
        <term><varname>HISTFILE</varname></term>
        <listitem>
        <para>
        The file name that will be used to store the history list.  If unset,
        the file name is taken from the <envar>PSQL_HISTORY</envar>
        environment variable.  If that is not set either, the default
        is <filename>~/.psql_history</filename>,
        or <filename>%APPDATA%\postgresql\psql_history</filename> on Windows.
        For example, putting:
<programlisting>
\set HISTFILE ~/.psql_history-:DBNAME
</programlisting>
        in <filename>~/.psqlrc</filename> will cause
        <application>psql</application> to maintain a separate history for
        each database.
        </para>
        <note>
        <para>
        This feature was shamelessly plagiarized from
        <application>Bash</application>.
        </para>
        </note>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-histsize">
        <term><varname>HISTSIZE</varname></term>
        <listitem>
        <para>
        The maximum number of commands to store in the command history
        (default 500).  If set to a negative value, no limit is applied.
        </para>
        <note>
        <para>
        This feature was shamelessly plagiarized from
        <application>Bash</application>.
        </para>
        </note>
        </listitem>
      </varlistentry>

      <varlistentry id="app-psql-variables-host">
        <term><varname>HOST</varname></term>
        <listitem>
        <para>
        The database server host you are currently connected

Title: psql Special Variables: HIDE_TABLEAM, HIDE_TOAST_COMPRESSION, HISTCONTROL, HISTFILE, HISTSIZE, HOST
Summary
This section describes several special variables used by psql. HIDE_TABLEAM hides table access method details, while HIDE_TOAST_COMPRESSION hides column compression method details, mainly useful for regression tests. HISTCONTROL filters commands saved to the history list based on leading spaces or duplicates. HISTFILE sets the file used to store the history list, defaulting to ~/.psql_history or %APPDATA%\postgresql\psql_history on Windows. HISTSIZE limits the number of commands stored in history. Finally, HOST stores the hostname of the currently connected database server.