Skip to content

Commit 38a4a42

Browse files
committed
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.
1 parent 61c7bee commit 38a4a42

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ EOF
180180

181181
<para>
182182
If <replaceable>filename</replaceable> is <literal>-</literal>
183-
(hyphen), then standard input is read.
183+
(hyphen), then standard input is read until an EOF indication
184+
or <command>\q</> meta-command. Note however that Readline
185+
is not used in this case (much as if <option>-n</option> had been
186+
specified).
184187
</para>
185188

186189
<para>
@@ -1764,6 +1767,13 @@ hello 10
17641767
class="parameter">filename</replaceable> and executes it as
17651768
though it had been typed on the keyboard.
17661769
</para>
1770+
<para>
1771+
If <replaceable>filename</replaceable> is <literal>-</literal>
1772+
(hyphen), then standard input is read until an EOF indication
1773+
or <command>\q</> meta-command. This can be used to intersperse
1774+
interactive input with input from files. Note that Readline behavior
1775+
will be used only if it is active at the outermost level.
1776+
</para>
17671777
<note>
17681778
<para>
17691779
If you want to see the lines on the screen as they are read you

0 commit comments

Comments
 (0)