Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 313931337BC4 for ; Fri, 3 Dec 2010 00:50:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 65574-02 for ; Fri, 3 Dec 2010 04:50:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7B5731337B5A for ; Fri, 3 Dec 2010 00:50:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oB34o68t016473; Thu, 2 Dec 2010 23:50:06 -0500 (EST) To: "Grant Hutchins and Peter Jaros" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #5781: unaccent() function should be marked IMMUTABLE In-reply-to: <201012021544.oB2FiTn1041521@wwwmaster.postgresql.org> References: <201012021544.oB2FiTn1041521@wwwmaster.postgresql.org> Comments: In-reply-to "Grant Hutchins and Peter Jaros" message dated "Thu, 02 Dec 2010 15:44:29 +0000" Date: Thu, 02 Dec 2010 23:50:06 -0500 Message-ID: <16472.1291351806@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201012/9 X-Sequence-Number: 28815 "Grant Hutchins and Peter Jaros" writes: > The unaccent(text) function supplied by contrib/unaccent is marked VOLATILE. > This prevents it from being used in indexes. We believe that the function > meets the requirements to be marked IMMUTABLE. No, it most certainly doesn't. It depends on the behavior of a dictionary that it has no hard-wired connection to, so the specific behavior of the dictionary is uncertain. 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. 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. regards, tom lane