From ae17897ce84e545fd5a042530055df728b2ca98f Mon Sep 17 00:00:00 2001 From: Tom Lane <tgl@sss.pgh.pa.us> Date: Mon, 29 Dec 2014 14:20:54 -0500 Subject: [PATCH] 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. --- doc/src/sgml/ref/psql-ref.sgml | 45 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index e7fcc734b53..d29dfa2b87a 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -616,7 +616,8 @@ EOF 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. </para> @@ -1659,14 +1660,14 @@ Tue Oct 26 21:40:57 CEST 1999 <varlistentry> - <term><literal>\g</literal> [ { <replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable> } ]</term> - + <term><literal>\g [ <replaceable class="parameter">filename</replaceable> ]</literal></term> + <term><literal>\g [ |<replaceable class="parameter">command</replaceable> ]</literal></term> <listitem> <para> - 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 <replaceable class="parameter">filename</replaceable> or pipes the output - into a separate Unix shell executing <replaceable + to the shell command <replaceable class="parameter">command</replaceable>. 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. @@ -1680,7 +1681,7 @@ Tue Oct 26 21:40:57 CEST 1999 </varlistentry> <varlistentry> - <term><literal>\gset</literal> [ <replaceable class="parameter">prefix</replaceable> ]</term> + <term><literal>\gset [ <replaceable class="parameter">prefix</replaceable> ]</literal></term> <listitem> <para> @@ -1744,7 +1745,7 @@ hello 10 <varlistentry> - <term><literal>\H</literal></term> + <term><literal>\H</literal> or <literal>\html</literal></term> <listitem> <para> Turns on <acronym>HTML</acronym> query output format. If the @@ -1758,7 +1759,7 @@ hello 10 <varlistentry> - <term><literal>\i <replaceable class="parameter">filename</replaceable></literal></term> + <term><literal>\i</literal> or <literal>\include</literal> <replaceable class="parameter">filename</replaceable></term> <listitem> <para> Reads input from the file <replaceable @@ -1777,7 +1778,7 @@ hello 10 <varlistentry> - <term><literal>\ir <replaceable class="parameter">filename</replaceable></literal></term> + <term><literal>\ir</literal> or <literal>\include_relative</literal> <replaceable class="parameter">filename</replaceable></term> <listitem> <para> The <literal>\ir</> command is similar to <literal>\i</>, but resolves @@ -1893,15 +1894,15 @@ lo_import 152801 <varlistentry> - <term><literal>\o</literal> [ {<replaceable class="parameter">filename</replaceable> | <literal>|</literal><replaceable class="parameter">command</replaceable>} ]</term> - + <term><literal>\o</literal> or <literal>\out [ <replaceable class="parameter">filename</replaceable> ]</literal></term> + <term><literal>\o</literal> or <literal>\out [ |<replaceable class="parameter">command</replaceable> ]</literal></term> <listitem> <para> - Saves future query results to the file <replaceable - class="parameter">filename</replaceable> or pipes future results - into a separate Unix shell to execute <replaceable - class="parameter">command</replaceable>. If no arguments are - specified, the query output will be reset to the standard output. + Arranges to save future query results to the file <replaceable + class="parameter">filename</replaceable> or pipe future results + to the shell command <replaceable + class="parameter">command</replaceable>. If no argument is + specified, the query output is reset to the standard output. </para> <para><quote>Query results</quote> includes all tables, command @@ -1922,7 +1923,7 @@ lo_import 152801 <varlistentry> - <term><literal>\p</literal></term> + <term><literal>\p</literal> or <literal>\print</literal></term> <listitem> <para> Print the current query buffer to the standard output. @@ -2381,7 +2382,7 @@ lo_import 152801 <varlistentry> - <term><literal>\r</literal></term> + <term><literal>\r</literal> or <literal>\reset</literal></term> <listitem> <para> Resets (clears) the query buffer. @@ -2541,12 +2542,12 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <varlistentry> - <term><literal>\w</literal> <replaceable class="parameter">filename</replaceable></term> - <term><literal>\w</literal> <literal>|</><replaceable class="parameter">command</replaceable></term> + <term><literal>\w</literal> or <literal>\write</literal> <replaceable class="parameter">filename</replaceable></term> + <term><literal>\w</literal> or <literal>\write</literal> <literal>|</><replaceable class="parameter">command</replaceable></term> <listitem> <para> Outputs the current query buffer to the file <replaceable - class="parameter">filename</replaceable> or pipes it to the Unix + class="parameter">filename</replaceable> or pipes it to the shell command <replaceable class="parameter">command</replaceable>. </para> </listitem> @@ -2599,7 +2600,7 @@ testdb=> <userinput>\setenv LESS -imx4F</userinput> <term><literal>\! [ <replaceable class="parameter">command</replaceable> ]</literal></term> <listitem> <para> - Escapes to a separate Unix shell or executes the Unix command + Escapes to a separate shell or executes the shell command <replaceable class="parameter">command</replaceable>. The arguments are not further interpreted; the shell will see them as-is. In particular, the variable substitution rules and -- GitLab