summaryrefslogtreecommitdiff
path: root/contrib/fuzzystrmatch
diff options
context:
space:
mode:
authorBruce Momjian2007-11-11 03:25:35 +0000
committerBruce Momjian2007-11-11 03:25:35 +0000
commit926bbab44832ae2763392077ecefa029d14c8544 (patch)
treee70fd1806e8a04b019808e1c71428568eb900f8c /contrib/fuzzystrmatch
parent541ff409cc341ce1e0212fc6a7d67eef6709b6b4 (diff)
Make /contrib install/uninstall script consistent:
remove transactions use create or replace function make formatting consistent set search patch on first line Add documentation on modifying *.sql to set the search patch, and mention that major upgrades should still run the installation scripts. Some of these issues were spotted by Tom today.
Diffstat (limited to 'contrib/fuzzystrmatch')
-rw-r--r--contrib/fuzzystrmatch/fuzzystrmatch.sql.in14
-rw-r--r--contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql2
2 files changed, 8 insertions, 8 deletions
diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.sql.in b/contrib/fuzzystrmatch/fuzzystrmatch.sql.in
index b4e4fadc449..5160b9d7d56 100644
--- a/contrib/fuzzystrmatch/fuzzystrmatch.sql.in
+++ b/contrib/fuzzystrmatch/fuzzystrmatch.sql.in
@@ -1,30 +1,30 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-CREATE FUNCTION levenshtein (text,text) RETURNS int
+CREATE OR REPLACE FUNCTION levenshtein (text,text) RETURNS int
AS 'MODULE_PATHNAME','levenshtein'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION metaphone (text,int) RETURNS text
+CREATE OR REPLACE FUNCTION metaphone (text,int) RETURNS text
AS 'MODULE_PATHNAME','metaphone'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION soundex(text) RETURNS text
+CREATE OR REPLACE FUNCTION soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION text_soundex(text) RETURNS text
+CREATE OR REPLACE FUNCTION text_soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION difference(text,text) RETURNS int
+CREATE OR REPLACE FUNCTION difference(text,text) RETURNS int
AS 'MODULE_PATHNAME', 'difference'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION dmetaphone (text) RETURNS text
+CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text
AS 'MODULE_PATHNAME', 'dmetaphone'
LANGUAGE C IMMUTABLE STRICT;
-CREATE FUNCTION dmetaphone_alt (text) RETURNS text
+CREATE OR REPLACE FUNCTION dmetaphone_alt (text) RETURNS text
AS 'MODULE_PATHNAME', 'dmetaphone_alt'
LANGUAGE C IMMUTABLE STRICT;
diff --git a/contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql b/contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql
index ee377e47b42..c2cfd815fc6 100644
--- a/contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql
+++ b/contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql
@@ -1,4 +1,4 @@
--- Adjust this setting to control where the objects get created.
+-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION dmetaphone_alt (text);