11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.109 2004/03/30 15:54:33 momjian Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.110 2004/04/12 15:58:52 momjian Exp $
33PostgreSQL documentation
44-->
55
@@ -706,7 +706,7 @@ testdb=>
706706 <term><literal>\copy <replaceable class="parameter">table</replaceable>
707707 [ ( <replaceable class="parameter">column_list</replaceable> ) ]
708708 { <literal>from</literal> | <literal>to</literal> }
709- { <replaceable class="parameter">filename</replaceable> | stdin | stdout | - }
709+ { <replaceable class="parameter">filename</replaceable> | stdin | stdout | pstdin | pstdout }
710710 [ <literal>with</literal> ]
711711 [ <literal>oids</literal> ]
712712 [ <literal>delimiter [as] </literal> '<replaceable class="parameter">character</replaceable>' ]
@@ -736,18 +736,17 @@ testdb=>
736736 </para>
737737
738738 <para>
739- For <literal>\copy <replaceable
739+ <literal>\copy <replaceable
740740 class="parameter">table</replaceable> from <replaceable
741- class="parameter">filename</replaceable></literal> operations,
742- <application>psql</application> adds the option of using a
743- hyphen instead of <replaceable
744- class="parameter">filename</replaceable>. This causes
745- <literal>\copy</literal> to read rows from the same source that
746- issued the command, continuing until <literal>\.</literal> is
747- read or the stream reaches <acronym>EOF</>. This option is
748- useful for populating tables in-line within a SQL script file.
749- In contrast, <literal>\copy from stdin</> always reads from
750- <application>psql</application>'s standard input.
741+ class="parameter">stdin | stdout</replaceable></literal>
742+ reads/writes based on the command input and output respectively.
743+ All rows are read from the same source that issued the command,
744+ continuing until <literal>\.</literal> is read or the stream
745+ reaches <acronym>EOF</>. Output is sent to the same place as
746+ command output. To read/write from
747+ <application>psql</application>'s standard input or output, use
748+ <literal>pstdin</> or <literal>pstdout</>. This option is useful
749+ for populating tables in-line within a SQL script file.
751750 </para>
752751
753752 <tip>
@@ -759,20 +758,6 @@ testdb=>
759758 </para>
760759 </tip>
761760
762- <note>
763- <para>
764- Note the difference in interpretation of
765- <literal>stdin</literal> and <literal>stdout</literal> between
766- <literal>\copy</literal> and <command>COPY</command>.
767- In <literal>\copy</literal> these always
768- refer to <application>psql</application>'s input and output
769- streams. In <command>COPY</command>, <literal>stdin</literal> comes
770- from wherever the <command>COPY</command> itself came from (for
771- example, a script run with the <option>-f</option> option), while
772- <literal>stdout</literal> refers to the query output stream (see
773- <command>\o</command> meta-command below).
774- </para>
775- </note>
776761 </listitem>
777762 </varlistentry>
778763
0 commit comments