Re: Timely reporting of COPY errors

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Timely reporting of COPY errors
Дата
Msg-id 23259.1208380937@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Timely reporting of COPY errors  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Timely reporting of COPY errors  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Timely reporting of COPY errors  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout <kleptog@svana.org> writes:
> I notice that while doing bulk-loads that any errors detected by the
> backend arn't noticed by libpq until right at the end. Is this
> intentional?

I dunno about "intentional", but the API exposed by libpq for COPY
doesn't really permit any other behavior: you push all the data and
then look to see if it worked or not.

Even if we had some way of letting the application notice that the copy
had already failed, I don't see that psql could do very much with it,
at least not for COPY FROM STDIN.  It's got to read through the source
data anyway or it'll be out of sync with the script file.

We could possibly fix libpq to start dropping the data on the floor
if it sees an error reply already pending, but that's only going
to be an incremental change.
        regards, tom lane


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

Предыдущее
От: "Brendan Jurd"
Дата:
Сообщение: Re: [PATCHES] Text <-> C string
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Lessons from commit fest