From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | SF Postgres <sfpug(at)postgresql(dot)org> |
Subject: | [transactions] soldier on anyway? |
Date: | 2003-11-14 03:33:00 |
Message-ID: | 20031114033300.GC4807@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
Kind people,
I've got a transaction that does a few inserts, but it's OK for one
specific one to fail in a specific way (adding a field that's already
there).
What happens instead of what I expected is:
current transaction is aborted, queries ignored until end of transaction block
What magic do I use to get this behavior not to happen? I'm using
DBD::Pg on 7.3.4, and I make the connection as follows:
$dbh = DBI->connect(
"dbi:Pg:dbname=$dbname"
, $user
, $password
, {
AutoCommit => 0
, RaiseError => 0 # I thought this part did what I want.
, PrintError => 1
}
);
What's going on here, and how do I fix it?
Cheers,
D
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 cell: +1 415 235 3778
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2003-11-14 03:35:38 | Re: [transactions] soldier on anyway? |
Previous Message | David Alban | 2003-11-09 14:25:46 | SIG-BEER-WEST next Saturday 11/15 in Berkeley |