summaryrefslogtreecommitdiff
path: root/contrib/unaccent
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-11-14 18:24:32 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-11-14 18:24:32 +0000
commit29faadcd2780f74550d6a983a81bc6bad3967bd6 (patch)
tree3697f94296c9e09afd8d21a1ef535e8f955f3a43 /contrib/unaccent
parentda8d684d39b7fa5d890b6596a9779c6e34112b43 (diff)
downloadpostgresql-29faadcd2780f74550d6a983a81bc6bad3967bd6.tar.gz
Make unaccent's install/uninstall scripts look more like all the others.
Set search_path explicitly, don't use IF EXISTS, etc.
Diffstat (limited to 'contrib/unaccent')
-rw-r--r--contrib/unaccent/unaccent.sql.in13
-rw-r--r--contrib/unaccent/uninstall_unaccent.sql16
2 files changed, 16 insertions, 13 deletions
diff --git a/contrib/unaccent/unaccent.sql.in b/contrib/unaccent/unaccent.sql.in
index ba981398fa..1f3c3c8a4a 100644
--- a/contrib/unaccent/unaccent.sql.in
+++ b/contrib/unaccent/unaccent.sql.in
@@ -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'
);
-
diff --git a/contrib/unaccent/uninstall_unaccent.sql b/contrib/unaccent/uninstall_unaccent.sql
index 89e3627fc8..f60ab564da 100644
--- a/contrib/unaccent/uninstall_unaccent.sql
+++ b/contrib/unaccent/uninstall_unaccent.sql
@@ -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);