<varlistentry id="app-psql-option-expanded">
<term><option>-x</option></term>
<term><option>--expanded</option></term>
<listitem>
<para>
Turn on the expanded table formatting mode. This is equivalent to
<command>\x</command> or <command>\pset expanded</command>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-option-no-psqlrc">
<term><option>-X</option></term>
<term><option>--no-psqlrc</option></term>
<listitem>
<para>
Do not read the start-up file (neither the system-wide
<filename>psqlrc</filename> file nor the user's
<filename>~/.psqlrc</filename> file).
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-option-field-separator-zero">
<term><option>-z</option></term>
<term><option>--field-separator-zero</option></term>
<listitem>
<para>
Set the field separator for unaligned output to a zero byte. This is
equivalent to <command>\pset fieldsep_zero</command>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-option-record-separator-zero">
<term><option>-0</option></term>
<term><option>--record-separator-zero</option></term>
<listitem>
<para>
Set the record separator for unaligned output to a zero byte. This is
useful for interfacing, for example, with <literal>xargs -0</literal>.
This is equivalent to <command>\pset recordsep_zero</command>.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-option-single-transaction">
<term><option>-1</option></term>
<term><option>--single-transaction</option></term>
<listitem>
<para>
This option can only be used in combination with one or more
<option>-c</option> and/or <option>-f</option> options. It causes
<application>psql</application> to issue a <command>BEGIN</command> command
before the first such option and a <command>COMMIT</command> command after
the last one, thereby wrapping all the commands into a single
transaction. If any of the commands fails and the variable
<varname>ON_ERROR_STOP</varname> was set, a
<command>ROLLBACK</command> command is sent instead. This ensures that
either all the commands complete successfully, or no changes are
applied.
</para>
<para>
If the commands themselves
contain <command>BEGIN</command>, <command>COMMIT</command>,
or <command>ROLLBACK</command>, this option will not have the desired
effects. Also, if an individual command cannot be executed inside a
transaction block, specifying this option will cause the whole
transaction to fail.
</para>
</listitem>
</varlistentry>
<varlistentry id="app-psql-option-help">
<term><option>-?</option></term>
<term><option>--help[=<replaceable class="parameter">topic</replaceable>]</option></term>
<listitem>
<para>
Show help about <application>psql</application> and exit. The optional
<replaceable class="parameter">topic</replaceable> parameter (defaulting
to <literal>options</literal>) selects which part of <application>psql</application> is
explained: <literal>commands</literal> describes <application>psql</application>'s
backslash commands; <literal>options</literal> describes the command-line
options that can be passed to <application>psql</application>;
and <literal>variables</literal> shows help about <application>psql</application> configuration
variables.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Exit Status</title>
<para>
<application>psql</application> returns 0 to the shell if it
finished normally, 1 if a fatal error of its own occurs (e.g., out of memory,
file not found), 2 if