Re: 9.1 JDBC 4 driver

Lists: pgsql-jdbc
From: Prasanth Reddy <dbadmin(at)nqadmin(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: 9.1 JDBC 4 driver
Date: 2012-04-25 20:34:54
Message-ID: 4F985FEE.8010203@nqadmin.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc


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(at)nqadmin(dot)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


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: dbadmin(at)nqadmin(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: 9.1 JDBC 4 driver
Date: 2012-04-25 20:59:43
Message-ID: CADK3HHKoOe8LCDFmBxd354EJnt-SneMSbeATS0qUE_PosfhkGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Ok,

I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
updated the download page

Please let me know if there are any issues with this jar.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca

On Wed, Apr 25, 2012 at 4:34 PM, Prasanth Reddy <dbadmin(at)nqadmin(dot)com> wrote:
>
> 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(at)nqadmin(dot)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
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc


From: Kris Jurka <books(at)ejurka(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: dbadmin(at)nqadmin(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: 9.1 JDBC 4 driver
Date: 2012-04-25 23:59:53
Message-ID: alpine.BSO.2.00.1204251947530.1760@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Wed, 25 Apr 2012, Dave Cramer wrote:

> I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
> updated the download page
>
> Please let me know if there are any issues with this jar.

You tagged and released 9.2-dev, not the 9.1 branch. Please undo
immediately. Also you need to change the driver version in
org/postgresql/util/PSQLDriverVersion.java.

You should also try to build a JDBC3 release at the same time.

Kris Jurka


From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: dbadmin(at)nqadmin(dot)com, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: 9.1 JDBC 4 driver
Date: 2012-04-26 01:55:14
Message-ID: CADK3HH+rTYMjqSOWWSnaRqWccM=PcX5ivefnYKodPMqe1LcAiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Wed, Apr 25, 2012 at 7:59 PM, Kris Jurka <books(at)ejurka(dot)com> wrote:
>
>
> On Wed, 25 Apr 2012, Dave Cramer wrote:
>
>> I have tagged 902 and uploaded a jar to jdbc.postgresql.jar and
>> updated the download page
>>
>> Please let me know if there are any issues with this jar.
>
> You tagged and released 9.2-dev, not the 9.1 branch.  Please undo
> immediately.  Also you need to change the driver version in
> org/postgresql/util/PSQLDriverVersion.java.
>
> You should also try to build a JDBC3 release at the same time.
>
> Kris Jurka

Whoops, should be better this time.

I will try to build a jdbc3 jar as soon as possible, probably Friday now

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca