Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buHxA-0000K4-7b for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Oct 2016 11:44:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buHx9-0004T3-MM for pgsql-bugs@arkaria.postgresql.org; Wed, 12 Oct 2016 11:44:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buHwV-0003WL-BD for pgsql-bugs@postgresql.org; Wed, 12 Oct 2016 11:43:27 +0000 Received: from nm26-vm4.bullet.mail.ir2.yahoo.com ([212.82.97.46]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buHwS-0000RL-CA for pgsql-bugs@postgresql.org; Wed, 12 Oct 2016 11:43:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1476272602; bh=V6WdbA3DG0vItLEKTHZ0y8/tggz7UIuw32hdejQFUXM=; h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject; b=IFp8//qi4Wv/VJftX9P/tYaeO7fQQXD7rVzDAZqDR0Uum4Isv1EWMZF0g+5R4BdWv+p7lCf7eVxsxb176AWFt8Y1sgCC7qhTXYlk9qa5tdaR0ilL392nNMCwI10mXOJ7fNFDBXRobWIyrq7yzbXtN8tbyKdvQLnVQPeaUb6UfFgVI4UBguJCck4xhJ2KEMFNPQuE8B6AWAyHhEcxAA57mdyMCWkanppTSwc+8TVsUjx/PM6NhirLoDKLbzho40gEfDGim5stStveOwHsb6xNmT+NtipbJOYznuIs6Lyc6ZPuoiBrEiL7CNO/b/rrqFzam7eM+TZR+m6vq7SWYn3ZPg== Received: from [212.82.98.62] by nm26.bullet.mail.ir2.yahoo.com with NNFMP; 12 Oct 2016 11:43:22 -0000 Received: from [212.82.98.85] by tm15.bullet.mail.ir2.yahoo.com with NNFMP; 12 Oct 2016 11:43:22 -0000 Received: from [127.0.0.1] by omp1022.mail.ir2.yahoo.com with NNFMP; 12 Oct 2016 11:43:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 519986.11457.bm@omp1022.mail.ir2.yahoo.com X-YMail-OSG: QJaphLEVM1kkFUIiuhaGhFUppXutSXL7w8fTkt5U4h1pBDJ3_.5M.5m9V6Wjv4O qlhLNKnr4JgeoTSGisjf1.nEahM8k9MyNE6d7.ukK57TB_ZcQvMeLHs9yqb7rE2JMN2F_o77CTBx sVHaJDQrBI2FunqZWODtIoABwgTZmbIdufxHagzGxNG.K6meWf51PuXIruwC2TEfCtvwhBKHuBz_ GW9cDBONMrRP4KpCY4apf1A_lrSKfVQbYRP3oanz_qANwGkRQXRHjMOwoaLpu2ieLxL6HRyJD0XN ztd4QTnWnRz4CvuiXsyLNYyWlLE974eV2rO3GrF1qJLtBmybtccB9wyq.gudMzbwmVo1tgqVzdsk e7.Wx8tV9lAFcF3VJp9kp8gmgE.5mwU3.UW_jwOXjdDOl4.2LQKLTAkROShDLGxXNwvboca5ShuG qy1IbSQnT09UepG8W.be6FnaYfEc2mRBysQQbO57xyXU0lFj8uACLrdjVD_AQC0ahkluswU3NPw7 wFM9iNpxJR7VfwQ.HnUg- Received: from jws700039.mail.ir2.yahoo.com by sendmailws106.mail.ir2.yahoo.com; Wed, 12 Oct 2016 11:43:22 +0000; 1476272602.104 Date: Wed, 12 Oct 2016 11:42:53 +0000 (UTC) From: Tillmann Schulz Reply-To: Tillmann Schulz To: "pgsql-bugs@postgresql.org" Message-ID: <1551770832.7977601.1476272573709@mail.yahoo.com> In-Reply-To: References: <1828260214.7688612.1476267837715.ref@mail.yahoo.com> <1828260214.7688612.1476267837715@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 Content-Length: 1133 X-Pg-Spam-Score: -1.5 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hello again, >>since htere's no SQL in your report, I'd suggest its probably a JDBC >>issue. Yes, I am talking about JDBC-Batch-Update funcionallity in Java. So it could be a jdbc driver issue. Is there a special mailing list for the driver? >>no idea what you mean when you say batch updates... SQL I try to give an example. Preparation, with SQL ----------------------------- CREATE TABLE TESTTABLE (id INTEGER); INSERT INTO TESTTABLE VALUES (5); Java Code with Java JDBC Update ----------------------------- for( int i = 0; i < 10;i++ ) { stmt.addBatch("INSERT INTO TESTTABLE VALUES('"+i+"')" ); stmt.executeBatch(); con.commit(); } catch( java.sql.BatchUpdateException x ) { final int[] updateCounts = x.getUpdateCounts(); } In the sample, the 6th statement has an error, because the value 5 already exists in the database. In this case in postgres 9.6 all fields updateCounts[0..9] are -3 (Statement.EXECUTE_FAILED) The behavior prior 9.6 was, that only the specific entry in updateCounts[5] has the error code -3 I hope this helps, Tillmann Schulz -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs