Skip site navigation (1) Skip section navigation (2)

Large Objects with OID > 2147483647

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Large Objects with OID > 2147483647
Date: 2006-12-11 09:05:33
Message-ID: 52EF20B2E3209443BC37736D00C3C1380BD46155@EXADV1.host.magwien.gv.at (view raw or flat)
Thread:
Lists: pgsql-jdbc
In a posting to the newsgroup comp.databases.postgresql,
somebody has complained that he gets

 org.postgresql.util.PSQLException: Bad value for type int : 2338491788.

when he tries to access a BLOB.
The problem is new for the poster, it used to work.

This looks like a bug in the driver to me:
In the driver source code, I see that the OID is treated as 'int',
which according to
http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html
is a 4 byte signed integer, while OIDs are 4 byte unsigned integers.

So accessing Large Objects with OID > 2147483647 as BLOB will not
work, right? I think that 'long' would be more appropriate than 'int'.

Is this problem known?

Yours,
Laurenz Albe

Responses

pgsql-jdbc by date

Next:From: Raymond O'DonnellDate: 2006-12-11 18:43:49
Subject: Re: World Wide International Law: Linux is compulsory (mandotary) in all schools/universities world-wide
Previous:From: brianDate: 2006-12-10 21:04:56
Subject: Re: World Wide International Law: Linux is compulsory (mandotary)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group