From: Jan de Visser <jdevisser@digitalfairway.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
Date: Fri, 14 Jan 2005 14:10:19 -0500
Message-ID: <200501141410.19681.jdevisser@digitalfairway.com> (raw)
In-Reply-To: <20050114185115.37537.qmail@web14201.mail.yahoo.com>
References: <20050114185115.37537.qmail@web14201.mail.yahoo.com>
On January 14, 2005 01:51 pm, j.random.programmer wrote:
[...]
> I was simple catching the exception but not rolling
> back since
> I presumed the rest of the transaction would succeed
> (and
> commit() didn't complain). It's only after playing
> around that I
> realized that the transaction was failing because of
> the earlier
> error.
>
[...]
>
> So maybe, the database folks can do something about
> this in version 8.0. Maybe you can also forward this
> message
> to the core postgres folks ?
>
I *strongly* disagree. As mentioned before, a transaction is supposed to be an
*atomic* unit of work; either it succeeds completely or it's not executed at
all. Consider the canonical example of a transaction: money being tranfered
from one account to another. You don't want one update to be committed if the
other failed.
JdV!!
--
--------------------------------------------------------------
Jan de Visser jdevisser@digitalfairway.com
Baruk Khazad! Khazad ai-menu!
--------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: jdevisser@digitalfairway.com
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
In-Reply-To: <200501141410.19681.jdevisser@digitalfairway.com>
References: <20050114185115.37537.qmail@web14201.mail.yahoo.com> <200501141410.19681.jdevisser@digitalfairway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox