looping through results of a SELECT

Поиск
Список
Период
Сортировка
От Nagy Tamas
Тема looping through results of a SELECT
Дата
Msg-id 20010127201542.A1794@cs.bme.hu
обсуждение исходный текст
Список pgsql-sql
Hello!
I'd like to write a function, that makes some calculations
(perhaps applies another function) on every row of a result set returned
by a SELECT query. I thought writing a WHILE loop would work, but I
couldn't assign the individual rows to a variable. Then, I read about the
FETCH command, and I tried to use that, but it dies with 'error
near CURSOR' error when I try to use the function. I wrote a PL/PGSQL
function, obviously. So, my question is: is there an easy way to assign
the individual rows of a SELECT result to a variable in a function?
Thanks in advance,
Thomas Nagy


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

Предыдущее
От: Kovacs Baldvin
Дата:
Сообщение: Architectural question
Следующее
От: Michael Davis
Дата:
Сообщение: RE: looping through results of a SELECT