Re: COPY enhancements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY enhancements
Date
Msg-id 9416.1255453805@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY enhancements  (Emmanuel Cecchet <manu@asterdata.com>)
Responses Re: COPY enhancements
Re: COPY enhancements
List pgsql-hackers
Emmanuel Cecchet <manu@asterdata.com> writes:
> Tom Lane wrote:
>> There aren't any.  You can *not* put a try/catch around arbitrary code
>> without a subtransaction.  Don't even think about it.
>> 
> Well then why the tests provided with the patch are working?

Because they carefully exercise only a tiny fraction of the system.
The key word in my sentence above is "arbitrary".  You don't know what
a datatype input function might try to do, let alone triggers or other
functions that COPY might have to invoke.  They might do things that
need to be cleaned up after, and subtransaction rollback is the only
mechanism we have for that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Client application name
Next
From: Tom Lane
Date:
Subject: Re: Client application name