2016-06-07 23:25:53 +08:00
|
|
|
/* contrib/fuzzystrmatch/fuzzystrmatch--1.1.sql */
|
2001-08-08 00:47:43 +08:00
|
|
|
|
2011-10-13 03:45:03 +08:00
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
|
|
\echo Use "CREATE EXTENSION fuzzystrmatch" to load this file. \quit
|
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION levenshtein (text,text) RETURNS int
|
2002-10-19 02:41:22 +08:00
|
|
|
AS 'MODULE_PATHNAME','levenshtein'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2002-10-19 02:41:22 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION levenshtein (text,text,int,int,int) RETURNS int
|
2008-04-04 05:13:07 +08:00
|
|
|
AS 'MODULE_PATHNAME','levenshtein_with_costs'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2008-04-04 05:13:07 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION levenshtein_less_equal (text,text,int) RETURNS int
|
2010-10-19 21:51:06 +08:00
|
|
|
AS 'MODULE_PATHNAME','levenshtein_less_equal'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2010-10-19 21:51:06 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION levenshtein_less_equal (text,text,int,int,int,int) RETURNS int
|
2010-10-19 21:51:06 +08:00
|
|
|
AS 'MODULE_PATHNAME','levenshtein_less_equal_with_costs'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2010-10-19 21:51:06 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION metaphone (text,int) RETURNS text
|
2002-10-19 02:41:22 +08:00
|
|
|
AS 'MODULE_PATHNAME','metaphone'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2001-08-08 02:16:01 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION soundex(text) RETURNS text
|
2002-10-19 02:41:22 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'soundex'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2001-08-08 02:16:01 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION text_soundex(text) RETURNS text
|
2002-10-19 02:41:22 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'soundex'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2005-01-26 16:04:04 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION difference(text,text) RETURNS int
|
2005-01-26 16:04:04 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'difference'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2004-07-01 11:25:48 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION dmetaphone (text) RETURNS text
|
2005-01-26 16:04:04 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'dmetaphone'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
2004-07-01 11:25:48 +08:00
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION dmetaphone_alt (text) RETURNS text
|
2005-01-26 16:04:04 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'dmetaphone_alt'
|
2016-06-07 23:25:53 +08:00
|
|
|
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|