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/citext/.gitignore
vendored
1
contrib/citext/.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
/citext.sql
|
||||
# Generated subdirectories
|
||||
/results/
|
||||
|
@ -1,8 +1,10 @@
|
||||
# contrib/citext/Makefile
|
||||
|
||||
MODULES = citext
|
||||
DATA_built = citext.sql
|
||||
DATA = uninstall_citext.sql
|
||||
|
||||
EXTENSION = citext
|
||||
DATA = citext--1.0.sql citext--unpackaged--1.0.sql
|
||||
|
||||
REGRESS = citext
|
||||
|
||||
ifdef USE_PGXS
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* contrib/citext/citext.sql.in */
|
||||
|
||||
-- Adjust this setting to control where the objects get created.
|
||||
SET search_path = public;
|
||||
/* contrib/citext/citext--1.0.sql */
|
||||
|
||||
--
|
||||
-- PostgreSQL code for CITEXT.
|
76
contrib/citext/citext--unpackaged--1.0.sql
Normal file
76
contrib/citext/citext--unpackaged--1.0.sql
Normal file
@ -0,0 +1,76 @@
|
||||
/* contrib/citext/citext--unpackaged--1.0.sql */
|
||||
|
||||
ALTER EXTENSION citext ADD type citext;
|
||||
ALTER EXTENSION citext ADD function citextin(cstring);
|
||||
ALTER EXTENSION citext ADD function citextout(citext);
|
||||
ALTER EXTENSION citext ADD function citextrecv(internal);
|
||||
ALTER EXTENSION citext ADD function citextsend(citext);
|
||||
ALTER EXTENSION citext ADD function citext(character);
|
||||
ALTER EXTENSION citext ADD function citext(boolean);
|
||||
ALTER EXTENSION citext ADD function citext(inet);
|
||||
ALTER EXTENSION citext ADD cast (citext as text);
|
||||
ALTER EXTENSION citext ADD cast (citext as character varying);
|
||||
ALTER EXTENSION citext ADD cast (citext as character);
|
||||
ALTER EXTENSION citext ADD cast (text as citext);
|
||||
ALTER EXTENSION citext ADD cast (character varying as citext);
|
||||
ALTER EXTENSION citext ADD cast (character as citext);
|
||||
ALTER EXTENSION citext ADD cast (boolean as citext);
|
||||
ALTER EXTENSION citext ADD cast (inet as citext);
|
||||
ALTER EXTENSION citext ADD function citext_eq(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_ne(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_lt(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_le(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_gt(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_ge(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator <>(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator =(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator >(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator >=(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator <(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator <=(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_cmp(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_hash(citext);
|
||||
ALTER EXTENSION citext ADD operator family citext_ops using btree;
|
||||
ALTER EXTENSION citext ADD operator class citext_ops using btree;
|
||||
ALTER EXTENSION citext ADD operator family citext_ops using hash;
|
||||
ALTER EXTENSION citext ADD operator class citext_ops using hash;
|
||||
ALTER EXTENSION citext ADD function citext_smaller(citext,citext);
|
||||
ALTER EXTENSION citext ADD function citext_larger(citext,citext);
|
||||
ALTER EXTENSION citext ADD function min(citext);
|
||||
ALTER EXTENSION citext ADD function max(citext);
|
||||
ALTER EXTENSION citext ADD function texticlike(citext,citext);
|
||||
ALTER EXTENSION citext ADD function texticnlike(citext,citext);
|
||||
ALTER EXTENSION citext ADD function texticregexeq(citext,citext);
|
||||
ALTER EXTENSION citext ADD function texticregexne(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator !~(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator ~(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator !~*(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator ~*(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator !~~(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator ~~(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator !~~*(citext,citext);
|
||||
ALTER EXTENSION citext ADD operator ~~*(citext,citext);
|
||||
ALTER EXTENSION citext ADD function texticlike(citext,text);
|
||||
ALTER EXTENSION citext ADD function texticnlike(citext,text);
|
||||
ALTER EXTENSION citext ADD function texticregexeq(citext,text);
|
||||
ALTER EXTENSION citext ADD function texticregexne(citext,text);
|
||||
ALTER EXTENSION citext ADD operator !~(citext,text);
|
||||
ALTER EXTENSION citext ADD operator ~(citext,text);
|
||||
ALTER EXTENSION citext ADD operator !~*(citext,text);
|
||||
ALTER EXTENSION citext ADD operator ~*(citext,text);
|
||||
ALTER EXTENSION citext ADD operator !~~(citext,text);
|
||||
ALTER EXTENSION citext ADD operator ~~(citext,text);
|
||||
ALTER EXTENSION citext ADD operator !~~*(citext,text);
|
||||
ALTER EXTENSION citext ADD operator ~~*(citext,text);
|
||||
ALTER EXTENSION citext ADD function regexp_matches(citext,citext);
|
||||
ALTER EXTENSION citext ADD function regexp_matches(citext,citext,text);
|
||||
ALTER EXTENSION citext ADD function regexp_replace(citext,citext,text);
|
||||
ALTER EXTENSION citext ADD function regexp_replace(citext,citext,text,text);
|
||||
ALTER EXTENSION citext ADD function regexp_split_to_array(citext,citext);
|
||||
ALTER EXTENSION citext ADD function regexp_split_to_array(citext,citext,text);
|
||||
ALTER EXTENSION citext ADD function regexp_split_to_table(citext,citext);
|
||||
ALTER EXTENSION citext ADD function regexp_split_to_table(citext,citext,text);
|
||||
ALTER EXTENSION citext ADD function strpos(citext,citext);
|
||||
ALTER EXTENSION citext ADD function replace(citext,citext,citext);
|
||||
ALTER EXTENSION citext ADD function split_part(citext,citext,integer);
|
||||
ALTER EXTENSION citext ADD function translate(citext,citext,text);
|
5
contrib/citext/citext.control
Normal file
5
contrib/citext/citext.control
Normal file
@ -0,0 +1,5 @@
|
||||
# citext extension
|
||||
comment = 'data type for case-insensitive character strings'
|
||||
default_version = '1.0'
|
||||
module_pathname = '$libdir/citext'
|
||||
relocatable = true
|
@ -1,12 +1,7 @@
|
||||
--
|
||||
-- Test citext datatype
|
||||
--
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of citext.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
CREATE EXTENSION citext;
|
||||
-- Test the operators and indexing functions
|
||||
-- Test = and <>.
|
||||
SELECT 'a'::citext = 'a'::citext AS t;
|
||||
|
@ -1,12 +1,7 @@
|
||||
--
|
||||
-- Test citext datatype
|
||||
--
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of citext.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
CREATE EXTENSION citext;
|
||||
-- Test the operators and indexing functions
|
||||
-- Test = and <>.
|
||||
SELECT 'a'::citext = 'a'::citext AS t;
|
||||
|
@ -2,15 +2,7 @@
|
||||
-- Test citext datatype
|
||||
--
|
||||
|
||||
--
|
||||
-- first, define the datatype. Turn off echoing so that expected file
|
||||
-- does not depend on contents of citext.sql.
|
||||
--
|
||||
SET client_min_messages = warning;
|
||||
\set ECHO none
|
||||
\i citext.sql
|
||||
RESET client_min_messages;
|
||||
\set ECHO all
|
||||
CREATE EXTENSION citext;
|
||||
|
||||
-- Test the operators and indexing functions
|
||||
|
||||
|
@ -1,80 +0,0 @@
|
||||
/* contrib/citext/uninstall_citext.sql */
|
||||
|
||||
-- Adjust this setting to control where the objects get dropped.
|
||||
SET search_path = public;
|
||||
|
||||
DROP OPERATOR CLASS citext_ops USING btree CASCADE;
|
||||
DROP OPERATOR CLASS citext_ops USING hash CASCADE;
|
||||
|
||||
DROP AGGREGATE min(citext);
|
||||
DROP AGGREGATE max(citext);
|
||||
|
||||
DROP OPERATOR = (citext, citext);
|
||||
DROP OPERATOR <> (citext, citext);
|
||||
DROP OPERATOR < (citext, citext);
|
||||
DROP OPERATOR <= (citext, citext);
|
||||
DROP OPERATOR >= (citext, citext);
|
||||
DROP OPERATOR > (citext, citext);
|
||||
|
||||
DROP OPERATOR ~ (citext, citext);
|
||||
DROP OPERATOR ~* (citext, citext);
|
||||
DROP OPERATOR !~ (citext, citext);
|
||||
DROP OPERATOR !~* (citext, citext);
|
||||
DROP OPERATOR ~~ (citext, citext);
|
||||
DROP OPERATOR ~~* (citext, citext);
|
||||
DROP OPERATOR !~~ (citext, citext);
|
||||
DROP OPERATOR !~~* (citext, citext);
|
||||
|
||||
DROP OPERATOR ~ (citext, text);
|
||||
DROP OPERATOR ~* (citext, text);
|
||||
DROP OPERATOR !~ (citext, text);
|
||||
DROP OPERATOR !~* (citext, text);
|
||||
DROP OPERATOR ~~ (citext, text);
|
||||
DROP OPERATOR ~~* (citext, text);
|
||||
DROP OPERATOR !~~ (citext, text);
|
||||
DROP OPERATOR !~~* (citext, text);
|
||||
|
||||
DROP CAST (citext AS text);
|
||||
DROP CAST (citext AS varchar);
|
||||
DROP CAST (citext AS bpchar);
|
||||
DROP CAST (text AS citext);
|
||||
DROP CAST (varchar AS citext);
|
||||
DROP CAST (bpchar AS citext);
|
||||
DROP CAST (boolean AS citext);
|
||||
DROP CAST (inet AS citext);
|
||||
|
||||
DROP FUNCTION citext(bpchar);
|
||||
DROP FUNCTION citext(boolean);
|
||||
DROP FUNCTION citext(inet);
|
||||
DROP FUNCTION citext_eq(citext, citext);
|
||||
DROP FUNCTION citext_ne(citext, citext);
|
||||
DROP FUNCTION citext_lt(citext, citext);
|
||||
DROP FUNCTION citext_le(citext, citext);
|
||||
DROP FUNCTION citext_gt(citext, citext);
|
||||
DROP FUNCTION citext_ge(citext, citext);
|
||||
DROP FUNCTION citext_cmp(citext, citext);
|
||||
DROP FUNCTION citext_hash(citext);
|
||||
DROP FUNCTION citext_smaller(citext, citext);
|
||||
DROP FUNCTION citext_larger(citext, citext);
|
||||
DROP FUNCTION texticlike(citext, citext);
|
||||
DROP FUNCTION texticnlike(citext, citext);
|
||||
DROP FUNCTION texticregexeq(citext, citext);
|
||||
DROP FUNCTION texticregexne(citext, citext);
|
||||
DROP FUNCTION texticlike(citext, text);
|
||||
DROP FUNCTION texticnlike(citext, text);
|
||||
DROP FUNCTION texticregexeq(citext, text);
|
||||
DROP FUNCTION texticregexne(citext, text);
|
||||
DROP FUNCTION regexp_matches( citext, citext );
|
||||
DROP FUNCTION regexp_matches( citext, citext, text );
|
||||
DROP FUNCTION regexp_replace( citext, citext, text );
|
||||
DROP FUNCTION regexp_replace( citext, citext, text, text );
|
||||
DROP FUNCTION regexp_split_to_array( citext, citext );
|
||||
DROP FUNCTION regexp_split_to_array( citext, citext, text );
|
||||
DROP FUNCTION regexp_split_to_table( citext, citext );
|
||||
DROP FUNCTION regexp_split_to_table( citext, citext, text );
|
||||
DROP FUNCTION strpos( citext, citext );
|
||||
DROP FUNCTION replace( citext, citext, citext );
|
||||
DROP FUNCTION split_part( citext, citext, int );
|
||||
DROP FUNCTION translate( citext, citext, text );
|
||||
|
||||
DROP TYPE citext CASCADE;
|
Reference in New Issue
Block a user