Re: [GENERAL] Oops... - Mailing list pgsql-general

From Brett W. McCoy
Subject Re: [GENERAL] Oops...
Date
Msg-id Pine.LNX.4.04.9904101250520.1354-100000@dragosani.lan2wan.com
Whole thread Raw
In response to Oops...  (Mike Frisch <mfrisch@saturn.tlug.org>)
List pgsql-general
On Sat, 10 Apr 1999, Mike Frisch wrote:

> With respect to my previous query, I'd like to clarify that the FETCHes I
> am doing are subsets of the full results (hence I cannot use PQntuples).
> For instance, I am FETCHing 25 records out of a possible 1000, so
> PQntuples() is returning 25.  I need some way of knowing there's a 1000
> total.

Why can't you get the number of the initial results before fetching them
page by page?  If you create an initial query and save it as a view, why
can't you grab the number out of that first result set (via a ntuples
function call or by executing an SQL statement), then page through it with
your cursor?  Or can cursors not be created from views?

Brett W. McCoy
                                        http://www.lan2wan.com/~bmccoy/
-----------------------------------------------------------------------
If the human brain were so simple that we could understand it,
we would be so simple we couldn't.


pgsql-general by date:

Previous
From: "Brett W. McCoy"
Date:
Subject: Re: [GENERAL] Getting total records in result set
Next
From: Bill Sneed
Date:
Subject: Re: dbase converter