Re: copy_from does not stop reading after an error - Mailing list psycopg

From Nicolas Grilly
Subject Re: copy_from does not stop reading after an error
Date
Msg-id AANLkTi=5+DHSrtoKK4KhAidaBYLFyK7=CUkMN9eJdap_@mail.gmail.com
Whole thread Raw
In response to Re: copy_from does not stop reading after an error  (Federico Di Gregorio <federico.digregorio@dndg.it>)
Responses Re: copy_from does not stop reading after an error  (Nicolas Grilly <nicolas@gardentechno.com>)
List 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 by date:

Previous
From: Federico Di Gregorio
Date:
Subject: Re: copy_from does not stop reading after an error
Next
From: Daniele Varrazzo
Date:
Subject: At FOSDEM