Skip site navigation (1) Skip section navigation (2)

Re: JDBC squirrely transaction behavior??

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: (view raw, whole thread or download thread mbox)
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.


work:     joachima(at)realtimeint(dot)com  (
private:  joachim(at)kraut(dot)bc(dot)ca       (

In response to

pgsql-interfaces by date

Next:From: Gregory Krasnow OpenSourceCRMDate: 2000-06-05 17:46:18
Subject: RE: Postgres 7.0 JDBC - update count for DELETE is always 1
Previous:From: Steve WamplerDate: 2000-06-05 15:37:44
Subject: Re: JDBC squirrely transaction behavior??

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group