diff options
| author | Tom Lane | 2011-02-14 01:06:41 +0000 |
|---|---|---|
| committer | Tom Lane | 2011-02-14 03:54:49 +0000 |
| commit | 629b3af27d5c2bc9d6e16b22b943ad651d4ecb56 (patch) | |
| tree | eae9ef9a69ae6ad7aacb2428e3cf15ec77873ac5 /contrib/dict_int | |
| parent | e693e97d754ed6812ea115170afeae4bf8797d3f (diff) | |
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
Diffstat (limited to 'contrib/dict_int')
| -rw-r--r-- | contrib/dict_int/.gitignore | 1 | ||||
| -rw-r--r-- | contrib/dict_int/Makefile | 6 | ||||
| -rw-r--r-- | contrib/dict_int/dict_int--1.0.sql (renamed from contrib/dict_int/dict_int.sql.in) | 5 | ||||
| -rw-r--r-- | contrib/dict_int/dict_int--unpackaged--1.0.sql | 6 | ||||
| -rw-r--r-- | contrib/dict_int/dict_int.control | 5 | ||||
| -rw-r--r-- | contrib/dict_int/expected/dict_int.out | 8 | ||||
| -rw-r--r-- | contrib/dict_int/sql/dict_int.sql | 10 | ||||
| -rw-r--r-- | contrib/dict_int/uninstall_dict_int.sql | 12 |
8 files changed, 18 insertions, 35 deletions
diff --git a/contrib/dict_int/.gitignore b/contrib/dict_int/.gitignore index 932dda6d84..19b6c5ba42 100644 --- a/contrib/dict_int/.gitignore +++ b/contrib/dict_int/.gitignore @@ -1,3 +1,2 @@ -/dict_int.sql # Generated subdirectories /results/ diff --git a/contrib/dict_int/Makefile b/contrib/dict_int/Makefile index 17d9eaa5f7..3a3fc368dc 100644 --- a/contrib/dict_int/Makefile +++ b/contrib/dict_int/Makefile @@ -2,8 +2,10 @@ MODULE_big = dict_int OBJS = dict_int.o -DATA_built = dict_int.sql -DATA = uninstall_dict_int.sql + +EXTENSION = dict_int +DATA = dict_int--1.0.sql dict_int--unpackaged--1.0.sql + REGRESS = dict_int ifdef USE_PGXS diff --git a/contrib/dict_int/dict_int.sql.in b/contrib/dict_int/dict_int--1.0.sql index 9d7ef7d9c1..a0e2b9af64 100644 --- a/contrib/dict_int/dict_int.sql.in +++ b/contrib/dict_int/dict_int--1.0.sql @@ -1,7 +1,4 @@ -/* contrib/dict_int/dict_int.sql.in */ - --- Adjust this setting to control where the objects get created. -SET search_path = public; +/* contrib/dict_int/dict_int--1.0.sql */ CREATE OR REPLACE FUNCTION dintdict_init(internal) RETURNS internal diff --git a/contrib/dict_int/dict_int--unpackaged--1.0.sql b/contrib/dict_int/dict_int--unpackaged--1.0.sql new file mode 100644 index 0000000000..f89218a565 --- /dev/null +++ b/contrib/dict_int/dict_int--unpackaged--1.0.sql @@ -0,0 +1,6 @@ +/* contrib/dict_int/dict_int--unpackaged--1.0.sql */ + +ALTER EXTENSION dict_int ADD function dintdict_init(internal); +ALTER EXTENSION dict_int ADD function dintdict_lexize(internal,internal,internal,internal); +ALTER EXTENSION dict_int ADD text search template intdict_template; +ALTER EXTENSION dict_int ADD text search dictionary intdict; diff --git a/contrib/dict_int/dict_int.control b/contrib/dict_int/dict_int.control new file mode 100644 index 0000000000..6e2d2b351a --- /dev/null +++ b/contrib/dict_int/dict_int.control @@ -0,0 +1,5 @@ +# dict_int extension +comment = 'text search dictionary template for integers' +default_version = '1.0' +module_pathname = '$libdir/dict_int' +relocatable = true diff --git a/contrib/dict_int/expected/dict_int.out b/contrib/dict_int/expected/dict_int.out index 7feb493e15..3b766ec52a 100644 --- a/contrib/dict_int/expected/dict_int.out +++ b/contrib/dict_int/expected/dict_int.out @@ -1,10 +1,4 @@ --- --- first, define the datatype. Turn off echoing so that expected file --- does not depend on contents of this file. --- -SET client_min_messages = warning; -\set ECHO none -RESET client_min_messages; +CREATE EXTENSION dict_int; --lexize select ts_lexize('intdict', '511673'); ts_lexize diff --git a/contrib/dict_int/sql/dict_int.sql b/contrib/dict_int/sql/dict_int.sql index 3a335f8f3d..8ffec6b770 100644 --- a/contrib/dict_int/sql/dict_int.sql +++ b/contrib/dict_int/sql/dict_int.sql @@ -1,12 +1,4 @@ --- --- first, define the datatype. Turn off echoing so that expected file --- does not depend on contents of this file. --- -SET client_min_messages = warning; -\set ECHO none -\i dict_int.sql -\set ECHO all -RESET client_min_messages; +CREATE EXTENSION dict_int; --lexize select ts_lexize('intdict', '511673'); diff --git a/contrib/dict_int/uninstall_dict_int.sql b/contrib/dict_int/uninstall_dict_int.sql deleted file mode 100644 index 0467fa22ba..0000000000 --- a/contrib/dict_int/uninstall_dict_int.sql +++ /dev/null @@ -1,12 +0,0 @@ -/* contrib/dict_int/uninstall_dict_int.sql */ - --- Adjust this setting to control where the objects get dropped. -SET search_path = public; - -DROP TEXT SEARCH DICTIONARY intdict; - -DROP TEXT SEARCH TEMPLATE intdict_template; - -DROP FUNCTION dintdict_init(internal); - -DROP FUNCTION dintdict_lexize(internal,internal,internal,internal); |
