From: Prasanth Reddy <dbadmin@nqadmin.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: 9.1 JDBC 4 driver
Date: Wed, 25 Apr 2012 15:34:54 -0500
Message-ID: <4F985FEE.8010203@nqadmin.com> (raw)
In-Reply-To: <4F985CB4.6070001@pangburngroup.com>
References: <4F985CB4.6070001@pangburngroup.com>
The fix seems to coincide with the stack trace location of mine. But in the fix added, the long value seems to be casted to int again. Wouldn't this cause problem when the value of oid has exceeded
the int range of java? Why not use long data type for table and column variable?
It would be great if we can get a new jar with the fix.
Thanks,
Prasanth
On Wed, Apr 25, 2012 at 11:58 AM, Prasanth Reddy <dbadmin@nqadmin.com> wrote:
> We have been using 8.4 jdbc3 driver. Recently we have upgraded it to 9.1-901 JDBC 4 jar. I am getting an error message (org.postgresql.util.PSQLException: Bad value for type int : 2618079772) while
> updating some columns. The column I am updating is a date column and I am using updateDate function of the rowset. Did some google search and found a really old post
> (http://archives.postgresql.org/pgsql-jdbc/2007-03/msg00029.php) that talked about oid being returned as Integer and causing this problem when the oid is too big. Below I am including the stack trace.
>
> I have reverted to 8.4 jdbc3 driver and the same code works fine. So is this a bug in jdbc4?
The follow-up to the post you linked suggests that the issue had been
fixed at the time, so it may be a different manifestation of the same
thing, but a similar-looking bug was recently fixed in git:
https://github.com/pgjdbc/pgjdbc/commit/4d60ea616eff61262721176db6e77819a23f6dc2
As far as I can tell, though, there are no official builds available
that include this fix yet, so you would have to build from source
(although given that this is a fairly serious issue *if* it does bite
you, perhaps it's time for another release?)
---
Maciek Sakrejda | System Architect | Truviso
1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com
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: dbadmin@nqadmin.com
Subject: Re: 9.1 JDBC 4 driver
In-Reply-To: <4F985FEE.8010203@nqadmin.com>
References: <4F985CB4.6070001@pangburngroup.com> <4F985FEE.8010203@nqadmin.com>
* 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