Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bwUG0-000564-Qu for pgsql-jdbc@arkaria.postgresql.org; Tue, 18 Oct 2016 13:16:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bwUG0-0005BI-DR for pgsql-jdbc@arkaria.postgresql.org; Tue, 18 Oct 2016 13:16:40 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bwUFV-0004XZ-Km for pgsql-jdbc@postgresql.org; Tue, 18 Oct 2016 13:16:09 +0000 Received: from nm22-vm3.bullet.mail.ir2.yahoo.com ([212.82.97.9]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bwUFS-0007Dd-PY for pgsql-jdbc@postgresql.org; Tue, 18 Oct 2016 13:16:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1476796563; bh=x7GzfeDj5d8mPdF3ndX4G7YW0SX8TSSXA5fVZKpcLpY=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=OlF0O25wrQP2BV/05FhRp0OK7qb4zhqm5IVmxpfOlPg6gym+HyJZuvpmFsSn8q7Pl+lkk4q/SJ7gG4meSrcUMZTnkv0W9UyS8M6NSifwc/I/oZGdTZMDMqREiWQWImz6REC79smuTPt4+QVzIqOzf3E8A/TNXDu8/nlYg174tZXUsEtGOhiepdLv5RDrGXgwcVBS4Tl88/PoyuiumN/CBYUvw3WYIcrEIqdVdg/4xPPQw/GYytDoMyK+f9gPkCJ2Z+cjr8sEEVpn6iKFQsFO2rSVfhu2w5ZoHk2hdtHgsvmJg3/xbPyZShX3J4LZ5B/3rRIQs018TYbPq9nuwpYn1g== Received: from [212.82.98.57] by nm22.bullet.mail.ir2.yahoo.com with NNFMP; 18 Oct 2016 13:16:03 -0000 Received: from [212.82.98.105] by tm10.bullet.mail.ir2.yahoo.com with NNFMP; 18 Oct 2016 13:16:03 -0000 Received: from [127.0.0.1] by omp1042.mail.ir2.yahoo.com with NNFMP; 18 Oct 2016 13:16:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 128690.9848.bm@omp1042.mail.ir2.yahoo.com X-YMail-OSG: zrTWSvoVM1mg9jqpEkOrhvVkbmeySOIvzKfIpO73cgpF9.CBiyKeDCEBwCZcEKy DXJ63jmZoeP2FHE8ANxR1GvAVp9oq9F83CsVyza8jzlqOQsTSjvA4hLrlt915itNiUQ3x_Mmqv7p j0bFCfIUO17XOjNuGrzgRl7XmuUjO_RNnGjDQuYpr0UffjTuetCa7sS0kTO7DJ3l3NoLmXBSmamo 5O7NkiihZm4DFk8cFW7REJsNdAGZiDGKSDnIVJt.jbPilpAJX2KiDUGv7DFvmp9ysyfIIKdYLOlD GgNKNf3m4ol1axMVW84ENPExSVYpKN00oRXmF4IAM9sH6tudmg1IRkVLOgGLh_4nGg4E3Iw1IQfG BYMFFUrWjMBBEgqs2AtMDfFJLYtdoaUKWW.w8.qycGDCoTuzk5o8.JSBdYH01Lepe574vi1jcGfJ AaY.ila_dgu35SSwuEjRJMrjBELZ_9BkRA3NKbk8mm65pRQm2Q5WzprU7asfmBPWBrzRYSzdIlun bRbNXVCdAjvV1RLTr_dI- Received: from jws700024.mail.ir2.yahoo.com by sendmailws164.mail.ir2.yahoo.com; Tue, 18 Oct 2016 13:16:02 +0000; 1476796562.590 Date: Tue, 18 Oct 2016 13:14:58 +0000 (UTC) From: Tillmann Schulz Reply-To: Tillmann Schulz To: "pgsql-jdbc@postgresql.org" Message-ID: <2090140889.4873532.1476796498454@mail.yahoo.com> Subject: Re: Return Codes of BatchUpdateException in PostgreSql 9.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <2090140889.4873532.1476796498454.ref@mail.yahoo.com> Content-Length: 870 X-Pg-Spam-Score: -1.5 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Hi, After debugging my problem with the updateCount in the 9.4.1211 JDBC Driver I found the line in the code which causes the error. It's org.postgresql.jdbc.BatchResultHandler, Line 138 , JDBC Driver postgresql-9.4.1211 @Override public void handleError(SQLException newError) { if (getException() == null) { Arrays.fill(updateCounts, committedRows, updateCounts.length, Statement.EXECUTE_FAILED); //138 <-- BUG //... Before the line "Arrays.fill..." the updateCounts contain the information of the already successfully inserted records [1,1,1,1,1,0,0,0,0,0]. After filling the array with Statement.EXECUTE_FAILED the array contains [-3,-3,-3,-3,-3,-3,-3,-3,-3,-3] This is a not correct. The correct result is [1,1,1,1,1] or [1,1,1,1,1,-3] How to get this bug fixed? Can you rethink your implementation? Thank you for your help, Tillmann -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc