Re: looping over a small record set over and over in a function

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: looping over a small record set over and over in a function
Дата
Msg-id 1245553071.15432.30.camel@ayaki
обсуждение исходный текст
Ответ на looping over a small record set over and over in a function  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы cursors, temp tables, dynamic sql technique (was and is: looping over a small record set over and over in a function)  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Список pgsql-general
On Fri, 2009-06-19 at 20:23 +0200, Ivan Sergio Borgonovo wrote:

> If I could easily load all the dataset into an array, loop through
> it and then just update the computed field it would be nice... but
> how?

Are you sure you _really_ need a PL/PgSQL function for this?

Can't you:

SELECT x.*, computefield(x, p)
FROM smalltable x, otherparams p;

or something along those lines?

--
Craig Ringer


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

Предыдущее
От: Gerhard Wiesinger
Дата:
Сообщение: Implicit conversion/comparision of timestamp with and without timezone
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: pl/sql resources for pl/pgsql?