Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YbAj0-0005ub-54 for pgsql-jdbc@arkaria.postgresql.org; Thu, 26 Mar 2015 16:33:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YbAiz-0005EH-Fd for pgsql-jdbc@arkaria.postgresql.org; Thu, 26 Mar 2015 16:33:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YbAiy-0005EA-H1 for pgsql-jdbc@postgresql.org; Thu, 26 Mar 2015 16:33:40 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YbAit-00043q-O8 for pgsql-jdbc@postgresql.org; Thu, 26 Mar 2015 16:33:37 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2QGXXkV012243 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 26 Mar 2015 12:33:33 -0400 Received: from [10.36.116.67] (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2QGXVSI017421 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 26 Mar 2015 12:33:33 -0400 Message-ID: <551434D9.6040906@redhat.com> Date: Thu, 26 Mar 2015 16:33:29 +0000 From: Jeremy Whiting User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "pgsql-jdbc@postgresql.org" Subject: Multi insert statement and getUpdateCount(). Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Pg-Spam-Score: -5.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, I have been testing the current version of pgjdbc master branch. I added a test case to a branch in my repo [1] to check the behaviour when a multi insert statement adds two rows to a table. I found the return value when calling .getUpdateCount() does not equal the number of rows affected. My question is what should the return value for .getUpdateCount() represent. Is it the number of statements executed or rows put in the database ? Regards, Jeremy [1] https://github.com/whitingjr/pgjdbc/tree/updatecount-mismatches-updatecount -- Jeremy Whiting Senior Software Engineer, JBoss Performance Team Red Hat ------------------------------------------------------------ Registered Address: RED HAT UK LIMITED, 64 Baker Street, 4th Floor, Paddington. London. United Kingdom W1U 7DF Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (US), Charles Peters (US), Matt Parson (US) and Michael O'Neill(Ireland) -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc