Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ttgb2-0006Ir-VV for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2013 15:32:41 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ttgb2-00073A-BU for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jan 2013 15:32:40 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ttgb0-00071g-Ms; Fri, 11 Jan 2013 15:32:38 +0000 Received: from mailfront3.rz.tu-bs.de ([134.169.12.134] helo=tu-bs.de) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ttgay-0007Bo-6D; Fri, 11 Jan 2013 15:32:38 +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 15931973; Fri, 11 Jan 2013 16:32:34 +0100 Message-ID: <50F03093.6060005@tu-braunschweig.de> Date: Fri, 11 Jan 2013 16:32:35 +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: Dave Cramer CC: Tom Lane , zelaine@amazon.com, pgsql-bugs@postgresql.org, List Subject: Re: [JDBC] 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> 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-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org One thought: What about returning Statement.SUCCESS_NO_INFO as it says in http://docs.oracle.com/javase/6/docs/api/java/sql/BatchUpdateException.html#getUpdateCounts%28%29 and http://docs.oracle.com/javase/6/docs/api/java/sql/Statement.html#executeBatch%28%29 ? It seems better to report no number at all rather than a number (INT_MAX) that is known to be wrong. Dave Cramer schrieb: > Ok, this is much more difficult than I thought. > > Turns out that there are at least two interfaces that expect an int > not a long. > > BatchUpdateException > executeBatch > > I'm thinking the only option here is to report INT_MAX as opposed to > failing. > > Thoughts ? > > Dave > > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca > > > On Fri, Dec 21, 2012 at 3:17 PM, Tom Lane > wrote: > > Dave Cramer > writes: > > So an unsigned long won't fit inside a java long either, but > hopefully it > > will never be necessary. That would be a huge number of changes. > > I think we'll all be safely dead by the time anybody manages to > process > 2^63 rows in one PG command ;-). If you can widen the value from > int to > long on the Java side, that should be sufficient. > > regards, tom lane > > -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs