Re: BUG #5781: unaccent() function should be marked IMMUTABLE - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5781: unaccent() function should be marked IMMUTABLE
Date
Msg-id AANLkTi=-qRqBhf9oKkzz+-UE-SUHUsFJh5wox2VG+x3P@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5781: unaccent() function should be marked IMMUTABLE  (Bruce Momjian <bruce@momjian.us>)
Responses Re: BUG #5781: unaccent() function should be marked IMMUTABLE  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
On Wed, Dec 22, 2010 at 8:45 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Tom Lane wrote:
>> "Grant Hutchins and Peter Jaros" <grant@pivotallabs.com> writes:
>> > The unaccent(text) function supplied by contrib/unaccent is marked VOL=
ATILE.
>> > This prevents it from being used in indexes. We believe that the funct=
ion
>> > meets the requirements to be marked IMMUTABLE.
>>
>> No, it most certainly doesn't. =A0It depends on the behavior of a
>> dictionary that it has no hard-wired connection to, so the specific
>> behavior of the dictionary is uncertain. =A0Even if you're willing to
>> assume that the dictionary being used is the one defined by this
>> module, that dictionary depends on external configuration files
>> which are easily changeable.
>>
>> Arguably it'd be reasonable to change the function's marking from
>> volatile to stable, but that's not going to be enough to allow use in
>> indexes.
>
> So, should we change unaccent() from VOLATILE to STABLE?

Sounds like it, but it doesn't sound like it will help much.  :-(

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: memory leaks? using savepoint
Next
From: Maxim Boguk
Date:
Subject: Re: BUG #5797: Strange bug with hstore