Re: [GENERAL] Oops...
От | Brett W. McCoy |
---|---|
Тема | Re: [GENERAL] Oops... |
Дата | |
Msg-id | Pine.LNX.4.04.9904101250520.1354-100000@dragosani.lan2wan.com обсуждение исходный текст |
Ответ на | Oops... (Mike Frisch <mfrisch@saturn.tlug.org>) |
Список | 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 по дате отправления: