Document the long forms of \H \i \ir \o \p \r \w ... apparently, we have
a long and dishonorable history of leaving out the unabbreviated names of
psql backslash commands.
Avoid saying "Unix shell"; we can just say "shell" with equal clarity,
and not leave Windows users wondering whether the feature works for them.
Improve consistency of documentation of \g \o \w metacommands. There's
no reason to use slightly different wording or markup for each one.
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.
- \g [ { filename | |command } ]
-
+ \g [ filename ]
+ \g [ |command ]
- 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
class="parameter">filename or pipes the output
-
into a separate Unix shell executing
+
to the shell command
class="parameter">command. 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.
- \gset [ prefix ]
+ \gset [ prefix ]
- \H
+ \H or \html
Turns on
HTML query output format. If the
- \i filename>
+ \i or \include filename>
Reads input from the file
- \ir filename>
+ \ir or \include_relative filename>
The \ir> command is similar to \i>, but resolves
- \o [ {filename | |command} ]
-
+ \o or \out [ filename ]
+ \o or \out [ |command ]
-
Saves future query results to the file
- class="parameter">filename or pipes future results
-
into a separate Unix shell to execute
- class="parameter">command. If no arguments are
- specified, the query output will be reset to the standard output.
+
Arranges to save future query results to the file
+ class="parameter">filename or pipe future results
+
to the shell command
+ class="parameter">command. If no argument is
+ specified, the query output is reset to the standard output.
Query results
includes all tables, command
- \p
+ \p or \print
Print the current query buffer to the standard output.
- \r
+ \r or \reset
Resets (clears) the query buffer.
- \w filename
- \w |>command
+ \w or \write filename
+ \w or \write |>command
Outputs the current query buffer to the file
- class="parameter">filename or pipes it to the Unix
+ class="parameter">filename or pipes it to the shell
command command.
\! [ command ]
- Escapes to a separate Unix shell or executes the Unix command
+ Escapes to a separate shell or executes the shell command
command. The
arguments are not further interpreted; the shell will see them
as-is. In particular, the variable substitution rules and