Re: Help:updateRow() with CIDR types - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Help:updateRow() with CIDR types
Date
Msg-id Pine.BSO.4.56.0404241424160.2102@leary.csoft.net
Whole thread Raw
In response to Re: Help:updateRow() with CIDR types  (Moray Taylor <mugen@the400.homeunix.com>)
Responses Re: Help:updateRow() with CIDR types
List pgsql-jdbc

On Sat, 24 Apr 2004, Moray Taylor wrote:

> Thanks very much for the patch, but I'm having a problem with the
> updated jars, I am getting a lot of these errors...
>
> ERROR:Operation requires a scrollable resultset, but this resultset is
> FORWARD_ONLY.
> org.postgresql.util.PSQLException: Operation requires a scrollable
> resultset, but this resultset is FORWARD_ONLY.
>     at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkScrollable(AbstractJdbc
> 2ResultSet.java:179)
>     at
> org.postgresql.jdbc2.AbstractJdbc2ResultSet.first(AbstractJdbc2ResultSet
> .java:258)
>
> There errors occur when I do a getFirst() on the resultsets that get
> create by methods like getCatalogs(), and getColumns()
>
> Has something else changed in the CVS that would cause this, I never
> had these errors with the 7.5 (build 301) resultsets.
>

The cvs driver has been tightened up to default to TYPE_FORWARD_ONLY
ResultSets per spec to try and increase the number of queries we can use
cursor based fetches on.  Since it is a TYPE_FORWARD_ONLY ResultSet your
getFirst() call fails because that only works on scrollable ResultSets.
I don't think the TYPE_FORWARD_ONLY default should apply to the MetaData
where the results are usually small and we want to allow the most
flexibility in navigating them.

Please try the attached patch or the newly uploaded jar files at
http://www.ejurka.com/pgsql/jars/

Kris Jurka

Attachment

pgsql-jdbc by date:

Previous
From: Moray Taylor
Date:
Subject: Re: Help:updateRow() with CIDR types
Next
From: Moray Taylor
Date:
Subject: Re: Help:updateRow() with CIDR types