No. of rows on result set - Mailing list pgsql-jdbc

From Dianne Yumul
Subject No. of rows on result set
Date
Msg-id dd6acca63a46a619b8d927b1fda99f60@wellsgaming.com
Whole thread Raw
Responses Re: No. of rows on result set  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Hello List,

Recently upgraded to Postgresql 8.0.3, JDBC Driver 8.0 Build 311 and
realized that I can no longer use the last() method for ResultSet
because of the default TYPE_FORWARD_ONLY.  Several of our apps use this
to find the number of rows on a result set. Looking at the archives, my
options would be to (1) do a separate SELECT COUNT(*) . . ., (2) change
result set type to TYPE_SCROLL_INSENSITIVE, (3) replace arrays with
something else that will not require the size of the result set, or (4)
a better solution I haven't thought of : ).

Sorry for the newbie question. I'm inclined to just use
TYPE_SCROLL_INSENSITIVE, but I want to do this the right way (not just
the easy way) and I'm not sure if it has any repercussions.

Thank you very much.

dianne


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Timezone conversion woes
Next
From: Oliver Jowett
Date:
Subject: Re: Using a 7_4 JDBC driver to connect to 8.0