From: Tom Lane <tgl@sss.pgh.pa.us>
To: Noah Misch <noah@leadboat.com>
Cc: Svante Richter <pgsql-bugs@richter.id>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV
Date: Sun, 14 Aug 2022 10:08:55 -0400
Message-ID: <624693.1660486135@sss.pgh.pa.us> (raw)
In-Reply-To: <20220814070053.GA92855@rfd.leadboat.com>
References: <bfcd57e4-8f23-4c3e-a5db-2571d09208e2@beta.fastmail.com>
<20220814070053.GA92855@rfd.leadboat.com>
Noah Misch <noah@leadboat.com> writes:
> The psql documentation says [\copy ... from stdin] looks for "\.". It says
> nothing about doing that for [\copy ... from filename]. I wonder if psql
> should change the filename case to send the whole file to the server, ignoring
> "\." inside. (That is to say, change to match the psql documentation.)
This seems like a sensible solution. The need to use an in-band EOF
marker when reading from the command source file is clear, and there's
no non-kluge way there. But that doesn't mean we should extend it
to separate files. (I'm surprised to realize we do, actually.)
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, noah@leadboat.com, pgsql-bugs@richter.id, pgsql-bugs@lists.postgresql.org
Subject: Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV
In-Reply-To: <624693.1660486135@sss.pgh.pa.us>
* 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