Correct stdin/stdout usage in COPY .. PROGRAM
authorStephen Frost
Tue, 30 Sep 2014 19:55:28 +0000 (15:55 -0400)
committerStephen Frost
Tue, 30 Sep 2014 20:00:38 +0000 (16:00 -0400)
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.

doc/src/sgml/ref/copy.sgml

index 1ecc939eead4a70860f4fb717abfa13c6294a263..1a7d32e91a373075a3fde3e536a6befb00ee663f 100644 (file)
@@ -70,12 +70,14 @@ COPY { table_name [ ( 
   
    COPY with a file name instructs the
    PostgreSQL server to directly read from
-   or write to a file. The file must be accessible to the server and
-   the name must be specified from the viewpoint of the server. When
-   PROGRAM is specified, the server executes the
-   given command, and reads from its standard input, or writes to its
-   standard output. The command must be specified from the viewpoint of the
-   server, and be executable by the postgres user. When
+   or write to a file. The file must be accessible by the
+   PostgreSQL user (the user ID the server
+   runs as) and the name must be specified from the viewpoint of the
+   server. When PROGRAM is specified, the server
+   executes the given command and reads from the standard output of the
+   program, or writes to the standard input of the program. The command
+   must be specified from the viewpoint of the server, and be executable
+   by the PostgreSQL user.  When
    STDIN or STDOUT is
    specified, data is transmitted via the connection between the
    client and the server.