pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vadim Nasardinov <vadimn@redhat.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Weird behavior in transaction handling (Possible bug ?)
Date: Fri, 14 Jan 2005 11:42:54 -0500
Message-ID: <200501141142.54170@vadim.nasardinov> (raw)
In-Reply-To: <41E7F207.6050409@fastcrypt.com>
References: <20050114161304.32600.qmail@web14223.mail.yahoo.com>
	<41E7F207.6050409@fastcrypt.com>

On Friday 14 January 2005 11:23, Dave Cramer wrote:
> With postgres once an error occurs in a transaction block you need
> to rollback. None of the transaction will commit.
> 
> This behaviour makes sense as it assumes that the transaction block
> is atomic and it should all succeed or all fail.

For completeness sake, it should be mentioned that Oracle's way of
dealing with this is no less sensible.  Oracle's transactions are
atomic in the sense that all of the statements that did not raise an
error are committed atomically.  If any of the statements fail,
it's up to the application programmer to decide whether or not it
makes sense to continue with the remaining statements.

This question pops up frequently.  Here's a random example:

http://archives.postgresql.org/pgsql-advocacy/2004-03/threads.php#00067



view thread (22+ messages)  latest in thread

Message-ID: <200501141142.54170@vadim.nasardinov>
Permalink:  ../200501141142.54170@vadim.nasardinov/
Also on:    postgresql.org/message-id/200501141142.54170@vadim.nasardinov

 · 

reply

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: vadimn@redhat.com
  Subject: Re: Weird behavior in transaction handling (Possible bug ?)
  In-Reply-To: <200501141142.54170@vadim.nasardinov>
  References: <20050114161304.32600.qmail@web14223.mail.yahoo.com> <41E7F207.6050409@fastcrypt.com> <200501141142.54170@vadim.nasardinov>

* 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