Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BB5B39FB2EF for ; Mon, 15 Jan 2007 07:14:46 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 42232-09 for ; Mon, 15 Jan 2007 07:14:36 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 4FCC29FB2EE for ; Mon, 15 Jan 2007 07:14:36 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by svr4.postgresql.org (Postfix) with ESMTP id 5CA375AF031 for ; Mon, 15 Jan 2007 11:14:36 +0000 (GMT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l0FBESB8005268 for ; Mon, 15 Jan 2007 06:14:28 -0500 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l0FBERnR001015 for ; Mon, 15 Jan 2007 06:14:27 -0500 Received: from [172.31.7.7] (vpn-4-47.str.redhat.com [10.32.4.47]) by pobox.stuttgart.redhat.com (8.12.8/8.12.8) with ESMTP id l0FBEQe5023127 for ; Mon, 15 Jan 2007 12:14:26 +0100 Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: pgsql-jdbc@postgresql.org From: "Heiko W.Rupp" Subject: executeBatch() and operation after error Date: Mon, 15 Jan 2007 12:13:07 +0100 X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.143 tagged_above=0 required=5 tests=BAYES_50, SPF_FAIL X-Spam-Level: * X-Archive-Number: 200701/94 X-Sequence-Number: 16459 Hi, JDBC 3.0 spec speifies that in 15.1.3 a driver may continue processing statements in a batch if one of the statements throws an error. Is this supported by the current driver? If yes, how can I enable this? I have a use case where most of the time my application would very much benefit from using batches, but where sometimes the data to be inserted is already there. Of course there is the workaround to check for a BatchException and then doing a getUpdateCounts() to fall back inserting everyhing 'by hand'. But obviously it is desirable for e.g. a batch of 10 to only process statement #2 if this is failing and having all other statements be treated by the batching Heiko -- Heiko W.Rupp heiko.rupp@redhat.com, http://www.dpunkt.de/buch/3-89864-429-4.html