Re: Find out the number of rows returned by refcursor?

Поиск
Список
Период
Сортировка
От Karen Hill
Тема Re: Find out the number of rows returned by refcursor?
Дата
Msg-id 1160592129.764640.314170@i3g2000cwc.googlegroups.com
обсуждение исходный текст
Ответ на Re: Find out the number of rows returned by refcursor?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> "Karen Hill" <karen_hill22@yahoo.com> writes:
> > -- Is there a way to know the total number of rows the cursor is
> > capable of traversing without using --count?
>
> If you want an accurate count, the only way is to traverse the cursor.
> Consider using MOVE FORWARD ALL and noting the rowcount, then MOVE
> BACKWARD ALL to reset the cursor (the latter at least should be
> reasonably cheap).
>

Cool.  Quick question, how does one go about noting the rowcount?
Using the rowcount in get diagnostics or something else?

regards,
karen.


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Find out the number of rows returned by refcursor?
Следующее
От: "J S B"
Дата:
Сообщение: invalid data in PID file