Re: [GENERAL] Oops...

From: "Brett W(dot) McCoy" <bmccoy(at)lan2wan(dot)com>
To: Mike Frisch <mfrisch(at)saturn(dot)tlug(dot)org>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Oops...
Date: 1999-04-10 16:55:06
Message-ID: Pine.LNX.4.04.9904101250520.1354-100000@dragosani.lan2wan.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

  • Oops... at 1999-04-10 16:33:27 from Mike Frisch

Browse pgsql-general by date

  From Date Subject
Next Message Bill Sneed 1999-04-10 18:57:41 Re: dbase converter
Previous Message Brett W. McCoy 1999-04-10 16:50:16 Re: [GENERAL] Getting total records in result set