Re: problem with copy_expert on cursor

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Eric Snow <esnow(at)verio(dot)net>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: problem with copy_expert on cursor
Date: 2011-03-03 00:28:44
Message-ID: AANLkTi=56stUx-QBEa8mf3gGgz8p2_nUX0ssqg-PWePb@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, Mar 2, 2011 at 11:19 PM, Eric Snow <esnow(at)verio(dot)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

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Eric Snow 2011-03-03 00:34:06 Re: problem with copy_expert on cursor
Previous Message Daniele Varrazzo 2011-03-03 00:23:13 Re: problem with copy_expert on cursor