Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit29faadc

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 parentda8d684 commit29faadc

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 CRETURNS NULL ON NULL INPUT IMMUTABLE;
9+
LANGUAGE CSTRICT;
710

811
CREATE OR REPLACE FUNCTION unaccent(text)
912
RETURNS text
1013
AS 'MODULE_PATHNAME', 'unaccent_dict'
11-
LANGUAGE CRETURNS NULL ON NULL INPUT IMMUTABLE;
14+
LANGUAGE CSTRICT;
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-
DROPFUNCTION IF EXISTS unaccent(regdictionary,text) CASCADE;
4-
DROPFUNCTION IF EXISTS unaccent(text) CASCADE;
5-
DROPTEXT SEARCH DICTIONARY IF EXISTS unaccent CASCADE;
6-
DROPTEXT SEARCH TEMPLATE IF EXISTS unaccent CASCADE;
7-
DROPFUNCTION IF EXISTS unaccent_init(internal) CASCADE;
8-
DROPFUNCTION 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+
DROPFUNCTION unaccent(regdictionary,text);
7+
DROPFUNCTION unaccent(text);
8+
DROPTEXT SEARCH DICTIONARY unaccent;
9+
DROPTEXT SEARCH TEMPLATE unaccent;
10+
DROPFUNCTION unaccent_init(internal);
11+
DROPFUNCTION unaccent_lexize(internal,internal,internal,internal);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp