Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.



pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group