| From: | "Scott Marlowe" <smarlowe(at)qwest(dot)net> |
|---|---|
| To: | "Jonathan Barnhart" <jdbarnhart(at)yahoo(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Transaction blocks |
| Date: | 2004-08-10 22:57:49 |
| Message-ID: | 1092178669.27166.344.camel@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amir Zicherman | 2004-08-10 22:58:03 | Re: Locks in functions? |
| Previous Message | Amir Zicherman | 2004-08-10 22:53:33 | Locks in functions? |