pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.random.programmer <javadesigner@yahoo.com>
To: pg@fastcrypt.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
Date: Fri, 14 Jan 2005 11:54:54 -0800 (PST)
Message-ID: <20050114195454.70368.qmail@web14226.mail.yahoo.com> (raw)
In-Reply-To: <41E81B33.2060208@fastcrypt.com>

> >
> The first insert does not fail, it is the duplicate
> key of the second 
> insert that is the error.

It does fail since the commit() failed silently. There
is nothing in the database at all.
 
> >
> They read this and will probably not respond because
> they do not 
> consider this an error.

But it's contrary to what oracle, db2, sybase (I
think) and 
mysql/innodb do.

It's not documented in the postgresql documentation
either
as far as I can tell.

> This is not a silent failure. The insert errored out
> and gave you a 
> message. commit is basically just end transaction
> here.

But why should a insert error mean that I have to
abort
the entire transaction ? And if so, then the driver
can
warn about that, no ? (especially since the same JDBC
code
runs fine on oracle, db2, mysql/innodb and sybase).
It's
a  postgres specific non-documented thing, so
shouldn't
the JDBC driver warn us as to what's going on ?

Or are you saying that I need to special case JDBC
code
of postgres ?

> The user is supposed to handle the errors, not the
> driver.

But the error is postgresql specific. There is no
error, only
a insert within a transaction failed. Why should that
affect
the rest of the transaction, if *I* as the user don't
want it to?

Best regards,

--j


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 



view thread (22+ messages)  latest in thread

Message-ID: <20050114195454.70368.qmail@web14226.mail.yahoo.com>
Permalink:  ../20050114195454.70368.qmail@web14226.mail.yahoo.com/
Also on:    postgresql.org/message-id/20050114195454.70368.qmail@web14226.mail.yahoo.com

 · 

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: javadesigner@yahoo.com, pg@fastcrypt.com
  Subject: Re: Weird behavior in transaction handling (Possible bug ?) -- commit fails silently
  In-Reply-To: <20050114195454.70368.qmail@web14226.mail.yahoo.com>
  References: <41E81B33.2060208@fastcrypt.com> <20050114195454.70368.qmail@web14226.mail.yahoo.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