Looping through cursor row batches

Поиск
Список
Период
Сортировка
От Henry Combrinck
Тема Looping through cursor row batches
Дата
Msg-id 20081006130407.90865lu3o5ih1cw0@zenmail.co.za
обсуждение исходный текст
Ответы Re: Looping through cursor row batches  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Greetings,

I gather the following isn't possible (which would have been elegant
and ideal):

FOR rec IN
   FETCH 100000 FROM cursor
LOOP
   ...


Anyone know the most efficient way of FETCHing a batch of rows, and
looping through them in a function?  FETCHing a record at a time will
work, but I was wondering whether this could be done.

Cheers
Henry


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

Предыдущее
От: "Filip Rembiałkowski"
Дата:
Сообщение: Re: restore a dump db from tar file
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: restore a dump db from tar file