pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@mit.edu>
Cc: Grant Hutchins and Peter Jaros <grant@pivotallabs.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5781: unaccent() function should be marked IMMUTABLE
Date: Sat, 04 Dec 2010 12:30:42 -0500
Message-ID: <24718.1291483842@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTinNLtaKUH205B7fJqVnrHNY+OOaS3AYA10OUC-Z@mail.gmail.com>
References: <201012021544.oB2FiTn1041521@wwwmaster.postgresql.org>
	<16472.1291351806@sss.pgh.pa.us>
	<AANLkTinNLtaKUH205B7fJqVnrHNY+OOaS3AYA10OUC-Z@mail.gmail.com>

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



view thread (7+ messages)  latest in thread

Message-ID: <24718.1291483842@sss.pgh.pa.us>
Permalink:  ../24718.1291483842@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/24718.1291483842@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gsstark@mit.edu, grant@pivotallabs.com
  Subject: Re: BUG #5781: unaccent() function should be marked IMMUTABLE
  In-Reply-To: <24718.1291483842@sss.pgh.pa.us>
  References: <201012021544.oB2FiTn1041521@wwwmaster.postgresql.org> <16472.1291351806@sss.pgh.pa.us> <AANLkTinNLtaKUH205B7fJqVnrHNY+OOaS3AYA10OUC-Z@mail.gmail.com> <24718.1291483842@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox