Re: bug fix request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug fix request
Дата
Msg-id 9939.1101714577@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bug fix request  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Ответы Re: bug fix request  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Adding Reply-To: to Lists configuration ...
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: bug fix request