Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 8BE429FB515 for ; Mon, 19 Feb 2007 02:07:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 32632-01 for ; Mon, 19 Feb 2007 02:07:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id AE2C29FB46A for ; Mon, 19 Feb 2007 02:07:38 -0400 (AST) Received: (qmail 8778 invoked by uid 1112); 19 Feb 2007 06:07:37 -0000 Date: Mon, 19 Feb 2007 01:07:37 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Albe Laurenz cc: pgsql-jdbc@postgresql.org Subject: Re: Large Objects with OID > 2147483647 In-Reply-To: <52EF20B2E3209443BC37736D00C3C1380BD46155@EXADV1.host.magwien.gv.at> Message-ID: References: <52EF20B2E3209443BC37736D00C3C1380BD46155@EXADV1.host.magwien.gv.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.06 tagged_above=0 required=5 tests=AWL, BAYES_50, SUBJ_HAS_UNIQ_ID X-Spam-Level: X-Archive-Number: 200702/94 X-Sequence-Number: 16650 On Mon, 11 Dec 2006, Albe Laurenz wrote: > 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? > I have put a fix into CVS for 8.1, 8.2 and head drivers that stores the OIDs as longs insteads of ints. Kris Jurka