mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +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/tsearch2/.gitignore
vendored
1
contrib/tsearch2/.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
/tsearch2.sql
|
||||
# Generated subdirectories
|
||||
/results/
|
||||
|
@ -1,8 +1,10 @@
|
||||
# contrib/tsearch2/Makefile
|
||||
|
||||
MODULES = tsearch2
|
||||
DATA_built = tsearch2.sql
|
||||
DATA = uninstall_tsearch2.sql
|
||||
|
||||
EXTENSION = tsearch2
|
||||
DATA = tsearch2--1.0.sql tsearch2--unpackaged--1.0.sql
|
||||
|
||||
REGRESS = tsearch2
|
||||
|
||||
ifdef USE_PGXS
|
||||
|
@ -1,10 +1,4 @@
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of tsearch2.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION tsearch2;
|
||||
--tsvector
|
||||
SELECT '1'::tsvector;
|
||||
tsvector
|
||||
|
@ -1,10 +1,4 @@
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of tsearch2.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION tsearch2;
|
||||
--tsvector
|
||||
SELECT '1'::tsvector;
|
||||
tsvector
|
||||
|
@ -1,12 +1,4 @@
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of tsearch2.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
\i tsearch2.sql
|
||||
\set ECHO all
|
||||
RESET client_min_messages;
|
||||
CREATE EXTENSION tsearch2;
|
||||
|
||||
--tsvector
|
||||
SELECT '1'::tsvector;
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* contrib/tsearch2/tsearch2.sql.in */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
/* contrib/tsearch2/tsearch2--1.0.sql */
|
||||
|
||||
-- These domains are just to catch schema-qualified references to the
|
||||
-- old data types.
|
100
contrib/tsearch2/tsearch2--unpackaged--1.0.sql
Normal file
100
contrib/tsearch2/tsearch2--unpackaged--1.0.sql
Normal file
@ -0,0 +1,100 @@
|
||||
/* contrib/tsearch2/tsearch2--unpackaged--1.0.sql */
|
||||
|
||||
ALTER EXTENSION tsearch2 ADD type @extschema@.tsvector;
|
||||
ALTER EXTENSION tsearch2 ADD type @extschema@.tsquery;
|
||||
ALTER EXTENSION tsearch2 ADD type @extschema@.gtsvector;
|
||||
ALTER EXTENSION tsearch2 ADD type gtsq;
|
||||
ALTER EXTENSION tsearch2 ADD function lexize(oid,text);
|
||||
ALTER EXTENSION tsearch2 ADD function lexize(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function lexize(text);
|
||||
ALTER EXTENSION tsearch2 ADD function set_curdict(integer);
|
||||
ALTER EXTENSION tsearch2 ADD function set_curdict(text);
|
||||
ALTER EXTENSION tsearch2 ADD function dex_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function dex_lexize(internal,internal,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function snb_en_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function snb_lexize(internal,internal,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function snb_ru_init_koi8(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function snb_ru_init_utf8(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function snb_ru_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function spell_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function spell_lexize(internal,internal,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function syn_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function syn_lexize(internal,internal,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.thesaurus_init(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function thesaurus_lexize(internal,internal,integer,internal);
|
||||
ALTER EXTENSION tsearch2 ADD type tokentype;
|
||||
ALTER EXTENSION tsearch2 ADD function token_type(integer);
|
||||
ALTER EXTENSION tsearch2 ADD function token_type(text);
|
||||
ALTER EXTENSION tsearch2 ADD function token_type();
|
||||
ALTER EXTENSION tsearch2 ADD function set_curprs(integer);
|
||||
ALTER EXTENSION tsearch2 ADD function set_curprs(text);
|
||||
ALTER EXTENSION tsearch2 ADD type tokenout;
|
||||
ALTER EXTENSION tsearch2 ADD function parse(oid,text);
|
||||
ALTER EXTENSION tsearch2 ADD function parse(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function parse(text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.prsd_start(internal,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function prsd_getlexeme(internal,internal,internal);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.prsd_end(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.prsd_lextype(internal);
|
||||
ALTER EXTENSION tsearch2 ADD function prsd_headline(internal,internal,internal);
|
||||
ALTER EXTENSION tsearch2 ADD function set_curcfg(integer);
|
||||
ALTER EXTENSION tsearch2 ADD function set_curcfg(text);
|
||||
ALTER EXTENSION tsearch2 ADD function show_curcfg();
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.length(tsvector);
|
||||
ALTER EXTENSION tsearch2 ADD function to_tsvector(oid,text);
|
||||
ALTER EXTENSION tsearch2 ADD function to_tsvector(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.to_tsvector(text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.strip(tsvector);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.setweight(tsvector,"char");
|
||||
ALTER EXTENSION tsearch2 ADD function concat(tsvector,tsvector);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.querytree(tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function to_tsquery(oid,text);
|
||||
ALTER EXTENSION tsearch2 ADD function to_tsquery(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.to_tsquery(text);
|
||||
ALTER EXTENSION tsearch2 ADD function plainto_tsquery(oid,text);
|
||||
ALTER EXTENSION tsearch2 ADD function plainto_tsquery(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.plainto_tsquery(text);
|
||||
ALTER EXTENSION tsearch2 ADD function tsearch2();
|
||||
ALTER EXTENSION tsearch2 ADD function rank(real[],tsvector,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rank(real[],tsvector,tsquery,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function rank(tsvector,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rank(tsvector,tsquery,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function rank_cd(real[],tsvector,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rank_cd(real[],tsvector,tsquery,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function rank_cd(tsvector,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rank_cd(tsvector,tsquery,integer);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(oid,text,tsquery,text);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(oid,text,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(text,text,tsquery,text);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(text,text,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(text,tsquery,text);
|
||||
ALTER EXTENSION tsearch2 ADD function headline(text,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD operator family gist_tsvector_ops using gist;
|
||||
ALTER EXTENSION tsearch2 ADD operator class gist_tsvector_ops using gist;
|
||||
ALTER EXTENSION tsearch2 ADD type statinfo;
|
||||
ALTER EXTENSION tsearch2 ADD function stat(text);
|
||||
ALTER EXTENSION tsearch2 ADD function stat(text,text);
|
||||
ALTER EXTENSION tsearch2 ADD function reset_tsearch();
|
||||
ALTER EXTENSION tsearch2 ADD function get_covers(tsvector,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD type tsdebug;
|
||||
ALTER EXTENSION tsearch2 ADD function _get_parser_from_curcfg();
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.ts_debug(text);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.numnode(tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.tsquery_and(tsquery,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.tsquery_or(tsquery,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.tsquery_not(tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rewrite(tsquery,text);
|
||||
ALTER EXTENSION tsearch2 ADD function rewrite(tsquery,tsquery,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rewrite_accum(tsquery,tsquery[]);
|
||||
ALTER EXTENSION tsearch2 ADD function rewrite_finish(tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function rewrite(tsquery[]);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.tsq_mcontains(tsquery,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD function @extschema@.tsq_mcontained(tsquery,tsquery);
|
||||
ALTER EXTENSION tsearch2 ADD operator family gist_tp_tsquery_ops using gist;
|
||||
ALTER EXTENSION tsearch2 ADD operator class gist_tp_tsquery_ops using gist;
|
||||
ALTER EXTENSION tsearch2 ADD operator family gin_tsvector_ops using gin;
|
||||
ALTER EXTENSION tsearch2 ADD operator class gin_tsvector_ops using gin;
|
||||
ALTER EXTENSION tsearch2 ADD operator family @extschema@.tsvector_ops using btree;
|
||||
ALTER EXTENSION tsearch2 ADD operator class @extschema@.tsvector_ops using btree;
|
||||
ALTER EXTENSION tsearch2 ADD operator family @extschema@.tsquery_ops using btree;
|
||||
ALTER EXTENSION tsearch2 ADD operator class @extschema@.tsquery_ops using btree;
|
5
contrib/tsearch2/tsearch2.control
Normal file
5
contrib/tsearch2/tsearch2.control
Normal file
@ -0,0 +1,5 @@
|
||||
# tsearch2 extension
|
||||
comment = 'compatibility package for pre-8.3 text search functions'
|
||||
default_version = '1.0'
|
||||
module_pathname = '$libdir/tsearch2'
|
||||
relocatable = true
|
@ -1,96 +0,0 @@
|
||||
/* contrib/tsearch2/uninstall_tsearch2.sql */
|
||||
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public, pg_catalog;
|
||||
|
||||
DROP DOMAIN tsvector CASCADE;
|
||||
DROP DOMAIN tsquery CASCADE;
|
||||
DROP DOMAIN gtsvector CASCADE;
|
||||
DROP DOMAIN gtsq CASCADE;
|
||||
|
||||
DROP TYPE tokentype CASCADE;
|
||||
DROP TYPE tokenout CASCADE;
|
||||
DROP TYPE statinfo CASCADE;
|
||||
DROP TYPE tsdebug CASCADE;
|
||||
|
||||
DROP OPERATOR CLASS tsquery_ops USING btree CASCADE;
|
||||
|
||||
DROP OPERATOR CLASS tsvector_ops USING btree CASCADE;
|
||||
|
||||
DROP OPERATOR CLASS gin_tsvector_ops USING gin CASCADE;
|
||||
|
||||
DROP OPERATOR CLASS gist_tp_tsquery_ops USING gist CASCADE;
|
||||
|
||||
DROP OPERATOR CLASS gist_tsvector_ops USING gist CASCADE;
|
||||
|
||||
DROP FUNCTION lexize(oid, text) ;
|
||||
DROP FUNCTION lexize(text, text);
|
||||
DROP FUNCTION lexize(text);
|
||||
DROP FUNCTION set_curdict(int);
|
||||
DROP FUNCTION set_curdict(text);
|
||||
DROP FUNCTION dex_init(internal);
|
||||
DROP FUNCTION dex_lexize(internal,internal,int4);
|
||||
DROP FUNCTION snb_en_init(internal);
|
||||
DROP FUNCTION snb_lexize(internal,internal,int4);
|
||||
DROP FUNCTION snb_ru_init_koi8(internal);
|
||||
DROP FUNCTION snb_ru_init_utf8(internal);
|
||||
DROP FUNCTION snb_ru_init(internal);
|
||||
DROP FUNCTION spell_init(internal);
|
||||
DROP FUNCTION spell_lexize(internal,internal,int4);
|
||||
DROP FUNCTION syn_init(internal);
|
||||
DROP FUNCTION syn_lexize(internal,internal,int4);
|
||||
DROP FUNCTION thesaurus_init(internal);
|
||||
DROP FUNCTION thesaurus_lexize(internal,internal,int4,internal);
|
||||
DROP FUNCTION set_curprs(int);
|
||||
DROP FUNCTION set_curprs(text);
|
||||
DROP FUNCTION prsd_start(internal,int4);
|
||||
DROP FUNCTION prsd_getlexeme(internal,internal,internal);
|
||||
DROP FUNCTION prsd_end(internal);
|
||||
DROP FUNCTION prsd_lextype(internal);
|
||||
DROP FUNCTION prsd_headline(internal,internal,internal);
|
||||
DROP FUNCTION set_curcfg(int);
|
||||
DROP FUNCTION set_curcfg(text);
|
||||
DROP FUNCTION show_curcfg();
|
||||
DROP FUNCTION length(tsvector);
|
||||
DROP FUNCTION to_tsvector(oid, text);
|
||||
DROP FUNCTION to_tsvector(text, text);
|
||||
DROP FUNCTION to_tsvector(text);
|
||||
DROP FUNCTION strip(tsvector);
|
||||
DROP FUNCTION setweight(tsvector,"char");
|
||||
DROP FUNCTION concat(tsvector,tsvector);
|
||||
DROP FUNCTION querytree(tsquery);
|
||||
DROP FUNCTION to_tsquery(oid, text);
|
||||
DROP FUNCTION to_tsquery(text, text);
|
||||
DROP FUNCTION to_tsquery(text);
|
||||
DROP FUNCTION plainto_tsquery(oid, text);
|
||||
DROP FUNCTION plainto_tsquery(text, text);
|
||||
DROP FUNCTION plainto_tsquery(text);
|
||||
DROP FUNCTION tsearch2() CASCADE;
|
||||
DROP FUNCTION rank(float4[], tsvector, tsquery);
|
||||
DROP FUNCTION rank(float4[], tsvector, tsquery, int4);
|
||||
DROP FUNCTION rank(tsvector, tsquery);
|
||||
DROP FUNCTION rank(tsvector, tsquery, int4);
|
||||
DROP FUNCTION rank_cd(float4[], tsvector, tsquery);
|
||||
DROP FUNCTION rank_cd(float4[], tsvector, tsquery, int4);
|
||||
DROP FUNCTION rank_cd(tsvector, tsquery);
|
||||
DROP FUNCTION rank_cd(tsvector, tsquery, int4);
|
||||
DROP FUNCTION headline(oid, text, tsquery, text);
|
||||
DROP FUNCTION headline(oid, text, tsquery);
|
||||
DROP FUNCTION headline(text, text, tsquery, text);
|
||||
DROP FUNCTION headline(text, text, tsquery);
|
||||
DROP FUNCTION headline(text, tsquery, text);
|
||||
DROP FUNCTION headline(text, tsquery);
|
||||
DROP FUNCTION get_covers(tsvector,tsquery);
|
||||
DROP FUNCTION _get_parser_from_curcfg();
|
||||
DROP FUNCTION numnode(tsquery);
|
||||
DROP FUNCTION tsquery_and(tsquery,tsquery);
|
||||
DROP FUNCTION tsquery_or(tsquery,tsquery);
|
||||
DROP FUNCTION tsquery_not(tsquery);
|
||||
DROP FUNCTION rewrite(tsquery, text);
|
||||
DROP FUNCTION rewrite(tsquery, tsquery, tsquery);
|
||||
DROP AGGREGATE rewrite (tsquery[]);
|
||||
DROP FUNCTION rewrite_accum(tsquery,tsquery[]);
|
||||
DROP FUNCTION rewrite_finish(tsquery);
|
||||
DROP FUNCTION tsq_mcontains(tsquery, tsquery);
|
||||
DROP FUNCTION tsq_mcontained(tsquery, tsquery);
|
||||
DROP FUNCTION reset_tsearch();
|
Reference in New Issue
Block a user