Re: New feature: accumulative functions.

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: New feature: accumulative functions.
Дата
Msg-id CAAB7D45-B119-488B-8A6C-E97C3B1E9101@yahoo.com
обсуждение исходный текст
Ответ на New feature: accumulative functions.  (pasman pasmański <pasman.p@gmail.com>)
Список pgsql-general
On Sep 25, 2011, at 9:19, pasman pasmański <pasman.p@gmail.com> wrote:

> Hi.
>
> I propose to add "accumulative" flag to a function definition. This
> flag would be set for function f(x) which is accumulative and
> immutable.
>
> This flag allows to use an index on  x for clauses containing f(x):
>
> where f(x) = const
> where f(x) > const
>
> and so on.
>
>

We can term it a Schrodinger function :)

I don't understand how it can have mutable state (accumulator) and still be called immutable.

Can explain further and give an example (or better yet, real life) use-case?

David J.

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: (another ;-)) PostgreSQL-derived project ...
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: (another ;-)) PostgreSQL-derived project ...