Re: int4/int8 problem with jdbc was Re: "Fix" for INT8 literals

From: Jan Heise <jan(at)janheise(dot)de>
To: Paul Thomas <paul(at)tmsl(dot)demon(dot)co(dot)uk>
Cc: pgsql-jdbc(at)postgresql(dot)org, Oliver Jowett <oliver(at)opencloud(dot)com>
Subject: Re: int4/int8 problem with jdbc was Re: "Fix" for INT8 literals
Date: 2004-06-03 07:07:07
Message-ID: A026E830-B52C-11D8-B799-000393DC6FC0@janheise.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thanks for your help,

for this special case I patched the JDBC-driver to wrap setInt and
setLong to use setString instead.

Jan

Am 02.06.2004 um 15:27 schrieb Paul Thomas:

>
> 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 |
> +------------------------------
> +---------------------------------------------+
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Manju Maliyekkal 2004-06-03 10:23:10 asking help
Previous Message Manuel Sugawara 2004-06-02 16:14:33 Column quoting in result set getters