Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B969C1337BBA for ; Thu, 2 Dec 2010 11:44:29 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 74336-02 for ; Thu, 2 Dec 2010 15:44:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 0B3C11337BB3 for ; Thu, 2 Dec 2010 11:44:28 -0400 (AST) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id oB2FiTYj041522 for ; Thu, 2 Dec 2010 15:44:29 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id oB2FiTn1041521; Thu, 2 Dec 2010 15:44:29 GMT (envelope-from www) Date: Thu, 2 Dec 2010 15:44:29 GMT Message-Id: <201012021544.oB2FiTn1041521@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #5781: unaccent() function should be marked IMMUTABLE From: "Grant Hutchins and Peter Jaros" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201012/5 X-Sequence-Number: 28811 The following bug has been logged online: Bug reference: 5781 Logged by: Grant Hutchins and Peter Jaros Email address: grant@pivotallabs.com PostgreSQL version: 9.0.1 Operating system: Mac OS X 10.6.4 Description: unaccent() function should be marked IMMUTABLE Details: 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. =# CREATE TABLE foo (); CREATE TABLE =# CREATE INDEX bar ON foo ( unaccent('baz') ); ERROR: functions in index expression must be marked IMMUTABLE =# ALTER FUNCTION unaccent(text) IMMUTABLE; ALTER FUNCTION =# CREATE INDEX bar ON foo ( unaccent('baz') ); CREATE INDEX