]> granicus.if.org Git - postgresql/commitdiff
unaccent: mark unaccent() functions as immutable
authorBruce Momjian <bruce@momjian.us>
Tue, 8 Oct 2013 16:20:36 +0000 (12:20 -0400)
committerBruce Momjian <bruce@momjian.us>
Tue, 8 Oct 2013 16:20:36 +0000 (12:20 -0400)
Suggestion from Pavel Stehule

contrib/unaccent/unaccent--1.0.sql
contrib/unaccent/unaccent--unpackaged--1.0.sql

index 9085ca473fbbd548c2b01c1cc0f4e60fd0e8a2bd..072b749e4b9c441e7f0b6a3a05a66d3c8213bb0e 100644 (file)
@@ -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
index abd06983ac4ca87d78ac871b08a0cd84d66ef88c..5bff74ed6dc50999004f551d9ffd65df27d307ad 100644 (file)
@@ -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;