Put documentation of backslash commands back in alphabetical order
authorPeter Eisentraut
Sun, 22 May 2011 12:13:17 +0000 (15:13 +0300)
committerPeter Eisentraut
Sun, 22 May 2011 12:13:17 +0000 (15:13 +0300)
doc/src/sgml/ref/psql-ref.sgml

index ac351d32d429c6fc266ec0f96e60e77b2ebc017f..eaf901d328df53925896ed7600b2cf89d2825434 100644 (file)
@@ -730,39 +730,7 @@ testdb=>
       
 
       
-       \cd [ directory ]
-       
-        
-         Changes the current working directory to
-         directory. Without argument, changes
-         to the current user's home directory.
-        
-
-        
-         
-          To print your current working directory, use \! pwd.
-         
-        
-       
-      
-
-      
-        \C [ title ]
-        
-        
-        Sets the title of any tables being printed as the result of a
-        query or unset any such title. This command is equivalent to
-        \pset title 
-        class="parameter">title. (The name of
-        this command derives from caption, as it was
-        previously only used to set the caption in an
-        HTML table.)
-        
-        
-      
-
-      
-        \connect (or \cdbname [ username ] [ host ] [ port ] ]
+        \c or \connect dbname [ username ] [ host ] [ port ] ]
         
         
         Establishes a new connection to a PostgreSQL
@@ -791,6 +759,38 @@ testdb=>
         
       
 
+      
+        \C [ title ]
+        
+        
+        Sets the title of any tables being printed as the result of a
+        query or unset any such title. This command is equivalent to
+        \pset title 
+        class="parameter">title. (The name of
+        this command derives from caption, as it was
+        previously only used to set the caption in an
+        HTML table.)
+        
+        
+      
+
+      
+       \cd [ directory ]
+       
+        
+         Changes the current working directory to
+         directory. Without argument, changes
+         to the current user's home directory.
+        
+
+        
+         
+          To print your current working directory, use \! pwd.
+         
+        
+       
+      
+
       
         \conninfo
         
@@ -1049,14 +1049,30 @@ testdb=>
 
 
       
-        \det[+] [ pattern ]
+        \dE[S+] [ pattern ]
+        \di[S+] [ pattern ]
+        \ds[S+] [ pattern ]
+        \dt[S+] [ pattern ]
+        \dv[S+] [ pattern ]
+
         
         
-        Lists foreign tables (mnemonic: external tables).
+        In this group of commands, the letters E,
+        is,
+        t, and v
+        stand for foreign table, index, sequence, table, and view,
+        respectively.
+        You can specify any or all of
+        these letters, in any order, to obtain a listing of objects
+        of these types.  For example, \dit lists indexes
+        and tables.  If + is
+        appended to the command name, each object is listed with its
+        physical size on disk and its associated description, if any.
         If pattern is
-        specified, only entries whose table name or schema name matches
-        the pattern are listed.  If the form \det+
-        is used, generic options are also displayed.
+        specified, only objects whose names match the pattern are listed.
+        By default, only user-created objects are shown; supply a
+        pattern or the S modifier to include system
+        objects.
         
         
       
@@ -1078,6 +1094,20 @@ testdb=>
       
 
 
+      
+        \det[+] [ pattern ]
+        
+        
+        Lists foreign tables (mnemonic: external tables).
+        If pattern is
+        specified, only entries whose table name or schema name matches
+        the pattern are listed.  If the form \det+
+        is used, generic options are also displayed.
+        
+        
+      
+
+
       
         \deu[+] [ pattern ]
         
@@ -1220,36 +1250,6 @@ testdb=>
       
 
 
-      
-        \di[S+] [ pattern ]
-        \ds[S+] [ pattern ]
-        \dt[S+] [ pattern ]
-        \dv[S+] [ pattern ]
-        \dE[S+] [ pattern ]
-
-        
-        
-        In this group of commands, the letters
-        is,
-        tv, and E
-        stand for index, sequence, table, view, and foreign table,
-        respectively.
-        You can specify any or all of
-        these letters, in any order, to obtain a listing of objects
-        of these types.  For example, \dit lists indexes
-        and tables.  If + is
-        appended to the command name, each object is listed with its
-        physical size on disk and its associated description, if any.
-        If pattern is
-        specified, only objects whose names match the pattern are listed.
-        By default, only user-created objects are shown; supply a
-        pattern or the S modifier to include system
-        objects.
-        
-        
-      
-
-
       
         \dl
         
@@ -1417,7 +1417,7 @@ testdb=>
       
 
       
-        \edit (or \e)   filename   line_number  
+        \e or \edit   filename   line_number  
 
         
         
@@ -1462,6 +1462,30 @@ testdb=>
         
       
 
+      
+        \echo text [ ... ]
+        
+        
+        Prints the arguments to the standard output, separated by one
+        space and followed by a newline. This can be useful to
+        intersperse information in the output of scripts. For example:
+
+=> \echo `date`
+Tue Oct 26 21:40:57 CEST 1999
+
+        If the first argument is an unquoted -n the trailing
+        newline is not written.
+        
+
+        
+        
+        If you use the \o command to redirect your
+        query output you might wish to use \qecho
+        instead of this command.
+        
+        
+        
+      
 
       
         \ef  function_description   line_number   
@@ -1501,32 +1525,6 @@ testdb=>
       
 
 
-      
-        \echo text [ ... ]
-        
-        
-        Prints the arguments to the standard output, separated by one
-        space and followed by a newline. This can be useful to
-        intersperse information in the output of scripts. For example:
-
-=> \echo `date`
-Tue Oct 26 21:40:57 CEST 1999
-
-        If the first argument is an unquoted -n the trailing
-        newline is not written.
-        
-
-        
-        
-        If you use the \o command to redirect your
-        query output you might wish to use \qecho
-        instead of this command.
-        
-        
-        
-      
-
-
       
         \encoding [ encoding ]
 
@@ -1571,7 +1569,7 @@ Tue Oct 26 21:40:57 CEST 1999
       
 
       
-        \help (or \hcommand ]
+        \h or \help command ]
         
         
         Gives syntax help on the specified SQL
@@ -1817,6 +1815,85 @@ lo_import 152801
         
         Adjustable printing options are:
         
+          
+          border
+          
+          
+          The value must be a
+          number. In general, the higher
+          the number the more borders and lines the tables will have,
+          but this depends on the particular format. In
+          HTML format, this will translate directly
+          into the border=... attribute; in the
+          other formats only values 0 (no border), 1 (internal dividing lines),
+          and 2 (table frame) make sense.
+          
+          
+          
+
+          
+          columns
+          
+          
+          Sets the target width for the wrapped format, and also
+          the width limit for determining whether output is wide enough to
+          require the pager.
+          Zero (the default) causes the target width to be controlled by the
+          environment variable COLUMNS, or the detected screen width
+          if COLUMNS is not set.
+          In addition, if columns is zero then the
+          wrapped format only affects screen output.
+          If columns is nonzero then file and pipe output is
+          wrapped to that width as well.
+          
+          
+          
+
+          
+          expanded (or x)
+          
+          
+          If value is specified
+          it must be either on or off
+          which will enable or disable expanded mode.  If 
+          class="parameter">value is omitted the command toggles
+          between regular and expanded mode.
+          When expanded mode is enabled, query results
+          are displayed in two columns, with the column name on the left and
+          the data on the right. This mode is useful if the data wouldn't fit
+          on the screen in the normal horizontal mode.
+          
+          
+          
+
+          
+          fieldsep
+          
+          
+          Specifies the field separator to be used in unaligned output
+          format. That way one can create, for example, tab- or
+          comma-separated output, which other programs might prefer. To
+          set a tab as field separator, type \pset fieldsep
+          '\t'. The default field separator is
+          '|' (a vertical bar).
+          
+          
+          
+
+          
+          footer
+          
+          
+          If value is specified
+          it must be either on or off
+          which will enable or disable display of the table footer
+          (the (n rows) count).
+          If value is omitted the
+          command toggles footer display on or off.
+          
+          
+          
+
           
           format
           
@@ -1863,40 +1940,6 @@ lo_import 152801
           
           
 
-          
-          columns
-          
-          
-          Sets the target width for the wrapped format, and also
-          the width limit for determining whether output is wide enough to
-          require the pager.
-          Zero (the default) causes the target width to be controlled by the
-          environment variable COLUMNS, or the detected screen width
-          if COLUMNS is not set.
-          In addition, if columns is zero then the
-          wrapped format only affects screen output.
-          If columns is nonzero then file and pipe output is
-          wrapped to that width as well.
-          
-          
-          
-
-          
-          border
-          
-          
-          The value must be a
-          number. In general, the higher
-          the number the more borders and lines the tables will have,
-          but this depends on the particular format. In
-          HTML format, this will translate directly
-          into the border=... attribute; in the
-          other formats only values 0 (no border), 1 (internal dividing lines),
-          and 2 (table frame) make sense.
-          
-          
-          
-
           
           linestyle
           
@@ -1951,23 +1994,6 @@ lo_import 152801
           
           
 
-          
-          expanded (or x)
-          
-          
-          If value is specified
-          it must be either on or off
-          which will enable or disable expanded mode.  If 
-          class="parameter">value is omitted the command toggles
-          between regular and expanded mode.
-          When expanded mode is enabled, query results
-          are displayed in two columns, with the column name on the left and
-          the data on the right. This mode is useful if the data wouldn't fit
-          on the screen in the normal horizontal mode.
-          
-          
-          
-
           
           null
           
@@ -1980,34 +2006,6 @@ lo_import 152801
           
           
 
-          
-          fieldsep
-          
-          
-          Specifies the field separator to be used in unaligned output
-          format. That way one can create, for example, tab- or
-          comma-separated output, which other programs might prefer. To
-          set a tab as field separator, type \pset fieldsep
-          '\t'. The default field separator is
-          '|' (a vertical bar).
-          
-          
-          
-
-          
-          footer
-          
-          
-          If value is specified
-          it must be either on or off
-          which will enable or disable display of the table footer
-          (the (n rows) count).
-          If value is omitted the
-          command toggles footer display on or off.
-          
-          
-          
-
           
           numericlocale
           
@@ -2023,39 +2021,36 @@ lo_import 152801
           
 
           
-          recordsep
+          pager
           
           
-          Specifies the record (line) separator to use in unaligned
-          output format. The default is a newline character.
+          Controls use of a pager program for query and psql
+          help output. If the environment variable PAGER
+          is set, the output is piped to the specified program.
+          Otherwise a platform-dependent default (such as
+          more) is used.
           
-          
-          
 
-          
-          tuples_only (or t)
-          
           
-          If value is specified
-          it must be either on or off
-          which will enable or disable tuples-only mode.
-          If value is omitted the
-          command toggles between regular and tuples-only output.
-          Regular output includes extra information such
-          as column headers, titles, and various footers. In tuples-only
-          mode, only actual table data is shown.
+          When the pager option is off, the pager
+          program is not used. When the pager option is
+          on, the pager is used when appropriate, i.e., when the
+          output is to a terminal and will not fit on the screen.
+          The pager option can also be set to always,
+          which causes the pager to be used for all terminal output regardless
+          of whether it fits on the screen.  \pset pager
+          without a value
+          toggles pager use on and off.
           
           
           
 
           
-          title
+          recordsep
           
           
-          Sets the table title for any subsequently printed tables. This
-          can be used to give your output descriptive tags. If no
-          value is given,
-          the title is unset.
+          Specifies the record (line) separator to use in unaligned
+          output format. The default is a newline character.
           
           
           
@@ -2079,26 +2074,29 @@ lo_import 152801
           
 
           
-          pager
+          title
           
           
-          Controls use of a pager program for query and psql
-          help output. If the environment variable PAGER
-          is set, the output is piped to the specified program.
-          Otherwise a platform-dependent default (such as
-          more) is used.
+          Sets the table title for any subsequently printed tables. This
+          can be used to give your output descriptive tags. If no
+          value is given,
+          the title is unset.
           
+          
+          
 
+          
+          tuples_only (or t)
+          
           
-          When the pager option is off, the pager
-          program is not used. When the pager option is
-          on, the pager is used when appropriate, i.e., when the
-          output is to a terminal and will not fit on the screen.
-          The pager option can also be set to always,
-          which causes the pager to be used for all terminal output regardless
-          of whether it fits on the screen.  \pset pager
-          without a value
-          toggles pager use on and off.
+          If value is specified
+          it must be either on or off
+          which will enable or disable tuples-only mode.
+          If value is omitted the
+          command toggles between regular and tuples-only output.
+          Regular output includes extra information such
+          as column headers, titles, and various footers. In tuples-only
+          mode, only actual table data is shown.