<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 to. This is
set every time you connect to a database (including program
start-up), but can be changed or unset.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-ignoreeof">
<term><varname>IGNOREEOF</varname></term>
<listitem>
<para>
If set to 1 or less, sending an <acronym>EOF</acronym> character (usually
<keycombo action="simul"><keycap>Control</keycap><keycap>D</keycap></keycombo>)
to an interactive session of <application>psql</application>
will terminate the application. If set to a larger numeric value,
that many consecutive <acronym>EOF</acronym> characters must be typed to
make an interactive session terminate. If the variable is set to a
non-numeric value, it is interpreted as 10. The default is 0.
</para>
<note>
<para>
This feature was shamelessly plagiarized from
<application>Bash</application>.
</para>
</note>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-lastoid">
<term><varname>LASTOID</varname></term>
<listitem>
<para>
The value of the last affected OID, as returned from an
<command>INSERT</command> or <command>\lo_import</command>
command. This variable is only guaranteed to be valid until
after the result of the next <acronym>SQL</acronym> command has
been displayed.
<productname>PostgreSQL</productname> servers since version 12 do not
support OID system columns anymore, thus LASTOID will always be 0
following <command>INSERT</command> when targeting such servers.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-last-error-message">
<term><varname>LAST_ERROR_MESSAGE</varname></term>
<term><varname>LAST_ERROR_SQLSTATE</varname></term>
<listitem>
<para>
The primary error message and associated SQLSTATE code for the most
recent failed query in the current <application>psql</application> session, or
an empty string and <literal>00000</literal> if no error has occurred in
the current session.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-on-error-rollback">
<term>
<varname>ON_ERROR_ROLLBACK</varname>
<indexterm>
<primary>rollback</primary>
<secondary>psql</secondary>
</indexterm>
</term>
<listitem>
<para>
When set to <literal>on</literal>, if a statement in a transaction block
generates an error, the error is ignored and the transaction
continues. When set to <literal>interactive</literal>, such errors are only
ignored in interactive sessions, and not when reading script
files. When set to <literal>off</literal> (the default),