just got.)
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-singleline">
<term><varname>SINGLELINE</varname></term>
<listitem>
<para>
Setting this variable to <literal>on</literal> is equivalent to the command
line option <option>-S</option>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-singlestep">
<term><varname>SINGLESTEP</varname></term>
<listitem>
<para>
Setting this variable to <literal>on</literal> is equivalent to the command
line option <option>-s</option>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-sqlstate">
<term><varname>SQLSTATE</varname></term>
<listitem>
<para>
The error code (see <xref linkend="errcodes-appendix"/>) associated
with the last SQL query's failure, or <literal>00000</literal> if it
succeeded.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-user">
<term><varname>USER</varname></term>
<listitem>
<para>
The database user you are currently connected as. 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-verbosity">
<term><varname>VERBOSITY</varname></term>
<listitem>
<para>
This variable can be set to the values <literal>default</literal>,
<literal>verbose</literal>, <literal>terse</literal>,
or <literal>sqlstate</literal> to control the verbosity of error
reports.
(See also <command>\errverbose</command>, for use when you want a verbose
version of the error you just got.)
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-version">
<term><varname>VERSION</varname></term>
<term><varname>VERSION_NAME</varname></term>
<term><varname>VERSION_NUM</varname></term>
<listitem>
<para>
These variables are set at program start-up to reflect
<application>psql</application>'s version, respectively as a verbose string,
a short string (e.g., <literal>9.6.2</literal>, <literal>10.1</literal>,
or <literal>11beta1</literal>), and a number (e.g., <literal>90602</literal>
or <literal>100001</literal>). They can be changed or unset.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-variables-watch-interval">
<term><varname>WATCH_INTERVAL</varname></term>
<listitem>
<para>
This variable sets the default interval which <command>\watch</command>
waits between executing the query. Specifying an interval in the
command overrides this variable.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect3>
<refsect3 id="app-psql-interpolation" xreflabel="SQL Interpolation">
<title><acronym>SQL</acronym> Interpolation</title>
<para>
A key feature of <application>psql</application>
variables is that you can substitute (<quote>interpolate</quote>)
them into regular <acronym>SQL</acronym> statements, as well as the
arguments of meta-commands. Furthermore,
<application>psql</application> provides facilities for
ensuring that variable values used as SQL literals and identifiers are
properly quoted. The syntax for interpolating a value without
any quoting is to prepend the variable name with a colon
(<literal>:</literal>). For example,
<programlisting>
testdb=> <userinput>\set foo 'my_table'</userinput>
testdb=> <userinput>SELECT * FROM :foo;</userinput>
</programlisting>
would query the table <literal>my_table</literal>.