]> granicus.if.org Git - postgresql/blobdiff - doc/src/sgml/ref/psql-ref.sgml
Revert "psql: fix \connect with URIs and conninfo strings"
[postgresql] / doc / src / sgml / ref / psql-ref.sgml
index e7fcc734b535226b69df78d3d80d9971317ee059..1f29615f833863f3dec9080caa1dfcc982cc98c6 100644 (file)
@@ -53,8 +53,8 @@ PostgreSQL documentation
       <term><option>--echo-all</></term>
       <listitem>
       <para>
-      Print all input lines to standard output as they are read. This is more
-      useful for script processing than interactive mode. This is
+      Print all nonempty input lines to standard output as they are read.
+      (This does not apply to lines read interactively.) This is
       equivalent to setting the variable <varname>ECHO</varname> to
       <literal>all</literal>.
       </para>
@@ -173,8 +173,7 @@ EOF
       Echo the actual queries generated by <command>\d</command> and other backslash
       commands. You can use this to study <application>psql</application>'s
       internal operations. This is equivalent to
-      setting the variable <varname>ECHO_HIDDEN</varname> from within
-      <application>psql</application>.
+      setting the variable <varname>ECHO_HIDDEN</varname> to <literal>on</>.
       </para>
       </listitem>
     </varlistentry>
@@ -333,8 +332,8 @@ EOF
       quietly. By default, it prints welcome messages and various
       informational output. If this option is used, none of this
       happens. This is useful with the <option>-c</option> option.
-      Within <application>psql</application> you can also set the
-      <varname>QUIET</varname> variable to achieve the same effect.
+      This is equivalent to setting the variable <varname>QUIET</varname>
+      to <literal>on</>.
       </para>
       </listitem>
     </varlistentry>
@@ -616,7 +615,8 @@ EOF
     determined at compile time.
     Since the database server uses the same default, you will not have
     to specify the port in most cases. The default user name is your
-    Unix user name, as is the default database name. Note that you cannot
+    operating-system user name, as is the default database name.
+    Note that you cannot
     just connect to any database under any user name. Your database
     administrator should have informed you about your access rights.
     </para>
@@ -1659,14 +1659,14 @@ Tue Oct 26 21:40:57 CEST 1999
 
 
       <varlistentry>
