Re: problem with copy_expert on cursor - Mailing list psycopg

From Daniele Varrazzo
Subject Re: problem with copy_expert on cursor
Date
Msg-id AANLkTi=56stUx-QBEa8mf3gGgz8p2_nUX0ssqg-PWePb@mail.gmail.com
Whole thread Raw
In response to Re: problem with copy_expert on cursor  ("Eric Snow" <esnow@verio.net>)
Responses Re: problem with copy_expert on cursor  ("Eric Snow" <esnow@verio.net>)
List psycopg
On Wed, Mar 2, 2011 at 11:19 PM, Eric Snow <esnow@verio.net> wrote:
> If my StringIO object gets a MemoryError, will the cursor's copy_expert
> handle that, or is that the SystemError I am seeing?  Thanks.

I assume you are writing into the StringIO. Yes, it should be handled
(https://github.com/dvarrazzo/psycopg/blob/2_3_2/psycopg/pqpath.c#L1162):
if write() returns a MemoryError the function bails out with the
exception set by write() itself.

-- Daniele

psycopg by date:

Previous
From: Daniele Varrazzo
Date:
Subject: Re: problem with copy_expert on cursor
Next
From: "Eric Snow"
Date:
Subject: Re: problem with copy_expert on cursor