Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 33FB19FBD79 for ; Wed, 28 Feb 2007 18:33:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 90792-02 for ; Wed, 28 Feb 2007 18:33:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 8E56F9FBDB9 for ; Wed, 28 Feb 2007 18:33:43 -0400 (AST) Received: (qmail 813 invoked from network); 28 Feb 2007 22:33:41 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.14?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 28 Feb 2007 22:33:41 -0000 In-Reply-To: <200702282041.13013.timp@melati.org> References: <45DAD28A.2010907@enterprisedb.com> <200702282041.13013.timp@melati.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: how to continue using a connection after an error with autocommit=false Date: Wed, 28 Feb 2007 17:33:40 -0500 To: Tim Pizey X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/158 X-Sequence-Number: 16714 On 28-Feb-07, at 3:41 PM, Tim Pizey wrote: > On Tuesday 20 February 2007 10:50, Heikki Linnakangas wrote: >> James Im wrote: >>> I just find out that I cannot continue using a connection when I use >>> autocommit=false and that an sql insert failed. >> >> That's intended behavior in PostgreSQL. > [snip] > This is new behaviour in version 8, I believe. > No, this has been around since 7.x > I think this behaviour is unique to Postgresql? > Possibly > Melati was developed with Postgresql version 6 as the target dbms > back in 2000, since then it has been extended to work with the > other common > dbmsen, but now it looks like it won't work with V8, without quite > a bit of > rework. > > Is this behaviour specified by a standard? > > What are the advantages? > The advantage is that a transaction is atomic. You can continue to use the connection, you simply have to rollback the transaction after the error and start over. You can also use savepoints. > yours > Tim Pizey > > -- > http://melati.org/ - the flower of Java. > > ---------------------------(end of > broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that > your > message can get through to the mailing list cleanly >