Re: New feature: accumulative functions. - Mailing list pgsql-general

From Harald Fuchs
Subject Re: New feature: accumulative functions.
Date
Msg-id 86sjnjplyj.fsf@protecting.net
Whole thread Raw
In response to New feature: accumulative functions.  (pasman pasmański <pasman.p@gmail.com>)
List pgsql-general
In article <CAFj8pRDx6JLmneV30kWNrcwzGLOSqyK-qN7T4_N37L9UPd2M=Q@mail.gmail.com>,
Pavel Stehule <pavel.stehule@gmail.com> writes:

> 2011/9/25 pasman pasmański <pasman.p@gmail.com>:
>> I found second use case. Look at expression:
>>
>> where left(str,n)='value'
>>
>> function left(str,n) increase monotonically for str and n. With this
>> feature it can use index on str.
>>
>> Classic index needs recreating.
>>

> these use cases are just theory - for example - this case should be
> solved with immutable functions

> I can use a functional index left(str, const) and use a query

> where left(str, const) = left('value', const) and left(str, n) = 'value'

> There are a theoretical cases, but these cases should be solved via
> special data type and GiST index

If I don't misunderstand you, this data type is called 'prefix_range',
available at PgFoundry.

pgsql-general by date:

Previous
From: Venkat Balaji
Date:
Subject: : PostgreSQL Online Backup
Next
From: "Albe Laurenz"
Date:
Subject: Re: Sending Results From One Function As Input into Another Function