Skip to content

Commit ae17897

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 9a11df1 commit ae17897

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

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

+23-22
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,8 @@ EOF
616616
determined at compile time.
617617
Since the database server uses the same default, you will not have
618618
to specify the port in most cases. The default user name is your
619-
Unix user name, as is the default database name. Note that you cannot
619+
operating-system user name, as is the default database name.
620+
Note that you cannot
620621
just connect to any database under any user name. Your database
621622
administrator should have informed you about your access rights.
622623
</para>
@@ -1659,14 +1660,14 @@ Tue Oct 26 21:40:57 CEST 1999
16591660

16601661

16611662
<varlistentry>
1662-
<term><literal>\g</literal> [ { <replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable> } ]</term>
1663-
1663+
<term><literal>\g [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1664+
<term><literal>\g [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
16641665
<listitem>
16651666
<para>
1666-
Sends the current query input buffer to the server and
1667+
Sends the current query input buffer to the server, and
16671668
optionally stores the query's output in <replaceable
16681669
class="parameter">filename</replaceable> or pipes the output
1669-
into a separate Unix shell executing <replaceable
1670+
to the shell command <replaceable
16701671
class="parameter">command</replaceable>. The file or command is
16711672
written to only if the query successfully returns zero or more tuples,
16721673
not if the query fails or is a non-data-returning SQL command.
@@ -1680,7 +1681,7 @@ Tue Oct 26 21:40:57 CEST 1999
16801681
</varlistentry>
16811682

16821683
<varlistentry>
1683-
<term><literal>\gset</literal> [ <replaceable class="parameter">prefix</replaceable> ]</term>
1684+
<term><literal>\gset [ <replaceable class="parameter">prefix</replaceable> ]</literal></term>
16841685

16851686
<listitem>
16861687
<para>
@@ -1744,7 +1745,7 @@ hello 10
17441745

17451746

17461747
<varlistentry>
1747-
<term><literal>\H</literal></term>
1748+
<term><literal>\H</literal> or <literal>\html</literal></term>
17481749
<listitem>
17491750
<para>
17501751
Turns on <acronym>HTML</acronym> query output format. If the
@@ -1758,7 +1759,7 @@ hello 10
17581759

17591760

17601761
<varlistentry>
1761-
<term><literal>\i <replaceable class="parameter">filename</replaceable></literal></term>
1762+
<term><literal>\i</literal> or <literal>\include</literal> <replaceable class="parameter">filename</replaceable></term>
17621763
<listitem>
17631764
<para>
17641765
Reads input from the file <replaceable
@@ -1777,7 +1778,7 @@ hello 10
17771778

17781779

17791780
<varlistentry>
1780-
<term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term>
1781+
<term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term>
17811782
<listitem>
17821783
<para>
17831784
The <literal>\ir</> command is similar to <literal>\i</>, but resolves
@@ -1893,15 +1894,15 @@ lo_import 152801
18931894

18941895

18951896
<varlistentry>
1896-
<term><literal>\o</literal> [ {<replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable>} ]</term>
1897-
1897+
<term><literal>\o</literal> or <literal>\out [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1898+
<term><literal>\o</literal> or <literal>\out [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
18981899
<listitem>
18991900
<para>
1900-
Saves future query results to the file <replaceable
1901-
class="parameter">filename</replaceable> or pipes future results
1902-
into a separate Unix shell to execute <replaceable
1903-
class="parameter">command</replaceable>. If no arguments are
1904-
specified, the query output will be reset to the standard output.
1901+
Arranges to save future query results to the file <replaceable
1902+
class="parameter">filename</replaceable> or pipe future results
1903+
to the shell command <replaceable
1904+
class="parameter">command</replaceable>. If no argument is
1905+
specified, the query output is reset to the standard output.
19051906
</para>
19061907

19071908
<para><quote>Query results</quote> includes all tables, command
@@ -1922,7 +1923,7 @@ lo_import 152801
19221923

19231924

19241925
<varlistentry>
1925-
<term><literal>\p</literal></term>
1926+
<term><literal>\p</literal> or <literal>\print</literal></term>
19261927
<listitem>
19271928
<para>
19281929
Print the current query buffer to the standard output.
@@ -2381,7 +2382,7 @@ lo_import 152801
23812382

23822383

23832384
<varlistentry>
2384-
<term><literal>\r</literal></term>
2385+
<term><literal>\r</literal> or <literal>\reset</literal></term>
23852386
<listitem>
23862387
<para>
23872388
Resets (clears) the query buffer.
@@ -2541,12 +2542,12 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
25412542

25422543

25432544
<varlistentry>
2544-
<term><literal>\w</literal> <replaceable class="parameter">filename</replaceable></term>
2545-
<term><literal>\w</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
2545+
<term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term>
2546+
<term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
25462547
<listitem>
25472548
<para>
25482549
Outputs the current query buffer to the file <replaceable
2549-
class="parameter">filename</replaceable> or pipes it to the Unix
2550+
class="parameter">filename</replaceable> or pipes it to the shell
25502551
command <replaceable class="parameter">command</replaceable>.
25512552
</para>
25522553
</listitem>
@@ -2599,7 +2600,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
25992600
<term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term>
26002601
<listitem>
26012602
<para>
2602-
Escapes to a separate Unix shell or executes the Unix command
2603+
Escapes to a separate shell or executes the shell command
26032604
<replaceable class="parameter">command</replaceable>. The
26042605
arguments are not further interpreted; the shell will see them
26052606
as-is. In particular, the variable substitution rules and

0 commit comments

Comments
 (0)