mirror of
https://github.com/postgres/postgres.git
synced 2025-05-15 19:15:29 +03:00
unaccent: mark unaccent() functions as immutable
Suggestion from Pavel Stehule
This commit is contained in:
parent
ee1e5662d8
commit
9299f61798
@ -6,12 +6,12 @@
|
|||||||
CREATE FUNCTION unaccent(regdictionary, text)
|
CREATE FUNCTION unaccent(regdictionary, text)
|
||||||
RETURNS text
|
RETURNS text
|
||||||
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
||||||
LANGUAGE C STABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE FUNCTION unaccent(text)
|
CREATE FUNCTION unaccent(text)
|
||||||
RETURNS text
|
RETURNS text
|
||||||
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
||||||
LANGUAGE C STABLE STRICT;
|
LANGUAGE C IMMUTABLE STRICT;
|
||||||
|
|
||||||
CREATE FUNCTION unaccent_init(internal)
|
CREATE FUNCTION unaccent_init(internal)
|
||||||
RETURNS internal
|
RETURNS internal
|
||||||
|
@ -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 template unaccent;
|
||||||
ALTER EXTENSION unaccent ADD text search dictionary 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(regdictionary, text) IMMUTABLE;
|
||||||
ALTER FUNCTION unaccent(text) STABLE;
|
ALTER FUNCTION unaccent(text) IMMUTABLE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user