8000 Docs: document that psql's "\i -" means read from stdin. · home201448/postgres@818a680 · GitHub
[go: up one dir, main page]

Skip to content

Commit 818a680

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 a1fb849 commit 818a680

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>
@@ -1752,6 +1755,13 @@ hello 10
17521755
class="parameter">filename</replaceable> and executes it as
17531756
though it had been typed on the keyboard.
17541757
</para>
1758+
<para>
1759+
If <replaceable>filename</replaceable> is <literal>-</literal>
1760+
(hyphen), then standard input is read until an EOF indication
1761+
or <command>\q</> meta-command. This can be used to intersperse
1762+
interactive input with input from files. Note that Readline behavior
1763+
will be used only if it is active at the outermost level.
1764+
</para>
17551765
<note>
17561766
<para>
17571767
If you want to see the lines on the screen as they are read you

0 commit comments

Comments
 (0)
0