-        <term><literal>\g</literal> [ { <replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable> } ]</term>
-
+        <term><literal>\g [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
+        <term><literal>\g [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
         <listitem>
         <para>
-        Sends the current query input buffer to the server and
+        Sends the current query input buffer to the server, and
         optionally stores the query's output in <replaceable
         class="parameter">filename</replaceable> or pipes the output
-        into a separate Unix shell executing <replaceable
+        to the shell command <replaceable
         class="parameter">command</replaceable>.  The file or command is
         written to only if the query successfully returns zero or more tuples,
         not if the query fails or is a non-data-returning SQL command.
@@ -1680,7 +1680,7 @@ Tue Oct 26 21:40:57 CEST 1999
       </varlistentry>
 
       <varlistentry>
-        <term><literal>\gset</literal> [ <replaceable class="parameter">prefix</replaceable> ]</term>
+        <term><literal>\gset [ <replaceable class="parameter">prefix</replaceable> ]</literal></term>
 
         <listitem>
         <para>
@@ -1744,7 +1744,7 @@ hello 10
 
 
       <varlistentry>
-        <term><literal>\H</literal></term>
+        <term><literal>\H</literal> or <literal>\html</literal></term>
         <listitem>
         <para>
         Turns on <acronym>HTML</acronym> query output format. If the
@@ -1758,7 +1758,7 @@ hello 10
 
 
       <varlistentry>
-        <term><literal>\i <replaceable class="parameter">filename</replaceable></literal></term>
+        <term><literal>\i</literal> or <literal>\include</literal> <replaceable class="parameter">filename</replaceable></term>
         <listitem>
         <para>
         Reads input from the file <replaceable
@@ -1777,7 +1777,7 @@ hello 10
 
 
       <varlistentry>
-        <term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term>
+        <term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term>
         <listitem>
         <para>
         The <literal>\ir</> command is similar to <literal>\i</>, but resolves
@@ -1893,15 +1893,15 @@ lo_import 152801
 
 
       <varlistentry>
-        <term><literal>\o</literal> [ {<replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable>} ]</term>
-
+        <term><literal>\o</literal> or <literal>\out [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
+        <term><literal>\o</literal> or <literal>\out [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
         <listitem>
         <para>
-        Saves future query results to the file <replaceable
-        class="parameter">filename</replaceable> or pipes future results
-        into a separate Unix shell to execute <replaceable
-        class="parameter">command</replaceable>. If no arguments are
-        specified, the query output will be reset to the standard output.
+        Arranges to save future query results to the file <replaceable
+        class="parameter">filename</replaceable> or pipe future results
+        to the shell command <replaceable
+        class="parameter">command</replaceable>. If no argument is
+        specified, the query output is reset to the standard output.
         </para>
 
         <para><quote>Query results</quote> includes all tables, command
@@ -1922,7 +1922,7 @@ lo_import 152801
 
 
       <varlistentry>
-        <term><literal>\p</literal></term>
+        <term><literal>\p</literal> or <literal>\print</literal></term>
         <listitem>
         <para>
         Print the current query buffer to the standard output.
@@ -2090,7 +2090,7 @@ lo_import 152801
           <para>
           Sets the output format to one of <literal>unaligned</literal>,
           <literal>aligned</literal>, <literal>wrapped</literal>,
-          <literal>html</literal>,
+          <literal>html</literal>, <literal>asciidoc</literal>,
           <literal>latex</literal> (uses <literal>tabular</literal>),
           <literal>latex-longtable</literal>, or
           <literal>troff-ms</literal>.
@@ -2119,7 +2119,7 @@ lo_import 152801
           </para>
 
           <para>
-          The <literal>html</>, <literal>latex</>,
+          The <literal>html</>, <literal>asciidoc</>, <literal>latex</>,
           <literal>latex-longtable</literal>, and <literal>troff-ms</>
           formats put out tables that are intended to
           be included in documents using the respective mark-up
@@ -2235,6 +2235,18 @@ lo_import 152801
           </listitem>
           </varlistentry>
 
+          <varlistentry>
+          <term><literal>pager_min_lines</literal></term>
+          <listitem>
+          <para>
+          If <literal>pager_min_lines</> is set to a number greater than the
+          page height, the pager program will not be called unless there are
+          at least this many lines of output to show. The default setting
+          is 0.
+          </para>
+          </listitem>
+          </varlistentry>
+
           <varlistentry>
           <term><literal>recordsep</literal></term>
           <listitem>
@@ -2381,7 +2393,7 @@ lo_import 152801
 
 
       <varlistentry>
-        <term><literal>\r</literal></term>
+        <term><literal>\r</literal> or <literal>\reset</literal></term>
         <listitem>
         <para>
         Resets (clears) the query buffer.
@@ -2448,7 +2460,7 @@ lo_import 152801
 
 
       <varlistentry>
-        <term><literal>\setenv [ <replaceable class="parameter">name</replaceable> [ <replaceable class="parameter">value</replaceable> ] ]</literal></term>
+        <term><literal>\setenv <replaceable class="parameter">name</replaceable> [ <replaceable class="parameter">value</replaceable> ]</literal></term>
 
         <listitem>
         <para>
@@ -2541,12 +2553,12 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
 
 
       <varlistentry>
-        <term><literal>\w</literal> <replaceable class="parameter">filename</replaceable></term>
-        <term><literal>\w</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
+        <term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term>
+        <term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
         <listitem>
         <para>
         Outputs the current query buffer to the file <replaceable
-        class="parameter">filename</replaceable> or pipes it to the Unix
+        class="parameter">filename</replaceable> or pipes it to the shell
         command <replaceable class="parameter">command</replaceable>.
         </para>
         </listitem>
@@ -2599,7 +2611,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
         <term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term>
         <listitem>
         <para>
-        Escapes to a separate Unix shell or executes the Unix command
+        Escapes to a separate shell or executes the shell command
         <replaceable class="parameter">command</replaceable>. The
         arguments are not further interpreted; the shell will see them
         as-is.  In particular, the variable substitution rules and
@@ -2863,14 +2875,14 @@ bar
         <term><varname>ECHO</varname></term>
         <listitem>
         <para>
-        If set to <literal>all</literal>, all lines
-        entered from the keyboard or from a script are written to the standard output
-        before they are parsed or executed. To select this behavior on program
+        If set to <literal>all</literal>, all nonempty input lines are printed
+        to standard output as they are read.  (This does not apply to lines
+        read interactively.)  To select this behavior on program
         start-up, use the switch <option>-a</option>. If set to
         <literal>queries</literal>,
-        <application>psql</application> merely prints all queries as
-        they are sent to the server. The switch for this is
-        <option>-e</option>. If set to <literal>errors</literal> then only
+        <application>psql</application> prints each query to standard output
+        as it is sent to the server. The switch for this is
+        <option>-e</option>. If set to <literal>errors</literal>, then only
         failed queries are displayed on standard error output. The switch
         for this is <option>-b</option>. If unset, or if set to
         <literal>none</literal> (or any other value than those above) then
@@ -2883,8 +2895,9 @@ bar
         <term><varname>ECHO_HIDDEN</varname></term>
         <listitem>
         <para>
-        When this variable is set and a backslash command queries the
-        database, the query is first shown. This way you can study the
+        When this variable is set to <literal>on</> and a backslash command
+        queries the database, the query is first shown.
+        This feature helps you to study
         <productname>PostgreSQL</productname> internals and provide
         similar functionality in your own programs. (To select this behavior
         on program start-up, use the switch <option>-E</option>.)  If you set
@@ -3045,16 +3058,16 @@ bar
       </term>
         <listitem>
         <para>
-        When <literal>on</>, if a statement in a transaction block
+        When set to <literal>on</>, if a statement in a transaction block
         generates an error, the error is ignored and the transaction
-        continues. When <literal>interactive</>, such errors are only
+        continues. When set to <literal>interactive</>, such errors are only
         ignored in interactive sessions, and not when reading script
-        files. When <literal>off</> (the default), a statement in a
+        files. When unset or set to <literal>off</>, a statement in a
         transaction block that generates an error aborts the entire
-        transaction. The on_error_rollback-on mode works by issuing an
+        transaction. The error rollback mode works by issuing an
         implicit <command>SAVEPOINT</> for you, just before each command
-        that is in a transaction block, and rolls back to the savepoint
-        on error.
+        that is in a transaction block, and then rolling back to the
+        savepoint if the command fails.
         </para>
         </listitem>
       </varlistentry>
@@ -3064,7 +3077,8 @@ bar
         <listitem>
         <para>
         By default, command processing continues after an error.  When this
-        variable is set, it will instead stop immediately.  In interactive mode,
+        variable is set to <literal>on</>, processing will instead stop
+        immediately.  In interactive mode,
         <application>psql</application> will return to the command prompt;
         otherwise, <application>psql</application> will exit, returning
         error code 3 to distinguish this case from fatal error
@@ -3106,8 +3120,8 @@ bar
         <term><varname>QUIET</varname></term>
         <listitem>
         <para>
-        This variable is equivalent to the command line option
-        <option>-q</option>. It is probably not too useful in
+        Setting this variable to <literal>on</> is equivalent to the command
+        line option <option>-q</option>. It is probably not too useful in
         interactive mode.
         </para>
         </listitem>
@@ -3117,8 +3131,8 @@ bar
         <term><varname>SINGLELINE</varname></term>
         <listitem>
         <para>
-        This variable is equivalent to the command line option
-        <option>-S</option>.
+        Setting this variable to <literal>on</> is equivalent to the command
+        line option <option>-S</option>.
         </para>
         </listitem>
       </varlistentry>
@@ -3127,8 +3141,8 @@ bar
         <term><varname>SINGLESTEP</varname></term>
         <listitem>
         <para>
-        This variable is equivalent to the command line option
-        <option>-s</option>.
+        Setting this variable to <literal>on</> is equivalent to the command
+        line option <option>-s</option>.
         </para>
         </listitem>
       </varlistentry>