No. of rows on result set

From: Dianne Yumul <dianne(at)wellsgaming(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: No. of rows on result set
Date: 2005-07-14 23:47:27
Message-ID: dd6acca63a46a619b8d927b1fda99f60@wellsgaming.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-07-15 00:07:00 Re: Using a 7_4 JDBC driver to connect to 8.0
Previous Message Dave Cramer 2005-07-14 22:41:29 Re: Timezone conversion woes