Re: stateful UDF?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: stateful UDF?
Дата
Msg-id 20060215095724.GC26771@svana.org
обсуждение исходный текст
Ответ на Re: stateful UDF?  (andrew <andrew.ylzhou@gmail.com>)
Ответы Re: stateful UDF?  (andrew <andrew.ylzhou@gmail.com>)
Список pgsql-general
On Wed, Feb 15, 2006 at 10:49:14AM +0100, andrew wrote:
> Within the same query. The function takes a tuple as its input
> parameter. It will be used in the where clause. So I think it will be
> called one time for each read tuple, right? I want to maintain a
> structure to store the information about the tuples that have been
> read so far.  The output value of this function is computed based on
> this information and the current input tuple.

Sounds like you're referring to an aggregate which takes a number of
input values and returns a single output value. There you define a
state structure to deal with this.

http://www.postgresql.org/docs/8.1/interactive/sql-createaggregate.html

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: andrew
Дата:
Сообщение: Re: stateful UDF?
Следующее
От: andrew
Дата:
Сообщение: Re: stateful UDF?