X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 99ABC11F6941 for ; Fri, 31 Mar 2006 08:57:44 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 04961-08 for ; Fri, 31 Mar 2006 08:57:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by postgresql.org (Postfix) with SMTP id E22C111F6671 for ; Fri, 31 Mar 2006 08:57:41 -0400 (AST) Received: (qmail invoked by alias); 31 Mar 2006 12:57:40 -0000 Received: from office01.emerion.com (EHLO zaphod) [83.64.50.26] by mail.gmx.net (mp010) with SMTP; 31 Mar 2006 14:57:40 +0200 X-Authenticated: #1946847 Message-ID: <023601c654c2$b1146410$7801a8c0@zaphod> From: "Michael Paesold" To: "Markus Schaber" , =?iso-8859-1?Q?Jo=E3o_Paulo_Ribeiro?= Cc: References: <442CFE4E.9000309@mobicomp.com> <442D0387.3070706@logix-tt.com> Subject: Re: Behaviour of setAutoCommit may not be completely correct. Date: Fri, 31 Mar 2006 14:57:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-Y-GMX-Trusted: 0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.7 required=5 tests=[AWL=0.700] X-Spam-Score: 0.7 X-Spam-Level: X-Archive-Number: 200603/150 X-Sequence-Number: 14931 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