postgres.git / summary / log / commit / refs
commit 38a4a42197f2b9fd237fc9b3958e602f25ffcd30
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Dec 14 04:42:54 2015 +0000
First released in: 9.6.0, 9.1.20, 9.2.15, 9.3.11, 9.4.6, 9.5.0
Docs: document that psql's "\i -" means read from stdin.
This has worked that way for a long time, maybe always, but you would
not have known it from the documentation. Also back-patch the notes
I added to HEAD earlier today about behavior of the "-f -" switch,
which likewise have been valid for many releases.
doc/src/sgml/ref/psql-ref.sgml | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 4bc9e610a0c..b15f75e7d84 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -180,7 +180,10 @@ EOF
<para>
If <replaceable>filename</replaceable> is <literal>-</literal>
- (hyphen), then standard input is read.
+ (hyphen), then standard input is read until an EOF indication
+ or <command>\q</> meta-command. Note however that Readline
+ is not used in this case (much as if <option>-n</option> had been
+ specified).
</para>
<para>
@@ -1764,6 +1767,13 @@ hello 10
class="parameter">filename</replaceable> and executes it as
though it had been typed on the keyboard.
</para>
+ <para>
+ If <replaceable>filename</replaceable> is <literal>-</literal>
+ (hyphen), then standard input is read until an EOF indication
+ or <command>\q</> meta-command. This can be used to intersperse
+ interactive input with input from files. Note that Readline behavior
+ will be used only if it is active at the outermost level.
+ </para>
<note>
<para>
If you want to see the lines on the screen as they are read you
[parent: 61c7bee2196d]