Re: Transaction blocks - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Transaction blocks
Date
Msg-id 1092178669.27166.344.camel@localhost.localdomain
Whole thread Raw
In response to Transaction blocks  (Jonathan Barnhart <jdbarnhart@yahoo.com>)
List pgsql-general
On Tue, 2004-08-10 at 14:45, Jonathan Barnhart wrote:
> Is there a way to continue a transaction after an error?  I've got a
> situation where I have a transaction open and I'm inserting data, but
> some of it could fail on validation.  I want to keep the good stuff,
> leave out the bad, and get the speed of not having to commit every
> record seperately.  For a specific example, I'm importing a list of
> stocks, but some symbols have changed because the list is old, so there
> are invalid symbols in the list that are not found in the master list.
> I want to catch the invalid ones and fix them, but still commit the
> good ones.  Right now I'm committing each record, but it's slow.

That feature (save points / nested transactions) will be in 8.0, which
just entered beta, however, it will still have the issue that you'll be
making a bunch of transactions, so to speak, so the speed likely won't
be better, just the error handling for what you're trying to do.


pgsql-general by date:

Previous
From: Amir Zicherman
Date:
Subject: Re: Locks in functions?
Next
From: Amir Zicherman
Date:
Subject: Locks in functions?