From: Dianne Yumul <dianne@wellsgaming.com>
To: pgsql-jdbc@postgresql.org
Subject: No. of rows on result set
Date: Thu, 14 Jul 2005 16:47:27 -0700
Message-ID: <dd6acca63a46a619b8d927b1fda99f60@wellsgaming.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: dianne@wellsgaming.com
Subject: Re: No. of rows on result set
In-Reply-To: <dd6acca63a46a619b8d927b1fda99f60@wellsgaming.com>
References: <dd6acca63a46a619b8d927b1fda99f60@wellsgaming.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox