From: Jeremy Whiting <jwhiting@redhat.com>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Multi insert statement and getUpdateCount().
Date: Thu, 26 Mar 2015 16:33:29 +0000
Message-ID: <551434D9.6040906@redhat.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: jwhiting@redhat.com
Subject: Re: Multi insert statement and getUpdateCount().
In-Reply-To: <551434D9.6040906@redhat.com>
References: <551434D9.6040906@redhat.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox