Home Explore Blog CI



postgresql

6th chunk of `doc/src/sgml/ref/psql-ref.sgml`
678567446905b8cc83d5eca3235602640b9a9c4e126926080000000100000fb4
 class="parameter">separator</replaceable></option></term>
      <term><option>--record-separator=<replaceable class="parameter">separator</replaceable></option></term>
      <listitem>
      <para>
      Use <replaceable class="parameter">separator</replaceable> as the
      record separator for unaligned output. This is equivalent to
      <command>\pset recordsep</command>.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-single-step">
      <term><option>-s</option></term>
      <term><option>--single-step</option></term>
      <listitem>
      <para>
      Run in single-step mode. That means the user is prompted before
      each command is sent to the server, with the option to cancel
      execution as well. Use this to debug scripts.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-single-line">
      <term><option>-S</option></term>
      <term><option>--single-line</option></term>
      <listitem>
      <para>
      Runs in single-line mode where a newline terminates an SQL command, as a
      semicolon does.
      </para>

      <note>
      <para>
      This mode is provided for those who insist on it, but you are not
      necessarily encouraged to use it. In particular, if you mix
      <acronym>SQL</acronym> and meta-commands on a line the order of
      execution might not always be clear to the inexperienced user.
      </para>
      </note>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-tuples-only">
      <term><option>-t</option></term>
      <term><option>--tuples-only</option></term>
      <listitem>
      <para>
      Turn off printing of column names and result row count footers,
      etc. This is equivalent to <command>\t</command> or
      <command>\pset tuples_only</command>.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-table-attr">
      <term><option>-T <replaceable class="parameter">table_options</replaceable></option></term>
      <term><option>--table-attr=<replaceable class="parameter">table_options</replaceable></option></term>
      <listitem>
      <para>
      Specifies options to be placed within the
      <acronym>HTML</acronym> <sgmltag>table</sgmltag> tag. See
      <command>\pset tableattr</command> for details.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-username">
      <term><option>-U <replaceable class="parameter">username</replaceable></option></term>
      <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
      <listitem>
      <para>
      Connect to the database as the user <replaceable
      class="parameter">username</replaceable> instead of the default.
      (You must have permission to do so, of course.)
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-variable">
      <term><option>-v <replaceable class="parameter">assignment</replaceable></option></term>
      <term><option>--set=<replaceable class="parameter">assignment</replaceable></option></term>
      <term><option>--variable=<replaceable class="parameter">assignment</replaceable></option></term>
      <listitem>
      <para>
      Perform a variable assignment, like the <command>\set</command>
      meta-command. Note that you must separate name and value, if
      any, by an equal sign on the command line. To unset a variable,
      leave off the equal sign. To set a variable with an empty value,
      use the equal sign but leave off the value. These assignments are
      done during command line processing, so variables that reflect
      connection state will get overwritten later.
      </para>
      </listitem>
    </varlistentry>

    <varlistentry id="app-psql-option-version">
      <term><option>-V</option></term>
      <term><option>--version</option></term>
      <listitem>
      <para>
      Print the <application>psql</application>

Title: psql Options: -S, -t, -T, -U, -v, -V
Summary
This section details more command-line options for psql: - `-S`: Runs in single-line mode. - `-t`: Turns off printing of column names and row count footers. - `-T`: Specifies options for the HTML <table> tag. - `-U`: Connects to the database as a specified user. - `-v`: Performs a variable assignment. - `-V`: Prints the psql version.