pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefan Reiser <s.reiser@tu-braunschweig.de>
To: Dave Cramer <pg@fastcrypt.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: zelaine@amazon.com, pgsql-bugs@postgresql.org, List <pgsql-jdbc@postgresql.org>
Subject: Re: [JDBC] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception
Date: Fri, 11 Jan 2013 16:32:35 +0100
Message-ID: <50F03093.6060005@tu-braunschweig.de> (raw)
In-Reply-To: <CADK3HHLaQ96jMrf4RLRpseADdFOwD0DxOp9xF4C2OiEOBzmroA@mail.gmail.com>
References: <E1Tlli5-0007tR-HO@wrigleys.postgresql.org>
	<17929.1356108458@sss.pgh.pa.us>
	<CADK3HH+JgxrrT7K7tbyHLT0pqqnmqQNoPC6keHV3uChRq1ah4w@mail.gmail.com>
	<6059.1356121026@sss.pgh.pa.us>
	<CADK3HHLaQ96jMrf4RLRpseADdFOwD0DxOp9xF4C2OiEOBzmroA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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 <tgl@sss.pgh.pa.us 
> <mailto:tgl@sss.pgh.pa.us>> wrote:
>
>     Dave Cramer <pg@fastcrypt.com <mailto: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
>
>



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (19+ messages)  latest in thread

Message-ID: <50F03093.6060005@tu-braunschweig.de>
Permalink:  ../50F03093.6060005@tu-braunschweig.de/
Also on:    postgresql.org/message-id/50F03093.6060005@tu-braunschweig.de

 · 

reply

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: s.reiser@tu-braunschweig.de, pg@fastcrypt.com, tgl@sss.pgh.pa.us
  Subject: Re: [JDBC] BUG #7766: Running a DML statement that affects more than 4 billion rows results in an exception
  In-Reply-To: <50F03093.6060005@tu-braunschweig.de>
  References: <E1Tlli5-0007tR-HO@wrigleys.postgresql.org> <17929.1356108458@sss.pgh.pa.us> <CADK3HH+JgxrrT7K7tbyHLT0pqqnmqQNoPC6keHV3uChRq1ah4w@mail.gmail.com> <6059.1356121026@sss.pgh.pa.us> <CADK3HHLaQ96jMrf4RLRpseADdFOwD0DxOp9xF4C2OiEOBzmroA@mail.gmail.com> <50F03093.6060005@tu-braunschweig.de>

* 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