Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtiWW-0008R7-F5 for pgsql-jdbc@arkaria.postgresql.org; Fri, 11 Jan 2013 17:36:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TtiWV-0007A1-Gv for pgsql-jdbc@arkaria.postgresql.org; Fri, 11 Jan 2013 17:36:07 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtiWV-00079t-0H; Fri, 11 Jan 2013 17:36:07 +0000 Received: from mailfront2.rz.tu-bs.de ([134.169.12.133] helo=tu-bs.de) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TtiWR-0000x6-Ik; Fri, 11 Jan 2013 17:36:06 +0000 Received: from [91.9.222.31] (account y0014032@tu-braunschweig.de HELO [192.168.178.43]) by rz.tu-bs.de (CommuniGate Pro SMTP 5.4.8) with ESMTPA id 17327425; Fri, 11 Jan 2013 18:36:01 +0100 Message-ID: <50F04D82.7020202@tu-braunschweig.de> Date: Fri, 11 Jan 2013 18:36:02 +0100 From: Stefan Reiser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 SeaMonkey/2.14.1 MIME-Version: 1.0 To: Kris Jurka CC: Dave Cramer , Tom Lane , zelaine@amazon.com, pgsql-bugs@postgresql.org, List Subject: Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception References: <17929.1356108458@sss.pgh.pa.us> <6059.1356121026@sss.pgh.pa.us> <50F03093.6060005@tu-braunschweig.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -4.2 (----) 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 Kris Jurka schrieb: > > On Fri, 11 Jan 2013, Dave Cramer wrote: > >> Ok, I've pushed this fix into master >> > You've made any failure to parse the affected row count return > SUCCESS_NO_INFO. Shouldn't you change the integer parsing to a long > parsing and only modify the response if the value is > INT_MAX while still > throwing an exception if we get something that is truly undecipherable? > > Kris Jurka > > Dave, I'm completely unfamiliar with the driver's code, so I better won't take part in the further discussion -- just one thing: Now "insert_oid" won't be assigned correctly when the assignment of update_count fails: [QueryExecutorImpl.java] try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { update_count=Statement.SUCCESS_NO_INFO; } better be something like this: ? try { update_count = Integer.parseInt(status.substring(1 + status.lastIndexOf(' '))); } catch (NumberFormatException nfe) { update_count=Statement.SUCCESS_NO_INFO; } try { if (status.startsWith("INSERT")) insert_oid = Long.parseLong(status.substring(1 + status.indexOf(' '), status.lastIndexOf(' '))); } catch ( ... // don't know what expected behaviour should be ... } regards Stefan Reiser -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc