+ class="parameter">title. (The name of
+ this command derives from caption
, as it was
+ previously only used to set the caption in an
+
+
+
+
+
+ \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
- \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,
+ i, s,
+ 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.
+
+ \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 ]
-
- \di[S+] [ pattern ]
- \ds[S+] [ pattern ]
- \dt[S+] [ pattern ]
- \dv[S+] [ pattern ]
- \dE[S+] [ pattern ]
-
-
- In this group of commands, the letters
- i, s,
- t, v, 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
- \edit> (or \e>) filename> line_number>
+ \e or \edit> filename> line_number>
+
+ \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>
-
- \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 ]
- \help (or \h) [ command ]
+ \h or \help [ command ]
Gives syntax help on the specified
SQL
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
-
- 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
-
- 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
-
- 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
- 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.
- 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.