summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAndres Freund2014-09-09 20:19:14 +0000
committerAndres Freund2014-09-09 22:08:56 +0000
commit07c8651dd91d5aea38bee268acb582674ca4b5ea (patch)
tree806433b72903df9f2081d563454ae610260d09f0 /doc/src
parent0709b7ee72e4bc71ad07b7120acd117265ab51d0 (diff)
Add new psql help topics, accessible to both --help and \?.
Add --help=<topic> for the commandline, and \? <topic> as a backslash command, to show more help than the invocations without parameters do. "commands", "variables" and "options" currently exist as help topics describing, respectively, backslash commands, psql variables, and commandline switches. Without parameters the help commands show their previous topic. Some further wordsmithing or extending of the added help content might be needed; but there seems little benefit delaying the overall feature further. Author: Pavel Stehule, editorialized by many Reviewed-By: Andres Freund, Petr Jelinek, Fujii Masao, MauMau, Abhijit Menon-Sen and Erik Rijkers. Discussion: CAFj8pRDVGuC-nXBfe2CK8vpyzd2Dsr9GVpbrATAnZO=2YQ0s2Q@mail.gmail.com, CAFj8pRA54AbTv2RXDTRxiAd8hy8wxmoVLqhJDRCwEnhdd7OUkw@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml23
1 files changed, 18 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 29ad1aa275a..aa71674731e 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -560,11 +560,17 @@ EOF
<varlistentry>
<term><option>-?</></term>
- <term><option>--help</></term>
+ <term><option>--help[=<replaceable class="parameter">topic</>]</option></term>
<listitem>
<para>
- Show help about <application>psql</application> command line
- arguments, and exit.
+ Show help about <application>psql</application> and exit. The optional
+ <replaceable class="parameter">topic</> parameter (defaulting
+ to <literal>options</literal>) selects which part of psql is
+ explained: <literal>commands</> describes <application>psql</>'s
+ backslash commands; <literal>options</> describes the commandline
+ switches that can be passed to <application>psql</>;
+ and <literal>variables</> shows help about about psql configuration
+ variables.
</para>
</listitem>
</varlistentry>
@@ -2574,10 +2580,17 @@ testdb=&gt; <userinput>\setenv LESS -imx4F</userinput>
<varlistentry>
- <term><literal>\?</literal></term>
+ <term><literal>\? [ <replaceable class="parameter">topic</> ]</literal></term>
<listitem>
<para>
- Shows help information about the backslash commands.
+ Shows help information. The optional
+ <replaceable class="parameter">topic</> parameter
+ (defaulting to <literal>commands</>) selects which part of psql is
+ explained: <literal>commands</> describes <application>psql</>'s
+ backslash commands; <literal>options</> describes the commandline
+ switches that can be passed to <application>psql</>;
+ and <literal>variables</> shows help about about psql configuration
+ variables.
</para>
</listitem>
</varlistentry>