Re: New feature: accumulative functions.

From: David Johnston <polobo(at)yahoo(dot)com>
To: pasman pasmański <pasman(dot)p(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: New feature: accumulative functions.
Date: 2011-09-25 13:36:35
Message-ID: CAAB7D45-B119-488B-8A6C-E97C3B1E9101@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sep 25, 2011, at 9:19, pasman pasmański <pasman(dot)p(at)gmail(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2011-09-25 14:14:26 Re: (another ;-)) PostgreSQL-derived project ...
Previous Message David Johnston 2011-09-25 13:21:49 Re: (another ;-)) PostgreSQL-derived project ...