mirror of https://github.com/postgres/postgres
Update fuzzystrmatch extension for parallel query.
All functions provided by this extension are PARALLEL SAFE. Andreas Karlsson
This commit is contained in:
parent
50e5226bb3
commit
ffab82fbda
|
@ -4,7 +4,8 @@ MODULE_big = fuzzystrmatch
|
|||
OBJS = fuzzystrmatch.o dmetaphone.o $(WIN32RES)
|
||||
|
||||
EXTENSION = fuzzystrmatch
|
||||
DATA = fuzzystrmatch--1.0.sql fuzzystrmatch--unpackaged--1.0.sql
|
||||
DATA = fuzzystrmatch--1.1.sql fuzzystrmatch--1.0--1.1.sql \
|
||||
fuzzystrmatch--unpackaged--1.0.sql
|
||||
PGFILEDESC = "fuzzystrmatch - similarities and distance between strings"
|
||||
|
||||
ifdef USE_PGXS
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* contrib/fuzzystrmatch/fuzzystrmatch--1.0--1.1.sql */
|
||||
|
||||
-- complain if script is sourced in psql, rather than via ALTER EXTENSION
|
||||
\echo Use "ALTER EXTENSION fuzzystrmatch UPDATE TO '1.1'" to load this file. \quit
|
||||
|
||||
ALTER FUNCTION levenshtein(text, text) PARALLEL SAFE;
|
||||
ALTER FUNCTION levenshtein(text, text, int, int, int) PARALLEL SAFE;
|
||||
ALTER FUNCTION levenshtein_less_equal(text, text, int) PARALLEL SAFE;
|
||||
ALTER FUNCTION levenshtein_less_equal(text, text, int, int, int, int) PARALLEL SAFE;
|
||||
ALTER FUNCTION metaphone(text, int) PARALLEL SAFE;
|
||||
ALTER FUNCTION soundex(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION text_soundex(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION difference(text, text) PARALLEL SAFE;
|
||||
ALTER FUNCTION dmetaphone(text) PARALLEL SAFE;
|
||||
ALTER FUNCTION dmetaphone_alt(text) PARALLEL SAFE;
|
|
@ -1,44 +1,44 @@
|
|||
/* contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql */
|
||||
/* contrib/fuzzystrmatch/fuzzystrmatch--1.1.sql */
|
||||
|
||||
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
||||
\echo Use "CREATE EXTENSION fuzzystrmatch" to load this file. \quit
|
||||
|
||||
CREATE FUNCTION levenshtein (text,text) RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION levenshtein (text,text,int,int,int) RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein_with_costs'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION levenshtein_less_equal (text,text,int) RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein_less_equal'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION levenshtein_less_equal (text,text,int,int,int,int) RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein_less_equal_with_costs'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION metaphone (text,int) RETURNS text
|
||||
AS 'MODULE_PATHNAME','metaphone'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION soundex(text) RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'soundex'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION text_soundex(text) RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'soundex'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION difference(text,text) RETURNS int
|
||||
AS 'MODULE_PATHNAME', 'difference'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION dmetaphone (text) RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'dmetaphone'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION dmetaphone_alt (text) RETURNS text
|
||||
AS 'MODULE_PATHNAME', 'dmetaphone_alt'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
|
@ -1,5 +1,5 @@
|
|||
# fuzzystrmatch extension
|
||||
comment = 'determine similarities and distance between strings'
|
||||
default_version = '1.0'
|
||||
default_version = '1.1'
|
||||
module_pathname = '$libdir/fuzzystrmatch'
|
||||
relocatable = true
|
||||
|
|
Loading…
Reference in New Issue