Rory Campbell-Lange wrote:
> In a nutshell:
>
> Is there a way of finding out how many rows (ROW_COUNT) are in a cursor
> select? If one can, is there a way of returning a RECORD containing the
> refcursor and the ROW_COUNT?
>
You aren't buying anything by using a cursor. AFAICS the only way that a
cursor would be a benefit, would be if it could persist from page to
page. Then you could grab just the needed tuples without requerying. But
I'm not aware of any way to do that.
So you might as well run a single
"SELECT count(*) ... WHERE your_criteria_here"
to get the overall count once, and then run your LIMIT/OFFSET query
directly for each page.
Joe