From: Michael Paesold <mpaesold@gmx.at>
To: Markus Schaber <schabi@logix-tt.com>
To: João Paulo Ribeiro <jp@mobicomp.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Behaviour of setAutoCommit may not be completely correct.
Date: Fri, 31 Mar 2006 14:57:38 +0200
Message-ID: <023601c654c2$b1146410$7801a8c0@zaphod> (raw)
References: <442CFE4E.9000309@mobicomp.com>
<442D0387.3070706@logix-tt.com>
Markus Schaber write:
> João Paulo Ribeiro wrote:
>
> > From the specs: "If the value of auto-commit is changed in the middle
> > of a transaction, the current transaction is committed."
> >
> > The postgresql have a problem with setAutocommit(...): if the value
> > passed (false or true) is the same that was previously set, it just
> > does nothing.
>
> I don't see this as bug, acutally setting the value to the same it had
> previously is not "changing", strictly seen.
The latest javadoc of the Connection interface at
http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html#setAutoCommit(boolean)
has (same for 1.5.0 and 1.4.2):
setAutoCommit:
...
"NOTE: If this method is called during a transaction, the transaction is
committed."
This sentence is completely unambigously stating that calling the method
will commit a running transaction. If the postgresql jdbc driver is in
violation of this, it should be fixed. Otherwise it will break applications
that are written based on the specified semantics.
Best Regards,
Michael Paesold
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: mpaesold@gmx.at, schabi@logix-tt.com, jp@mobicomp.com
Subject: Re: Behaviour of setAutoCommit may not be completely correct.
In-Reply-To: <023601c654c2$b1146410$7801a8c0@zaphod>
References: <442CFE4E.9000309@mobicomp.com> <442D0387.3070706@logix-tt.com> <023601c654c2$b1146410$7801a8c0@zaphod>
* 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