From: Bruce Momjian Date: Tue, 8 Oct 2013 16:20:36 +0000 (-0400) Subject: unaccent: mark unaccent() functions as immutable X-Git-Tag: REL9_4_BETA1~1086 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9299f6179838cef8aa1123f6fb76f0d3d6f2decc;p=postgresql unaccent: mark unaccent() functions as immutable Suggestion from Pavel Stehule --- diff --git a/contrib/unaccent/unaccent--1.0.sql b/contrib/unaccent/unaccent--1.0.sql index 9085ca473f..072b749e4b 100644 --- a/contrib/unaccent/unaccent--1.0.sql +++ b/contrib/unaccent/unaccent--1.0.sql @@ -6,12 +6,12 @@ CREATE FUNCTION unaccent(regdictionary, text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' - LANGUAGE C STABLE STRICT; + LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION unaccent(text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' - LANGUAGE C STABLE STRICT; + LANGUAGE C IMMUTABLE STRICT; CREATE FUNCTION unaccent_init(internal) RETURNS internal diff --git a/contrib/unaccent/unaccent--unpackaged--1.0.sql b/contrib/unaccent/unaccent--unpackaged--1.0.sql index abd06983ac..5bff74ed6d 100644 --- a/contrib/unaccent/unaccent--unpackaged--1.0.sql +++ b/contrib/unaccent/unaccent--unpackaged--1.0.sql @@ -10,7 +10,7 @@ ALTER EXTENSION unaccent ADD function unaccent_lexize(internal,internal,internal ALTER EXTENSION unaccent ADD text search template unaccent; ALTER EXTENSION unaccent ADD text search dictionary unaccent; --- These functions are marked as stable in 9.1, were not before: +-- These functions were marked as stable in 9.1; they were now marked as immutable -ALTER FUNCTION unaccent(regdictionary, text) STABLE; -ALTER FUNCTION unaccent(text) STABLE; +ALTER FUNCTION unaccent(regdictionary, text) IMMUTABLE; +ALTER FUNCTION unaccent(text) IMMUTABLE;