Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9C2A39FBC21 for ; Wed, 11 Jul 2007 10:17:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 74383-07 for ; Wed, 11 Jul 2007 10:17:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by postgresql.org (Postfix) with SMTP id A96DC9FBF40 for ; Wed, 11 Jul 2007 10:17:22 -0300 (ADT) Received: (qmail 7857 invoked by uid 0); 11 Jul 2007 13:17:19 -0000 Received: from 85.115.15.50 by www011.gmx.net with HTTP; Wed, 11 Jul 2007 15:17:19 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" Date: Wed, 11 Jul 2007 15:17:19 +0200 From: "Marcel Steinbach" Message-ID: <20070711131719.313880@gmx.net> MIME-Version: 1.0 Subject: incomplete batch-updates To: pgsql-jdbc@postgresql.org X-Authenticated: #1089297 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1+Jv3x8CueJA4YO2Z7OPtD6xN7Nm3wVxC+ZpK2Ht9 pIhwk7Ei89Xx/CGXmdHx35y2b6g2xe09rs+w== Content-Transfer-Encoding: 7bit X-GMX-UID: Z++hcuk9TiE+QWL+d2Rwb/99ZUVSRFe6 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200707/41 X-Sequence-Number: 17215 Hello, i'm having trouble with batches. When I run into an BatchUpdateException, the table is filled up to a multiple of 256 records (guess, the batch seems to be executed in 256-steps), and, for example, if the Exception was thrown at the 300. statements, the tablesize is 256, and 44 are missing - but: The getUpdateCount() says, that all statements until the Exception (299) affacted "1" row. My code looks something like this: --------------------------------------------------------- PreparedStatement stmt = con.prepareStatement(sql); con.setAutoCommit(true); for (int i = 0; i < objectBuffer.length; i++) { for (int j =0; j < objectBuffer[i].length; j++) { stmt.setObject(j+1, objectBuffer[i][j]); } stmt.addBatch(); } int updateCount[] = { }; try { updateCount = stmt.executeBatch(); } catch (...) { ... --------------------------------------------------------- Some ideas whats wrong? I'm using postgresql-8.1-405.jdbc3. Best Regards Marcel Steinbach