mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Convert contrib modules to use the extension facility.
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
This commit is contained in:
1
contrib/fuzzystrmatch/.gitignore
vendored
1
contrib/fuzzystrmatch/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/fuzzystrmatch.sql
|
@ -2,8 +2,9 @@
|
||||
|
||||
MODULE_big = fuzzystrmatch
|
||||
OBJS = fuzzystrmatch.o dmetaphone.o
|
||||
DATA_built = fuzzystrmatch.sql
|
||||
DATA = uninstall_fuzzystrmatch.sql
|
||||
|
||||
EXTENSION = fuzzystrmatch
|
||||
DATA = fuzzystrmatch--1.0.sql fuzzystrmatch--unpackaged--1.0.sql
|
||||
|
||||
ifdef USE_PGXS
|
||||
PG_CONFIG = pg_config
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* contrib/fuzzystrmatch/fuzzystrmatch.sql.in */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
/* contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql */
|
||||
|
||||
CREATE OR REPLACE FUNCTION levenshtein (text,text) RETURNS int
|
||||
AS 'MODULE_PATHNAME','levenshtein'
|
12
contrib/fuzzystrmatch/fuzzystrmatch--unpackaged--1.0.sql
Normal file
12
contrib/fuzzystrmatch/fuzzystrmatch--unpackaged--1.0.sql
Normal file
@ -0,0 +1,12 @@
|
||||
/* contrib/fuzzystrmatch/fuzzystrmatch--unpackaged--1.0.sql */
|
||||
|
||||
ALTER EXTENSION fuzzystrmatch ADD function levenshtein(text,text);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function levenshtein(text,text,integer,integer,integer);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function levenshtein_less_equal(text,text,integer);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function levenshtein_less_equal(text,text,integer,integer,integer,integer);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function metaphone(text,integer);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function soundex(text);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function text_soundex(text);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function difference(text,text);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function dmetaphone(text);
|
||||
ALTER EXTENSION fuzzystrmatch ADD function dmetaphone_alt(text);
|
5
contrib/fuzzystrmatch/fuzzystrmatch.control
Normal file
5
contrib/fuzzystrmatch/fuzzystrmatch.control
Normal file
@ -0,0 +1,5 @@
|
||||
# fuzzystrmatch extension
|
||||
comment = 'determine similarities and distance between strings'
|
||||
default_version = '1.0'
|
||||
module_pathname = '$libdir/fuzzystrmatch'
|
||||
relocatable = true
|
@ -1,24 +0,0 @@
|
||||
/* contrib/fuzzystrmatch/uninstall_fuzzystrmatch.sql */
|
||||
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
DROP FUNCTION dmetaphone_alt (text);
|
||||
|
||||
DROP FUNCTION dmetaphone (text);
|
||||
|
||||
DROP FUNCTION difference(text,text);
|
||||
|
||||
DROP FUNCTION text_soundex(text);
|
||||
|
||||
DROP FUNCTION soundex(text);
|
||||
|
||||
DROP FUNCTION metaphone (text,int);
|
||||
|
||||
DROP FUNCTION levenshtein (text,text,int,int,int);
|
||||
|
||||
DROP FUNCTION levenshtein (text,text);
|
||||
|
||||
DROP FUNCTION levenshtein_less_equal (text,text,int);
|
||||
|
||||
DROP FUNCTION levenshtein_less_equal (text,text,int,int,int,int);
|
Reference in New Issue
Block a user