X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A8A3DD1B459 for ; Wed, 2 Jun 2004 10:27:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26850-07 for ; Wed, 2 Jun 2004 13:27:29 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id 71D21D1B467 for ; Wed, 2 Jun 2004 10:27:24 -0300 (ADT) Received: from tmsl-adsl.demon.co.uk ([80.177.114.181] helo=bacon.tmsl.demon.co.uk) by anchor-post-35.mail.demon.net with esmtp (Exim 3.35 #1) id 1BVVm8-000FqO-0Z; Wed, 02 Jun 2004 14:27:24 +0100 Date: Wed, 2 Jun 2004 14:27:21 +0100 From: Paul Thomas To: Jan Heise Cc: Oliver Jowett , pgsql-jdbc@postgresql.org Subject: Re: int4/int8 problem with jdbc was Re: "Fix" for INT8 literals Message-ID: <20040602142721.A432@bacon> References: <40BDB6F7.8070903@opencloud.com> <9D72D268-B48A-11D8-86A9-000393DC6FC0@janheise.de> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <9D72D268-B48A-11D8-86A9-000393DC6FC0@janheise.de>; from jan@janheise.de on Wed, Jun 02, 2004 at 12:47:24 +0100 X-Mailer: Balsa 1.2.3 Lines: 38 X-Virus-Scanned: by amavisd-new at hub.org X-Archive-Number: 200406/7 X-Sequence-Number: 10209 On 02/06/2004 12:47 Jan Heise wrote: > oliver, thanks for your reply. > > the db in question is a 7.4 site in production. upgrading to another > version is not really what i'd like > to do. the explicit cast is problematic too, i'm using hibernate as my > orm. unless i missed something > in the docs, i can not add the cast to the config - but this is sth. for > the hibernate forums. > > the problem is a special case where i have to load objects from the > table in question by the pk > (details would be quite long, but i can not change the table-structure > at this time). table size is > approx. 120 million rows and approx 2 million rows have a pk < INT4_MAX. > so i think my only > option is dropping the foreign keys, making the pks and all references > bigger than INT4_MAX > and recreate the fk. > > jan There's an unofficial patch: http://archives.postgresql.org/pgsql-jdbc/2003-09/msg00143.php which might solve your problems for now. IIRC, there's a server-side patch been submitted which will solve the int4/int8 issue and may be 7.5. -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+