Skip to content

Commit c61e471

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 a986143 commit c61e471

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

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

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

16091610

16101611
<varlistentry>
1611-
<term><literal>\g</literal> [ { <replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable> } ]</term>
1612-
1612+
<term><literal>\g [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1613+
<term><literal>\g [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
16131614
<listitem>
16141615
<para>
1615-
Sends the current query input buffer to the server and
1616+
Sends the current query input buffer to the server, and
16161617
optionally stores the query's output in <replaceable
16171618
class="parameter">filename</replaceable> or pipes the output
1618-
into a separate Unix shell executing <replaceable
1619+
to the shell command <replaceable
16191620
class="parameter">command</replaceable>. A bare
16201621
<literal>\g</literal> is virtually equivalent to a semicolon. A
16211622
<literal>\g</literal> with argument is a <quote>one-shot</quote>
@@ -1649,7 +1650,7 @@ Tue Oct 26 21:40:57 CEST 1999
16491650

16501651

16511652
<varlistentry>
1652-
<term><literal>\H</literal></term>
1653+
<term><literal>\H</literal> or <literal>\html</literal></term>
16531654
<listitem>
16541655
<para>
16551656
Turns on <acronym>HTML</acronym> query output format. If the
@@ -1663,7 +1664,7 @@ Tue Oct 26 21:40:57 CEST 1999
16631664

16641665

16651666
<varlistentry>
1666-
<term><literal>\i <replaceable class="parameter">filename</replaceable></literal></term>
1667+
<term><literal>\i</literal> or <literal>\include</literal> <replaceable class="parameter">filename</replaceable></term>
16671668
<listitem>
16681669
<para>
16691670
Reads input from the file <replaceable
@@ -1682,7 +1683,7 @@ Tue Oct 26 21:40:57 CEST 1999
16821683

16831684

16841685
<varlistentry>
1685-
<term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term>
1686+
<term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term>
16861687
<listitem>
16871688
<para>
16881689
The <literal>\ir</> command is similar to <literal>\i</>, but resolves
@@ -1797,15 +1798,15 @@ lo_import 152801
17971798

17981799

17991800
<varlistentry>
1800-
<term><literal>\o</literal> [ {<replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable>} ]</term>
1801-
1801+
<term><literal>\o</literal> or <literal>\out [ <replaceable class="parameter">filename</replaceable> ]</literal></term>
1802+
<term><literal>\o</literal> or <literal>\out [ |<replaceable class="parameter">command</replaceable> ]</literal></term>
18021803
<listitem>
18031804
<para>
1804-
Saves future query results to the file <replaceable
1805-
class="parameter">filename</replaceable> or pipes future results
1806-
into a separate Unix shell to execute <replaceable
1807-
class="parameter">command</replaceable>. If no arguments are
1808-
specified, the query output will be reset to the standard output.
1805+
Arranges to save future query results to the file <replaceable
1806+
class="parameter">filename</replaceable> or pipe future results
1807+
to the shell command <replaceable
1808+
class="parameter">command</replaceable>. If no argument is
1809+
specified, the query output is reset to the standard output.
18091810
</para>
18101811

18111812
<para><quote>Query results</quote> includes all tables, command
@@ -1826,7 +1827,7 @@ lo_import 152801
18261827

18271828

18281829
<varlistentry>
1829-
<term><literal>\p</literal></term>
1830+
<term><literal>\p</literal> or <literal>\print</literal></term>
18301831
<listitem>
18311832
<para>
18321833
Print the current query buffer to the standard output.
@@ -2243,7 +2244,7 @@ lo_import 152801
22432244

22442245

22452246
<varlistentry>
2246-
<term><literal>\r</literal></term>
2247+
<term><literal>\r</literal> or <literal>\reset</literal></term>
22472248
<listitem>
22482249
<para>
22492250
Resets (clears) the query buffer.
@@ -2403,12 +2404,12 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
24032404

24042405

24052406
<varlistentry>
2406-
<term><literal>\w</literal> <replaceable class="parameter">filename</replaceable></term>
2407-
<term><literal>\w</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
2407+
<term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term>
2408+
<term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term>
24082409
<listitem>
24092410
<para>
24102411
Outputs the current query buffer to the file <replaceable
2411-
class="parameter">filename</replaceable> or pipes it to the Unix
2412+
class="parameter">filename</replaceable> or pipes it to the shell
24122413
command <replaceable class="parameter">command</replaceable>.
24132414
</para>
24142415
</listitem>
@@ -2449,7 +2450,7 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
24492450
<term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term>
24502451
<listitem>
24512452
<para>
2452-
Escapes to a separate Unix shell or executes the Unix command
2453+
Escapes to a separate shell or executes the shell command
24532454
<replaceable class="parameter">command</replaceable>. The
24542455
arguments are not further interpreted; the shell will see them
24552456
as-is.

0 commit comments

Comments
 (0)