mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
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.
This commit is contained in:
parent
c9048d353f
commit
ad48256ba3
@ -53,8 +53,8 @@ PostgreSQL documentation
|
|||||||
<term><option>--echo-all</></term>
|
<term><option>--echo-all</></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Print all input lines to standard output as they are read. This is more
|
Print all nonempty input lines to standard output as they are read.
|
||||||
useful for script processing than interactive mode. This is
|
(This does not apply to lines read interactively.) This is
|
||||||
equivalent to setting the variable <varname>ECHO</varname> to
|
equivalent to setting the variable <varname>ECHO</varname> to
|
||||||
<literal>all</literal>.
|
<literal>all</literal>.
|
||||||
</para>
|
</para>
|
||||||
@ -2703,13 +2703,13 @@ bar
|
|||||||
<term><varname>ECHO</varname></term>
|
<term><varname>ECHO</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If set to <literal>all</literal>, all lines
|
If set to <literal>all</literal>, all nonempty input lines are printed
|
||||||
entered from the keyboard or from a script are written to the standard output
|
to standard output as they are read. (This does not apply to lines
|
||||||
before they are parsed or executed. To select this behavior on program
|
read interactively.) To select this behavior on program
|
||||||
start-up, use the switch <option>-a</option>. If set to
|
start-up, use the switch <option>-a</option>. If set to
|
||||||
<literal>queries</literal>,
|
<literal>queries</literal>,
|
||||||
<application>psql</application> merely prints all queries as
|
<application>psql</application> prints each query to standard output
|
||||||
they are sent to the server. The switch for this is
|
as it is sent to the server. The switch for this is
|
||||||
<option>-e</option>.
|
<option>-e</option>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user