mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-17 19:30:00 +08:00
Make unaccent's install/uninstall scripts look more like all the others.
Set search_path explicitly, don't use IF EXISTS, etc.
This commit is contained in:
parent
da8d684d39
commit
29faadcd27
@ -1,14 +1,17 @@
|
||||
/* $PostgreSQL: pgsql/contrib/unaccent/unaccent.sql.in,v 1.1 2009/08/18 10:34:39 teodor Exp $ */
|
||||
/* $PostgreSQL: pgsql/contrib/unaccent/unaccent.sql.in,v 1.2 2009/11/14 18:24:32 tgl Exp $ */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
|
||||
CREATE OR REPLACE FUNCTION unaccent(regdictionary, text)
|
||||
RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
||||
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
|
||||
LANGUAGE C STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION unaccent(text)
|
||||
RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'unaccent_dict'
|
||||
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
|
||||
LANGUAGE C STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION unaccent_init(internal)
|
||||
RETURNS internal
|
||||
@ -21,13 +24,11 @@ CREATE OR REPLACE FUNCTION unaccent_lexize(internal,internal,internal,internal)
|
||||
LANGUAGE C;
|
||||
|
||||
CREATE TEXT SEARCH TEMPLATE unaccent (
|
||||
INIT = unaccent_init,
|
||||
INIT = unaccent_init,
|
||||
LEXIZE = unaccent_lexize
|
||||
);
|
||||
|
||||
|
||||
CREATE TEXT SEARCH DICTIONARY unaccent (
|
||||
TEMPLATE = unaccent,
|
||||
RULES = 'unaccent'
|
||||
);
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
/* $PostgreSQL: pgsql/contrib/unaccent/uninstall_unaccent.sql,v 1.1 2009/08/18 10:34:39 teodor Exp $ */
|
||||
/* $PostgreSQL: pgsql/contrib/unaccent/uninstall_unaccent.sql,v 1.2 2009/11/14 18:24:32 tgl Exp $ */
|
||||
|
||||
DROP FUNCTION IF EXISTS unaccent(regdictionary, text) CASCADE;
|
||||
DROP FUNCTION IF EXISTS unaccent(text) CASCADE;
|
||||
DROP TEXT SEARCH DICTIONARY IF EXISTS unaccent CASCADE;
|
||||
DROP TEXT SEARCH TEMPLATE IF EXISTS unaccent CASCADE;
|
||||
DROP FUNCTION IF EXISTS unaccent_init(internal) CASCADE;
|
||||
DROP FUNCTION IF EXISTS unaccent_lexize(internal,internal,internal,internal) CASCADE;
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
DROP FUNCTION unaccent(regdictionary, text);
|
||||
DROP FUNCTION unaccent(text);
|
||||
DROP TEXT SEARCH DICTIONARY unaccent;
|
||||
DROP TEXT SEARCH TEMPLATE unaccent;
|
||||
DROP FUNCTION unaccent_init(internal);
|
||||
DROP FUNCTION unaccent_lexize(internal,internal,internal,internal);
|
||||
|
Loading…
Reference in New Issue
Block a user