Skip to content

Commit 964edb5

Browse files
committed
Assorted minor fixes for psql metacommand docs.
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.
1 parent 0e3a1f7 commit 964edb5

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ EOF
598598
determined at compile time.
599599
Since the database server uses the same default, you will not have
600600
to specify the port in most cases. The default user name is your
601-
Unix user name, as is the default database name. Note that you cannot
601+
operating-system user name, as is the default database name.
602+
Note that you cannot
602603
just connect to any database under any user name. Your database
603604
administrator should have informed you about your access rights.
604605
</para>
@@ -1640,14 +1641,14 @@ Tue Oct 26 21:40:57 CEST 1999
16401641

16411642

16421643
<varlistentry>
1643-
<term><literal>\g</literal> [ { <replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable> } ]</term>
1644-
1644+
<term><literal>\g [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1645+
<term><literal>\g [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
16451646
<listitem>
16461647
<para>
1647-
Sends the current query input buffer to the server and
1648+
Sends the current query input buffer to the server, and
16481649
optionally stores the query's output in <replaceable
16491650
class="parameter">filename</replaceable> or pipes the output
1650-
into a separate Unix shell executing <replaceable
1651+
to the shell command <replaceable
16511652
class="parameter">command</replaceable>. The file or command is
16521653
written to only if the query successfully returns zero or more tuples,
16531654
not if the query fails or is a non-data-returning SQL command.
@@ -1661,7 +1662,7 @@ Tue Oct 26 21:40:57 CEST 1999
16611662
</varlistentry>
16621663

16631664
<varlistentry>
1664-
<term><literal>\gset</literal> [ <replaceable class="parameter">prefix</replaceable> ]</term>
1665+
<term><literal>\gset [ <replaceable class="parameter">prefix</replaceable> ]</literal></term>
16651666

16661667
<listitem>
16671668
<para>
@@ -1725,7 +1726,7 @@ hello 10
17251726

17261727

17271728
<varlistentry>
1728-
<term><literal>\H</literal></term>
1729+
<term><literal>\H</literal> or <literal>\html</literal></term>
17291730
<listitem>
17301731
<para>
17311732
Turns on <acronym>HTML</acronym> query output format. If the
@@ -1739,7 +1740,7 @@ hello 10
17391740

17401741

17411742
<varlistentry>
1742-
<term><literal>\i <replaceable class="parameter">filename</replaceable></literal></term>
1743+
<term><literal>\i</literal> or <literal>\include</literal> <replaceable class="parameter">filename</replaceable></term>
17431744
<listitem>
17441745
<para>
17451746
Reads input from the file <replaceable
@@ -1758,7 +1759,7 @@ hello 10
17581759

17591760

17601761
<varlistentry>
1761-
<term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term>
1762+
<term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term>
17621763
<listitem>
17631764
<para>
17641765
The <literal>\ir</> command is similar to <literal>\i</>, but resolves
@@ -1874,15 +1875,15 @@ lo_import 152801
18741875

18751876

18761877
<varlistentry>
1877-
<term><literal>\o</literal> [ {<replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable>} ]</term>
1878-
1878+
<term><literal>\o</literal> or <literal>\out [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1879+
<term><literal>\o</literal> or <literal>\out [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
18791880
<listitem>
18801881
<para>
1881-
Saves future query results to the file <replaceable
1882-
class="parameter">filename</replaceable> or pipes future results
1883-
into a separate Unix shell to execute <replaceable
1884-
class="parameter">command</replaceable>. If no arguments are
1885-
specified, the query output will be reset to the standard output.
1882+
Arranges to save future query results to the file <replaceable
1883+
class="parameter">filename</replaceable> or pipe future results
1884+
to the shell command <replaceable
1885+
class="parameter">command</replaceable>. If no argument is
1886+
specified, the query output is reset to the standard output.
18861887
</para>
18871888

18881889
<para><quote>Query results</quote> includes all tables, command
@@ -1903,7 +1904,7 @@ lo_import 152801
19031904

19041905

19051906
<varlistentry>
1906-
<term><literal>\p</literal></term>
1907+
<term><literal>\p</literal> or <literal>\print</literal></term>
19071908
<listitem>
19081909
<para>
19091910
Print the current query buffer to the standard output.
@@ -2332,7 +2333,7 @@ lo_import 152801
23322333

23332334

23342335
<varlistentry>
2335-
<term><literal>\r</literal></term>
2336+
<term><literal>\r</literal> or <literal>\reset</literal></term>
23362337
<listitem>
23372338
<para>
23382339
Resets (clears) the query buffer.
@@ -2492,12 +2493,12 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
24922493

24932494

24942495
<varlistentry>
2495-
<term><literal>\w</literal> <replaceable class="parameter">filename</replaceable></term>
2496-
<term><literal>\w</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
2496+
<term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term>
2497+
<term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
24972498
<listitem>
24982499
<para>
24992500
Outputs the current query buffer to the file <replaceable
2500-
class="parameter">filename</replaceable> or pipes it to the Unix
2501+
class="parameter">filename</replaceable> or pipes it to the shell
25012502
command <replaceable class="parameter">command</replaceable>.
25022503
</para>
25032504
</listitem>
@@ -2550,7 +2551,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
25502551
<term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term>
25512552
<listitem>
25522553
<para>
2553-
Escapes to a separate Unix shell or executes the Unix command
2554+
Escapes to a separate shell or executes the shell command
25542555
<replaceable class="parameter">command</replaceable>. The
25552556
arguments are not further interpreted; the shell will see them
25562557
as-is. In particular, the variable substitution rules and

0 commit comments

Comments
 (0)