| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Info about number of tuples if not use FETCH ALL |
| Дата | |
| Msg-id | 20010813195826.B3475@svana.org обсуждение |
| Ответ на | Info about number of tuples if not use FETCH ALL ("Yusron Hilmy" <yusron@ebdesk.com>) |
| Список | pgsql-general |
On Mon, Aug 13, 2001 at 04:54:07PM +0700, Yusron Hilmy wrote: > How to get number of tuples if after DECLARE CURSOR, I use FETCH NEXT (not > FETCH ALL) ? > PQntuples only work well if I use FETCH ALL. You can't. The whole purpose of cursors is so that you don't have to wait for the entire query to complete to get some results. Obviously, to get the total number of tuples the whole query needs to be run, hence the FETCH ALL. Do you really need to know the number of tuples beforehand, or is it ok to wait till the end? -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > It would be nice if someone came up with a certification system that > actually separated those who can barely regurgitate what they crammed over > the last few weeks from those who command secret ninja networking powers.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера