Unix domain socket.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-gt">
<term><literal>%></literal></term>
<listitem><para>The port number at which the database server is listening.</para></listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-n">
<term><literal>%n</literal></term>
<listitem>
<para>
The database session user name. (The expansion of this
value might change during a database session as the result
of the command <command>SET SESSION
AUTHORIZATION</command>.)
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-s">
<term><literal>%s</literal></term>
<listitem><para>The name of the service.</para></listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-slash">
<term><literal>%/</literal></term>
<listitem><para>The name of the current database.</para></listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-tilde">
<term><literal>%~</literal></term>
<listitem><para>Like <literal>%/</literal>, but the output is <literal>~</literal>
(tilde) if the database is your default database.</para></listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-numbersign">
<term><literal>%#</literal></term>
<listitem>
<para>
If the session user is a database superuser, then a
<literal>#</literal>, otherwise a <literal>></literal>.
(The expansion of this value might change during a database
session as the result of the command <command>SET SESSION
AUTHORIZATION</command>.)
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-p">
<term><literal>%p</literal></term>
<listitem>
<para>The process ID of the backend currently connected to.</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-p-uc">
<term><literal>%P</literal></term>
<listitem>
<para>
Pipeline status: <literal>off</literal> when not in a pipeline,
<literal>on</literal> when in an ongoing pipeline or
<literal>abort</literal> when in an aborted pipeline.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-r">
<term><literal>%R</literal></term>
<listitem>
<para>
In prompt 1 normally <literal>=</literal>,
but <literal>@</literal> if the session is in an inactive branch of a
conditional block, or <literal>^</literal> if in single-line mode,
or <literal>!</literal> if the session is disconnected from the
database (which can happen if <command>\connect</command> fails).
In prompt 2 <literal>%R</literal> is replaced by a character that
depends on why <application>psql</application> expects more input:
<literal>-</literal> if the command simply wasn't terminated yet,
but <literal>*</literal> if there is an unfinished
<literal>/* ... */</literal> comment,
a single quote if there is an unfinished quoted string,
a double quote if there is an unfinished quoted identifier,
a dollar sign if there is an unfinished dollar-quoted string,
or <literal>(</literal> if there is an unmatched left parenthesis.
In prompt 3 <literal>%R</literal> doesn't produce anything.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-prompting-x">
<term><literal>%x</literal></term>
<listitem>
<para>
Transaction status: an empty string when not in a transaction
block, or <literal>*</literal> when in a transaction block, or
<literal>!</literal> when in a failed transaction block,