Re: bug fix request

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bug fix request
Date: 2004-11-29 07:49:37
Message-ID: 9939.1101714577@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Presently you get a million lines of '\N command not recognised' and
> various other random things because if a line of the copy fails due to
> say a FK constraint, or even if the COPY is run in an aborted
> transaction, it tries to execute all the stdin data as actual
> statements.
>>
>> I'd like to see a test case for this in v3 protocol. It was definitely
>> a problem before that, but I thought I fixed it.

> This is with 7.4 and it still does it.... Here is an example:

Hmm. This error is not coming from "a line of the copy", it is occurring
because the COPY command itself fails, and so the server never tells
psql to shift into COPY mode. I'm not sure that a reasonable fix for
this is possible. As a counterexample, if you misspelled COPY as COPZ,
would you expect the software to decide that following lines up to
\. should be ignored? If you manually misentered a COPY command and got
an error, would you be surprised to have psql ignore everything you
typed until you typed \. ? (I can bet we'd get bug reports about that.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2004-11-29 07:58:21 Re: bug fix request
Previous Message Tom Lane 2004-11-29 07:36:10 Re: [HACKERS] Adding Reply-To: <listname> to Lists configuration ...