aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-01-31 18:35:31 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2015-01-31 18:35:31 -0500
commit03d4655cf137210540eceb341df6526d34770e7f (patch)
tree5c1009adb23257c7d012359d37aeb652cbebd58c
parentcb24cd3f4a244a0c980fd472f07f33adcc47a43e (diff)
downloadpostgresql-03d4655cf137210540eceb341df6526d34770e7f.tar.gz
postgresql-03d4655cf137210540eceb341df6526d34770e7f.zip
Fix documentation of psql's ECHO all mode.
"ECHO all" is ignored for interactive input, and has been for a very long time, though possibly not for as long as the documentation has claimed the opposite. Fix that, and also note that empty lines aren't echoed, which while dubious is another longstanding behavior (it's embedded in our regression test files for one thing). Per bug #12721 from Hans Ginzel. In HEAD, also improve the code comments in this area, and suppress an unnecessary fflush(stdout) when we're not echoing. That would likely be safe to back-patch, but I'll not risk it mere hours before a release wrap.
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 62f23deb25a..6b64cd5362d 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -53,8 +53,8 @@ PostgreSQL documentation
<term><option>--echo-all</></term>
<listitem>
<para>
- Print all input lines to standard output as they are read. This is more
- useful for script processing than interactive mode. This is
+ Print all nonempty input lines to standard output as they are read.
+ (This does not apply to lines read interactively.) This is
equivalent to setting the variable <varname>ECHO</varname> to
<literal>all</literal>.
</para>
@@ -2565,13 +2565,13 @@ bar
<term><varname>ECHO</varname></term>
<listitem>
<para>
- If set to <literal>all</literal>, all lines
- entered from the keyboard or from a script are written to the standard output
- before they are parsed or executed. To select this behavior on program
+ If set to <literal>all</literal>, all nonempty input lines are printed
+ to standard output as they are read. (This does not apply to lines
+ read interactively.) To select this behavior on program
start-up, use the switch <option>-a</option>. If set to
<literal>queries</literal>,
- <application>psql</application> merely prints all queries as
- they are sent to the server. The switch for this is
+ <application>psql</application> prints each query to standard output
+ as it is sent to the server. The switch for this is
<option>-e</option>.
</para>
</listitem>