Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception
Date
Msg-id CADK3HHLaQ96jMrf4RLRpseADdFOwD0DxOp9xF4C2OiEOBzmroA@mail.gmail.com
Whole thread Raw
In response to Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception  (Stefan Reiser <s.reiser@tu-braunschweig.de>)
Re: [BUGS] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception  (Péter Kovács <peter.dunay.kovacs@gmail.com>)
List pgsql-jdbc
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 <tgl@sss.pgh.pa.us> wrote:
Dave Cramer <pg@fastcrypt.com> 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

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re:
Next
From: Dave Cramer
Date:
Subject: Re: Set read-only connection from a connect string parameter