Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Svante Richter <pgsql-bugs(at)richter(dot)id>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV
Date: 2022-08-14 14:08:55
Message-ID: 624693.1660486135@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Noah Misch <noah(at)leadboat(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-08-14 14:25:32 Re: BUG #17584: SQL crashes PostgreSQL when using ICU collation
Previous Message Noah Misch 2022-08-14 07:00:53 Re: COPY TO CSV produces data that is incompatible/unsafe for \COPY FROM CSV