Skip to content

Commit 9adda98

Browse files
committed
Correct stdin/stdout usage in COPY .. PROGRAM
The COPY documentation incorrectly stated, for the PROGRAM case, that we read from stdin and wrote to stdout. Fix that, and improve consistency by referring to the 'PostgreSQL' user instead of the 'postgres' user, as is done in the rest of the COPY documentation. Pointed out by Peter van Dijk. Back-patch to 9.3 where COPY .. PROGRAM was introduced.
1 parent d72ecc9 commit 9adda98

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

doc/src/sgml/ref/copy.sgml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
7070
<para>
7171
<command>COPY</command> with a file name instructs the
7272
<productname>PostgreSQL</productname> server to directly read from
73-
or write to a file. The file must be accessible to the server and
74-
the name must be specified from the viewpoint of the server. When
75-
<literal>PROGRAM</literal> is specified, the server executes the
76-
given command, and reads from its standard input, or writes to its
77-
standard output. The command must be specified from the viewpoint of the
78-
server, and be executable by the <literal>postgres</> user. When
73+
or write to a file. The file must be accessible by the
74+
<productname>PostgreSQL</productname> user (the user ID the server
75+
runs as) and the name must be specified from the viewpoint of the
76+
server. When <literal>PROGRAM</literal> is specified, the server
77+
executes the given command and reads from the standard output of the
78+
program, or writes to the standard input of the program. The command
79+
must be specified from the viewpoint of the server, and be executable
80+
by the <productname>PostgreSQL</productname> user. When
7981
<literal>STDIN</literal> or <literal>STDOUT</literal> is
8082
specified, data is transmitted via the connection between the
8183
client and the server.

0 commit comments

Comments
 (0)