1
0
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:
Tom Lane
2011-02-13 20:06:41 -05:00
parent e693e97d75
commit 629b3af27d
264 changed files with 2026 additions and 2349 deletions

View File

@ -1 +0,0 @@
/fuzzystrmatch.sql

View File

@ -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

View File

@ -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'

View 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);

View File

@ -0,0 +1,5 @@
# fuzzystrmatch extension
comment = 'determine similarities and distance between strings'
default_version = '1.0'
module_pathname = '$libdir/fuzzystrmatch'
relocatable = true

View File

@ -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);