Skip to content

Commit 29faadc

Browse files
committed
Make unaccent's install/uninstall scripts look more like all the others.
Set search_path explicitly, don't use IF EXISTS, etc.
1 parent da8d684 commit 29faadc

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

contrib/unaccent/unaccent.sql.in

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
/* $PostgreSQL: pgsql/contrib/unaccent/unaccent.sql.in,v 1.1 2009/08/18 10:34:39 teodor Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/unaccent/unaccent.sql.in,v 1.2 2009/11/14 18:24:32 tgl Exp $ */
2+
3+
-- Adjust this setting to control where the objects get created.
4+
SET search_path = public;
25

36
CREATE OR REPLACE FUNCTION unaccent(regdictionary, text)
47
RETURNS text
58
AS 'MODULE_PATHNAME', 'unaccent_dict'
6-
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
9+
LANGUAGE C STRICT;
710

811
CREATE OR REPLACE FUNCTION unaccent(text)
912
RETURNS text
1013
AS 'MODULE_PATHNAME', 'unaccent_dict'
11-
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
14+
LANGUAGE C STRICT;
1215

1316
CREATE OR REPLACE FUNCTION unaccent_init(internal)
1417
RETURNS internal
@@ -21,13 +24,11 @@ CREATE OR REPLACE FUNCTION unaccent_lexize(internal,internal,internal,internal)
2124
LANGUAGE C;
2225

2326
CREATE TEXT SEARCH TEMPLATE unaccent (
24-
INIT = unaccent_init,
27+
INIT = unaccent_init,
2528
LEXIZE = unaccent_lexize
2629
);
2730

28-
2931
CREATE TEXT SEARCH DICTIONARY unaccent (
3032
TEMPLATE = unaccent,
3133
RULES = 'unaccent'
3234
);
33-
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
/* $PostgreSQL: pgsql/contrib/unaccent/uninstall_unaccent.sql,v 1.1 2009/08/18 10:34:39 teodor Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/unaccent/uninstall_unaccent.sql,v 1.2 2009/11/14 18:24:32 tgl Exp $ */
22

3-
DROP FUNCTION IF EXISTS unaccent(regdictionary, text) CASCADE;
4-
DROP FUNCTION IF EXISTS unaccent(text) CASCADE;
5-
DROP TEXT SEARCH DICTIONARY IF EXISTS unaccent CASCADE;
6-
DROP TEXT SEARCH TEMPLATE IF EXISTS unaccent CASCADE;
7-
DROP FUNCTION IF EXISTS unaccent_init(internal) CASCADE;
8-
DROP FUNCTION IF EXISTS unaccent_lexize(internal,internal,internal,internal) CASCADE;
3+
-- Adjust this setting to control where the objects get dropped.
4+
SET search_path = public;
95

6+
DROP FUNCTION unaccent(regdictionary, text);
7+
DROP FUNCTION unaccent(text);
8+
DROP TEXT SEARCH DICTIONARY unaccent;
9+
DROP TEXT SEARCH TEMPLATE unaccent;
10+
DROP FUNCTION unaccent_init(internal);
11+
DROP FUNCTION unaccent_lexize(internal,internal,internal,internal);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy