From: | Joachim Achtzehnter <joachim(at)kraut(dot)bc(dot)ca> |
---|---|
To: | Steve Wampler <swampler(at)noao(dot)edu> |
Cc: | postgres-interfaces <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: JDBC squirrely transaction behavior?? |
Date: | 2000-06-05 16:26:36 |
Message-ID: | Pine.LNX.4.21.0006050919100.19799-100000@penguin.kraut.bc.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Today, in a message to postgres-interfaces, Steve Wampler wrote:
>
> Hmmm, that may cause me a problem in a similar situation - I want to
> do an update whenever an insert fails.
There was a discussion about this in several Postgresql mailing lists a
few weeks ago. Postgresql currently doesn't support statement-level abort
and instead aborts the whole transaction. Apparently, there is a consensus
among the developers that statement-level abort is a good thing to
have. Perhaps we will see it some day...
Even now you can do this trick the other way around: do an update first,
and when the row count is zero insert the row instead. This works because
updating zero rows is not an error in SQL. Not sure whether this helps in
your situation.
Joachim
--
work: joachima(at)realtimeint(dot)com (http://www.realtimeint.com)
private: joachim(at)kraut(dot)bc(dot)ca (http://www.kraut.bc.ca)
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Krasnow OpenSourceCRM | 2000-06-05 17:46:18 | RE: Postgres 7.0 JDBC - update count for DELETE is a lways 1 |
Previous Message | Steve Wampler | 2000-06-05 15:37:44 | Re: JDBC squirrely transaction behavior?? |