From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: carsten.jahn@bayer.com
Subject: psql -f switch and "COPY ... FROM STDIN"
Date: Mon, 11 May 2020 16:40:16 +0000
Message-ID: <158921521630.649.5234337138274130122@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/12/app-psql.html
Description:
Hi, first of all thanks for the great postgres database and its psql
utility.
Today I had some trouble using "COPY ... FROM STDIN" with CSV data piped
into the psql command, which had the "COPY" sql statement in a separate
file, referenced by the -f switch. In the end, I found out that the -f
switch leads to psql ignoring all stdin - all you get is the output "COPY
0". I think it would be worth documenting this behavior of the -f / --file
switch on the psql documentation page.
Thanks + best regards,
Carsten
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, carsten.jahn@bayer.com
Subject: Re: psql -f switch and "COPY ... FROM STDIN"
In-Reply-To: <158921521630.649.5234337138274130122@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox