Re: copy_from does not stop reading after an error

Поиск
Список
Период
Сортировка
От Nicolas Grilly
Тема Re: copy_from does not stop reading after an error
Дата
Msg-id AANLkTi=5+DHSrtoKK4KhAidaBYLFyK7=CUkMN9eJdap_@mail.gmail.com
обсуждение исходный текст
Ответ на Re: copy_from does not stop reading after an error  (Federico Di Gregorio <federico.digregorio@dndg.it>)
Ответы Re: copy_from does not stop reading after an error  (Nicolas Grilly <nicolas@gardentechno.com>)
Список psycopg
Thank you Federico for your answer.

I have ran the same script with pg8000, and it does not stop reading after an error either... Maybe it is not a bug, and just a limitation of the PostgreSQL protocol? Maybe the copy from protocol is not designed to return errors in the middle of the data stream, and I just have to split my data stream into many chunks and call copy_from for each chunk?

On Tue, Feb 1, 2011 at 11:48, Federico Di Gregorio <federico.digregorio@dndg.it> wrote:
On 01/02/11 11:24, Nicolas Grilly wrote:
> It looks like copy_from does not stop reading after an error. When the
> input file is short, it is okay. But when the input file is very long,
> it is really boring to wait for the entire file to be read just to
> discover there is an error on the 10th row.

Thank you very much. I just used your email to create a bug report on
Lighthouse:

http://psycopg.lighthouseapp.com/projects/62710-psycopg/tickets/37-copy_from-does-not-stop-reading-after-an-error

federico

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

Предыдущее
От: Federico Di Gregorio
Дата:
Сообщение: Re: copy_from does not stop reading after an error
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: At FOSDEM