Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV - Mailing list pgsql-bugs

From Tom Lane
Subject Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV
Date
Msg-id 624693.1660486135@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV  (Noah Misch <noah@leadboat.com>)
Responses Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Noah Misch
Date:
Subject: Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV
Next
From: Tom Lane
Date:
Subject: Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation