Re: BUG #5781: unaccent() function should be marked IMMUTABLE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Grant Hutchins and Peter Jaros <grant(at)pivotallabs(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5781: unaccent() function should be marked IMMUTABLE
Date: 2010-12-04 17:30:42
Message-ID: 24718.1291483842@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Fri, Dec 3, 2010 at 4:50 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Even 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.

> Don't we have precedent for this in assuming that things like tsearch
> dictionaries and parsers and system locales don't change underneath
> us?

The precedent is to assume such things are stable, not immutable.

Even if you want to assume that, the implementation of unaccent(text) is
such that its results depend on search_path, which is *definitely* not
acceptable for an immutable function. It would need a better way of
tying the function to the dictionary.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message tmoore 2010-12-04 17:41:53 TRUNCATE HANGS
Previous Message Hiroshi Saito 2010-12-04 16:10:49 Re: No UUID support on One-Click installer PostgreSQL 9.0.1 64-bit Windows