Commit 926bbab4 authored by Bruce Momjian's avatar Bruce Momjian

Make /contrib install/uninstall script consistent:

	remove transactions
	use create or replace function
	make formatting consistent
	set search patch on first line

Add documentation on modifying *.sql to set the search patch, and
mention that major upgrades should still run the installation scripts.

Some of these issues were spotted by Tom today.
parent 541ff409
-- Adjust this setting to control where the objects get created.
SET search_path = public;
/* *********************************************** /* ***********************************************
* Administrative functions for PostgreSQL * Administrative functions for PostgreSQL
* *********************************************** */ * *********************************************** */
/* generic file access functions */ /* generic file access functions */
CREATE FUNCTION pg_catalog.pg_file_write(text, text, bool) RETURNS bigint CREATE OR REPLACE FUNCTION pg_catalog.pg_file_write(text, text, bool)
AS 'MODULE_PATHNAME', 'pg_file_write' RETURNS bigint
LANGUAGE C VOLATILE STRICT; AS 'MODULE_PATHNAME', 'pg_file_write'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text, text) RETURNS bool CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text, text)
AS 'MODULE_PATHNAME', 'pg_file_rename' RETURNS bool
LANGUAGE C VOLATILE; AS 'MODULE_PATHNAME', 'pg_file_rename'
LANGUAGE C VOLATILE;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text) RETURNS bool CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
AS 'SELECT pg_file_rename($1, $2, NULL); ' RETURNS bool
LANGUAGE SQL VOLATILE STRICT; AS 'SELECT pg_file_rename($1, $2, NULL); '
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_unlink(text) RETURNS bool CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
AS 'MODULE_PATHNAME', 'pg_file_unlink' RETURNS bool
LANGUAGE C VOLATILE STRICT; AS 'MODULE_PATHNAME', 'pg_file_unlink'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logdir_ls() RETURNS setof record CREATE OR REPLACE FUNCTION pg_catalog.pg_logdir_ls()
AS 'MODULE_PATHNAME', 'pg_logdir_ls' RETURNS setof record
LANGUAGE C VOLATILE STRICT; AS 'MODULE_PATHNAME', 'pg_logdir_ls'
LANGUAGE C VOLATILE STRICT;
/* Renaming of existing backend functions for pgAdmin compatibility */ /* Renaming of existing backend functions for pgAdmin compatibility */
CREATE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint) RETURNS text CREATE OR REPLACE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint)
AS 'pg_read_file' RETURNS text
LANGUAGE INTERNAL VOLATILE STRICT; AS 'pg_read_file'
LANGUAGE INTERNAL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_length(text) RETURNS bigint CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
AS 'SELECT size FROM pg_stat_file($1)' RETURNS bigint
LANGUAGE SQL VOLATILE STRICT; AS 'SELECT size FROM pg_stat_file($1)'
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logfile_rotate() RETURNS int4 CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
AS 'pg_rotate_logfile' RETURNS int4
LANGUAGE INTERNAL VOLATILE STRICT; AS 'pg_rotate_logfile'
LANGUAGE INTERNAL VOLATILE STRICT;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION pg_catalog.pg_file_write(text, text, bool) ; DROP FUNCTION pg_catalog.pg_file_write(text, text, bool) ;
DROP FUNCTION pg_catalog.pg_file_rename(text, text, text) ; DROP FUNCTION pg_catalog.pg_file_rename(text, text, text) ;
DROP FUNCTION pg_catalog.pg_file_rename(text, text) ; DROP FUNCTION pg_catalog.pg_file_rename(text, text) ;
......
This diff is collapsed.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR CLASS gist_cidr_ops USING gist; DROP OPERATOR CLASS gist_cidr_ops USING gist;
......
-- -- Adjust this setting to control where the objects get created.
-- PostgreSQL code for CHKPASS. SET search_path = public;
-- Written by D'Arcy J.M. Cain
-- darcy@druid.net
-- http://www.druid.net/darcy/
--
-- $PostgreSQL: pgsql/contrib/chkpass/chkpass.sql.in,v 1.7 2007/09/29 23:32:42 tgl Exp $
--
-- best viewed with tabs set to 4
--
-- --
-- Input and output functions and the type itself: -- Input and output functions and the type itself:
-- --
-- Adjust this setting to control where the objects get created. CREATE OR REPLACE FUNCTION chkpass_in(cstring)
SET search_path = public;
CREATE FUNCTION chkpass_in(cstring)
RETURNS chkpass RETURNS chkpass
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION chkpass_out(chkpass) CREATE OR REPLACE FUNCTION chkpass_out(chkpass)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -33,7 +22,7 @@ CREATE TYPE chkpass ( ...@@ -33,7 +22,7 @@ CREATE TYPE chkpass (
output = chkpass_out output = chkpass_out
); );
CREATE FUNCTION raw(chkpass) CREATE OR REPLACE FUNCTION raw(chkpass)
RETURNS text RETURNS text
AS 'MODULE_PATHNAME', 'chkpass_rout' AS 'MODULE_PATHNAME', 'chkpass_rout'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -42,12 +31,12 @@ CREATE FUNCTION raw(chkpass) ...@@ -42,12 +31,12 @@ CREATE FUNCTION raw(chkpass)
-- The various boolean tests: -- The various boolean tests:
-- --
CREATE FUNCTION eq(chkpass, text) CREATE OR REPLACE FUNCTION eq(chkpass, text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_eq' AS 'MODULE_PATHNAME', 'chkpass_eq'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION ne(chkpass, text) CREATE OR REPLACE FUNCTION ne(chkpass, text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_ne' AS 'MODULE_PATHNAME', 'chkpass_ne'
LANGUAGE C STRICT; LANGUAGE C STRICT;
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR <>(chkpass, text); DROP OPERATOR <>(chkpass, text);
......
-- Create the user-defined type for N-dimensional boxes
--
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
-- Create the user-defined type for N-dimensional boxes
--
CREATE OR REPLACE FUNCTION cube_in(cstring) CREATE OR REPLACE FUNCTION cube_in(cstring)
RETURNS cube RETURNS cube
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR CLASS gist_cube_ops USING gist; DROP OPERATOR CLASS gist_cube_ops USING gist;
......
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- dblink_connect now restricts non-superusers to password -- dblink_connect now restricts non-superusers to password
-- authenticated connections -- authenticated connections
CREATE OR REPLACE FUNCTION dblink_connect (text) CREATE OR REPLACE FUNCTION dblink_connect (text)
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION dblink_current_query (); DROP FUNCTION dblink_current_query ();
DROP FUNCTION dblink_build_sql_update (text, int2vector, int4, _text, _text); DROP FUNCTION dblink_build_sql_update (text, int2vector, int4, _text, _text);
......
-- $PostgreSQL: pgsql/contrib/dict_int/dict_int.sql.in,v 1.1 2007/10/15 21:36:50 tgl Exp $
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
BEGIN; CREATE OR REPLACE FUNCTION dintdict_init(internal)
CREATE FUNCTION dintdict_init(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION dintdict_lexize(internal, internal, internal, internal) CREATE OR REPLACE FUNCTION dintdict_lexize(internal, internal, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY intdict ( ...@@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY intdict (
); );
COMMENT ON TEXT SEARCH DICTIONARY intdict IS 'dictionary for integers'; COMMENT ON TEXT SEARCH DICTIONARY intdict IS 'dictionary for integers';
END;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP TEXT SEARCH DICTIONARY intdict; DROP TEXT SEARCH DICTIONARY intdict;
......
-- $PostgreSQL: pgsql/contrib/dict_xsyn/dict_xsyn.sql.in,v 1.1 2007/10/15 21:36:50 tgl Exp $
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
BEGIN; CREATE OR REPLACE FUNCTION dxsyn_init(internal)
CREATE FUNCTION dxsyn_init(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION dxsyn_lexize(internal, internal, internal, internal) CREATE OR REPLACE FUNCTION dxsyn_lexize(internal, internal, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY xsyn ( ...@@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY xsyn (
); );
COMMENT ON TEXT SEARCH DICTIONARY xsyn IS 'eXtended synonym dictionary'; COMMENT ON TEXT SEARCH DICTIONARY xsyn IS 'eXtended synonym dictionary';
END;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP TEXT SEARCH DICTIONARY xsyn; DROP TEXT SEARCH DICTIONARY xsyn;
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR <@> (point, point); DROP OPERATOR <@> (point, point);
......
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
CREATE FUNCTION levenshtein (text,text) RETURNS int CREATE OR REPLACE FUNCTION levenshtein (text,text) RETURNS int
AS 'MODULE_PATHNAME','levenshtein' AS 'MODULE_PATHNAME','levenshtein'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION metaphone (text,int) RETURNS text CREATE OR REPLACE FUNCTION metaphone (text,int) RETURNS text
AS 'MODULE_PATHNAME','metaphone' AS 'MODULE_PATHNAME','metaphone'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION soundex(text) RETURNS text CREATE OR REPLACE FUNCTION soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex' AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION text_soundex(text) RETURNS text CREATE OR REPLACE FUNCTION text_soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex' AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION difference(text,text) RETURNS int CREATE OR REPLACE FUNCTION difference(text,text) RETURNS int
AS 'MODULE_PATHNAME', 'difference' AS 'MODULE_PATHNAME', 'difference'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION dmetaphone (text) RETURNS text CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text
AS 'MODULE_PATHNAME', 'dmetaphone' AS 'MODULE_PATHNAME', 'dmetaphone'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION dmetaphone_alt (text) RETURNS text CREATE OR REPLACE FUNCTION dmetaphone_alt (text) RETURNS text
AS 'MODULE_PATHNAME', 'dmetaphone_alt' AS 'MODULE_PATHNAME', 'dmetaphone_alt'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION dmetaphone_alt (text); DROP FUNCTION dmetaphone_alt (text);
......
-- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
BEGIN;
CREATE TYPE hstore; CREATE TYPE hstore;
CREATE FUNCTION hstore_in(cstring) CREATE OR REPLACE FUNCTION hstore_in(cstring)
RETURNS hstore RETURNS hstore
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION hstore_out(hstore) CREATE OR REPLACE FUNCTION hstore_out(hstore)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -21,7 +20,7 @@ CREATE TYPE hstore ( ...@@ -21,7 +20,7 @@ CREATE TYPE hstore (
STORAGE = extended STORAGE = extended
); );
CREATE FUNCTION fetchval(hstore,text) CREATE OR REPLACE FUNCTION fetchval(hstore,text)
RETURNS text RETURNS text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -32,12 +31,12 @@ CREATE OPERATOR -> ( ...@@ -32,12 +31,12 @@ CREATE OPERATOR -> (
PROCEDURE = fetchval PROCEDURE = fetchval
); );
CREATE FUNCTION isexists(hstore,text) CREATE OR REPLACE FUNCTION isexists(hstore,text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME','exists' AS 'MODULE_PATHNAME','exists'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION exist(hstore,text) CREATE OR REPLACE FUNCTION exist(hstore,text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME','exists' AS 'MODULE_PATHNAME','exists'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -50,22 +49,22 @@ CREATE OPERATOR ? ( ...@@ -50,22 +49,22 @@ CREATE OPERATOR ? (
JOIN = contjoinsel JOIN = contjoinsel
); );
CREATE FUNCTION isdefined(hstore,text) CREATE OR REPLACE FUNCTION isdefined(hstore,text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME','defined' AS 'MODULE_PATHNAME','defined'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION defined(hstore,text) CREATE OR REPLACE FUNCTION defined(hstore,text)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME','defined' AS 'MODULE_PATHNAME','defined'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION delete(hstore,text) CREATE OR REPLACE FUNCTION delete(hstore,text)
RETURNS hstore RETURNS hstore
AS 'MODULE_PATHNAME','delete' AS 'MODULE_PATHNAME','delete'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION hs_concat(hstore,hstore) CREATE OR REPLACE FUNCTION hs_concat(hstore,hstore)
RETURNS hstore RETURNS hstore
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -76,12 +75,12 @@ CREATE OPERATOR || ( ...@@ -76,12 +75,12 @@ CREATE OPERATOR || (
PROCEDURE = hs_concat PROCEDURE = hs_concat
); );
CREATE FUNCTION hs_contains(hstore,hstore) CREATE OR REPLACE FUNCTION hs_contains(hstore,hstore)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION hs_contained(hstore,hstore) CREATE OR REPLACE FUNCTION hs_contained(hstore,hstore)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -123,7 +122,7 @@ CREATE OPERATOR ~ ( ...@@ -123,7 +122,7 @@ CREATE OPERATOR ~ (
JOIN = contjoinsel JOIN = contjoinsel
); );
CREATE FUNCTION tconvert(text,text) CREATE OR REPLACE FUNCTION tconvert(text,text)
RETURNS hstore RETURNS hstore
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -134,27 +133,27 @@ CREATE OPERATOR => ( ...@@ -134,27 +133,27 @@ CREATE OPERATOR => (
PROCEDURE = tconvert PROCEDURE = tconvert
); );
CREATE FUNCTION akeys(hstore) CREATE OR REPLACE FUNCTION akeys(hstore)
RETURNS _text RETURNS _text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION avals(hstore) CREATE OR REPLACE FUNCTION avals(hstore)
RETURNS _text RETURNS _text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION skeys(hstore) CREATE OR REPLACE FUNCTION skeys(hstore)
RETURNS setof text RETURNS setof text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION svals(hstore) CREATE OR REPLACE FUNCTION svals(hstore)
RETURNS setof text RETURNS setof text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION each(IN hs hstore, CREATE OR REPLACE FUNCTION each(IN hs hstore,
OUT key text, OUT key text,
OUT value text) OUT value text)
RETURNS SETOF record RETURNS SETOF record
...@@ -167,12 +166,12 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -167,12 +166,12 @@ LANGUAGE C STRICT IMMUTABLE;
CREATE TYPE ghstore; CREATE TYPE ghstore;
CREATE FUNCTION ghstore_in(cstring) CREATE OR REPLACE FUNCTION ghstore_in(cstring)
RETURNS ghstore RETURNS ghstore
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION ghstore_out(ghstore) CREATE OR REPLACE FUNCTION ghstore_out(ghstore)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -183,37 +182,37 @@ CREATE TYPE ghstore ( ...@@ -183,37 +182,37 @@ CREATE TYPE ghstore (
OUTPUT = ghstore_out OUTPUT = ghstore_out
); );
CREATE FUNCTION ghstore_compress(internal) CREATE OR REPLACE FUNCTION ghstore_compress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_decompress(internal) CREATE OR REPLACE FUNCTION ghstore_decompress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_penalty(internal,internal,internal) CREATE OR REPLACE FUNCTION ghstore_penalty(internal,internal,internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION ghstore_picksplit(internal, internal) CREATE OR REPLACE FUNCTION ghstore_picksplit(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_union(internal, internal) CREATE OR REPLACE FUNCTION ghstore_union(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_same(internal, internal, internal) CREATE OR REPLACE FUNCTION ghstore_same(internal, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_consistent(internal,internal,int4) CREATE OR REPLACE FUNCTION ghstore_consistent(internal,internal,int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -238,17 +237,17 @@ AS ...@@ -238,17 +237,17 @@ AS
-- define the GIN support methods -- define the GIN support methods
CREATE FUNCTION gin_extract_hstore(internal, internal) CREATE OR REPLACE FUNCTION gin_extract_hstore(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_extract_hstore_query(internal, internal, int2) CREATE OR REPLACE FUNCTION gin_extract_hstore_query(internal, internal, int2)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_consistent_hstore(internal, int2, internal) CREATE OR REPLACE FUNCTION gin_consistent_hstore(internal, int2, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -263,6 +262,3 @@ AS ...@@ -263,6 +262,3 @@ AS
FUNCTION 3 gin_extract_hstore_query(internal, internal, int2), FUNCTION 3 gin_extract_hstore_query(internal, internal, int2),
FUNCTION 4 gin_consistent_hstore(internal, int2, internal), FUNCTION 4 gin_consistent_hstore(internal, int2, internal),
STORAGE text; STORAGE text;
END;
BEGIN; -- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gist_hstore_ops USING gist CASCADE; DROP OPERATOR CLASS gist_hstore_ops USING gist CASCADE;
DROP OPERATOR CLASS gin_hstore_ops USING gin CASCADE; DROP OPERATOR CLASS gin_hstore_ops USING gin CASCADE;
...@@ -41,5 +42,3 @@ DROP FUNCTION gin_extract_hstore_query(internal, internal, smallint); ...@@ -41,5 +42,3 @@ DROP FUNCTION gin_extract_hstore_query(internal, internal, smallint);
DROP TYPE hstore CASCADE; DROP TYPE hstore CASCADE;
DROP TYPE ghstore CASCADE; DROP TYPE ghstore CASCADE;
COMMIT;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION int_array_enum(int4[]); DROP FUNCTION int_array_enum(int4[]);
......
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- --
-- Create the user-defined type for the 1-D integer arrays (_int4) -- Create the user-defined type for the 1-D integer arrays (_int4)
-- --
-- Adjust this setting to control where the operators, functions, and
-- opclasses get created.
SET search_path = public;
BEGIN;
-- Query type -- Query type
CREATE FUNCTION bqarr_in(cstring) CREATE OR REPLACE FUNCTION bqarr_in(cstring)
RETURNS query_int RETURNS query_int
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION bqarr_out(query_int) CREATE OR REPLACE FUNCTION bqarr_out(query_int)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -26,20 +23,20 @@ CREATE TYPE query_int ( ...@@ -26,20 +23,20 @@ CREATE TYPE query_int (
); );
--only for debug --only for debug
CREATE FUNCTION querytree(query_int) CREATE OR REPLACE FUNCTION querytree(query_int)
RETURNS text RETURNS text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION boolop(_int4, query_int) CREATE OR REPLACE FUNCTION boolop(_int4, query_int)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION boolop(_int4, query_int) IS 'boolean operation with array'; COMMENT ON FUNCTION boolop(_int4, query_int) IS 'boolean operation with array';
CREATE FUNCTION rboolop(query_int, _int4) CREATE OR REPLACE FUNCTION rboolop(query_int, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -71,35 +68,35 @@ CREATE OPERATOR ~~ ( ...@@ -71,35 +68,35 @@ CREATE OPERATOR ~~ (
-- Comparison methods -- Comparison methods
CREATE FUNCTION _int_contains(_int4, _int4) CREATE OR REPLACE FUNCTION _int_contains(_int4, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION _int_contains(_int4, _int4) IS 'contains'; COMMENT ON FUNCTION _int_contains(_int4, _int4) IS 'contains';
CREATE FUNCTION _int_contained(_int4, _int4) CREATE OR REPLACE FUNCTION _int_contained(_int4, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION _int_contained(_int4, _int4) IS 'contained in'; COMMENT ON FUNCTION _int_contained(_int4, _int4) IS 'contained in';
CREATE FUNCTION _int_overlap(_int4, _int4) CREATE OR REPLACE FUNCTION _int_overlap(_int4, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION _int_overlap(_int4, _int4) IS 'overlaps'; COMMENT ON FUNCTION _int_overlap(_int4, _int4) IS 'overlaps';
CREATE FUNCTION _int_same(_int4, _int4) CREATE OR REPLACE FUNCTION _int_same(_int4, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION _int_same(_int4, _int4) IS 'same as'; COMMENT ON FUNCTION _int_same(_int4, _int4) IS 'same as';
CREATE FUNCTION _int_different(_int4, _int4) CREATE OR REPLACE FUNCTION _int_different(_int4, _int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -108,12 +105,12 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different'; ...@@ -108,12 +105,12 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different';
-- support routines for indexing -- support routines for indexing
CREATE FUNCTION _int_union(_int4, _int4) CREATE OR REPLACE FUNCTION _int_union(_int4, _int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _int_inter(_int4, _int4) CREATE OR REPLACE FUNCTION _int_inter(_int4, _int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -191,12 +188,12 @@ CREATE OPERATOR ~ ( ...@@ -191,12 +188,12 @@ CREATE OPERATOR ~ (
); );
-------------- --------------
CREATE FUNCTION intset(int4) CREATE OR REPLACE FUNCTION intset(int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION icount(_int4) CREATE OR REPLACE FUNCTION icount(_int4)
RETURNS int4 RETURNS int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -206,32 +203,32 @@ CREATE OPERATOR # ( ...@@ -206,32 +203,32 @@ CREATE OPERATOR # (
PROCEDURE = icount PROCEDURE = icount
); );
CREATE FUNCTION sort(_int4, text) CREATE OR REPLACE FUNCTION sort(_int4, text)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort(_int4) CREATE OR REPLACE FUNCTION sort(_int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort_asc(_int4) CREATE OR REPLACE FUNCTION sort_asc(_int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort_desc(_int4) CREATE OR REPLACE FUNCTION sort_desc(_int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION uniq(_int4) CREATE OR REPLACE FUNCTION uniq(_int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION idx(_int4, int4) CREATE OR REPLACE FUNCTION idx(_int4, int4)
RETURNS int4 RETURNS int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -242,17 +239,17 @@ CREATE OPERATOR # ( ...@@ -242,17 +239,17 @@ CREATE OPERATOR # (
PROCEDURE = idx PROCEDURE = idx
); );
CREATE FUNCTION subarray(_int4, int4, int4) CREATE OR REPLACE FUNCTION subarray(_int4, int4, int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION subarray(_int4, int4) CREATE OR REPLACE FUNCTION subarray(_int4, int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION intarray_push_elem(_int4, int4) CREATE OR REPLACE FUNCTION intarray_push_elem(_int4, int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -263,7 +260,7 @@ CREATE OPERATOR + ( ...@@ -263,7 +260,7 @@ CREATE OPERATOR + (
PROCEDURE = intarray_push_elem PROCEDURE = intarray_push_elem
); );
CREATE FUNCTION intarray_push_array(_int4, _int4) CREATE OR REPLACE FUNCTION intarray_push_array(_int4, _int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -275,7 +272,7 @@ CREATE OPERATOR + ( ...@@ -275,7 +272,7 @@ CREATE OPERATOR + (
PROCEDURE = intarray_push_array PROCEDURE = intarray_push_array
); );
CREATE FUNCTION intarray_del_elem(_int4, int4) CREATE OR REPLACE FUNCTION intarray_del_elem(_int4, int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -286,7 +283,7 @@ CREATE OPERATOR - ( ...@@ -286,7 +283,7 @@ CREATE OPERATOR - (
PROCEDURE = intarray_del_elem PROCEDURE = intarray_del_elem
); );
CREATE FUNCTION intset_union_elem(_int4, int4) CREATE OR REPLACE FUNCTION intset_union_elem(_int4, int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -304,7 +301,7 @@ CREATE OPERATOR | ( ...@@ -304,7 +301,7 @@ CREATE OPERATOR | (
PROCEDURE = _int_union PROCEDURE = _int_union
); );
CREATE FUNCTION intset_subtract(_int4, _int4) CREATE OR REPLACE FUNCTION intset_subtract(_int4, _int4)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -324,37 +321,37 @@ CREATE OPERATOR & ( ...@@ -324,37 +321,37 @@ CREATE OPERATOR & (
-------------- --------------
-- define the GiST support methods -- define the GiST support methods
CREATE FUNCTION g_int_consistent(internal,_int4,int4) CREATE OR REPLACE FUNCTION g_int_consistent(internal,_int4,int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_compress(internal) CREATE OR REPLACE FUNCTION g_int_compress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_decompress(internal) CREATE OR REPLACE FUNCTION g_int_decompress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_penalty(internal,internal,internal) CREATE OR REPLACE FUNCTION g_int_penalty(internal,internal,internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION g_int_picksplit(internal, internal) CREATE OR REPLACE FUNCTION g_int_picksplit(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_union(internal, internal) CREATE OR REPLACE FUNCTION g_int_union(internal, internal)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_same(_int4, _int4, internal) CREATE OR REPLACE FUNCTION g_int_same(_int4, _int4, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -385,12 +382,12 @@ DEFAULT FOR TYPE _int4 USING gist AS ...@@ -385,12 +382,12 @@ DEFAULT FOR TYPE _int4 USING gist AS
--------------------------------------------- ---------------------------------------------
-- define the GiST support methods -- define the GiST support methods
CREATE FUNCTION _intbig_in(cstring) CREATE OR REPLACE FUNCTION _intbig_in(cstring)
RETURNS intbig_gkey RETURNS intbig_gkey
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _intbig_out(intbig_gkey) CREATE OR REPLACE FUNCTION _intbig_out(intbig_gkey)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -401,37 +398,37 @@ CREATE TYPE intbig_gkey ( ...@@ -401,37 +398,37 @@ CREATE TYPE intbig_gkey (
OUTPUT = _intbig_out OUTPUT = _intbig_out
); );
CREATE FUNCTION g_intbig_consistent(internal,internal,int4) CREATE OR REPLACE FUNCTION g_intbig_consistent(internal,internal,int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_compress(internal) CREATE OR REPLACE FUNCTION g_intbig_compress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_decompress(internal) CREATE OR REPLACE FUNCTION g_intbig_decompress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_penalty(internal,internal,internal) CREATE OR REPLACE FUNCTION g_intbig_penalty(internal,internal,internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT; LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION g_intbig_picksplit(internal, internal) CREATE OR REPLACE FUNCTION g_intbig_picksplit(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_union(internal, internal) CREATE OR REPLACE FUNCTION g_intbig_union(internal, internal)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_same(internal, internal, internal) CREATE OR REPLACE FUNCTION g_intbig_same(internal, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -459,12 +456,12 @@ AS ...@@ -459,12 +456,12 @@ AS
--GIN --GIN
CREATE FUNCTION ginint4_queryextract(internal, internal, int2) CREATE OR REPLACE FUNCTION ginint4_queryextract(internal, internal, int2)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION ginint4_consistent(internal, int2, internal) CREATE OR REPLACE FUNCTION ginint4_consistent(internal, int2, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -484,5 +481,3 @@ AS ...@@ -484,5 +481,3 @@ AS
FUNCTION 3 ginint4_queryextract (internal, internal, int2), FUNCTION 3 ginint4_queryextract (internal, internal, int2),
FUNCTION 4 ginint4_consistent (internal, int2, internal), FUNCTION 4 ginint4_consistent (internal, int2, internal),
STORAGE int4; STORAGE int4;
COMMIT;
-- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
DROP OPERATOR CLASS gin__int_ops USING gin; DROP OPERATOR CLASS gin__int_ops USING gin;
......
This diff is collapsed.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
-- --
-- Drop the actual types (in cascade): -- Drop the actual types (in cascade):
-- --
---------------------------------------------------
SET search_path = public;
DROP TYPE ean13 CASCADE; DROP TYPE ean13 CASCADE;
DROP TYPE isbn13 CASCADE; DROP TYPE isbn13 CASCADE;
DROP TYPE ismn13 CASCADE; DROP TYPE ismn13 CASCADE;
......
--
-- PostgreSQL code for managed Large Objects
--
-- $PostgreSQL: pgsql/contrib/lo/lo.sql.in,v 1.13 2005/06/23 00:06:37 tgl Exp $
--
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
...@@ -19,11 +13,11 @@ CREATE DOMAIN lo AS pg_catalog.oid; ...@@ -19,11 +13,11 @@ CREATE DOMAIN lo AS pg_catalog.oid;
-- The other functions that formerly existed are not needed because -- The other functions that formerly existed are not needed because
-- the implicit casts between a domain and its underlying type handle them. -- the implicit casts between a domain and its underlying type handle them.
-- --
CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS CREATE OR REPLACE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS
'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE; 'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE;
-- This is used in triggers -- This is used in triggers
CREATE FUNCTION lo_manage() CREATE OR REPLACE FUNCTION lo_manage()
RETURNS pg_catalog.trigger RETURNS pg_catalog.trigger
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C; LANGUAGE C;
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- --
-- This runs some common tests against the type -- This runs some common tests against the type
-- --
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
-- --
-- This removes the LO type -- This removes the LO type
-- It's used just for development -- It's used just for development
-- --
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- drop the type and associated functions -- drop the type and associated functions
DROP TYPE lo CASCADE; DROP TYPE lo CASCADE;
......
This diff is collapsed.
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE TABLE test ( path ltree); CREATE TABLE test ( path ltree);
INSERT INTO test VALUES ('Top'); INSERT INTO test VALUES ('Top');
INSERT INTO test VALUES ('Top.Science'); INSERT INTO test VALUES ('Top.Science');
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR CLASS gist__ltree_ops USING gist; DROP OPERATOR CLASS gist__ltree_ops USING gist;
......
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION get_raw_page(text, int4); DROP FUNCTION get_raw_page(text, int4);
......
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
BEGIN;
SET search_path = public; SET search_path = public;
-- Register the function. -- Register the function.
...@@ -17,5 +16,3 @@ CREATE VIEW pg_buffercache AS ...@@ -17,5 +16,3 @@ CREATE VIEW pg_buffercache AS
-- Don't want these to be available at public. -- Don't want these to be available at public.
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC; REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
REVOKE ALL ON pg_buffercache FROM PUBLIC; REVOKE ALL ON pg_buffercache FROM PUBLIC;
COMMIT;
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP VIEW pg_buffercache; DROP VIEW pg_buffercache;
......
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
BEGIN;
SET search_path = public; SET search_path = public;
...@@ -41,5 +40,3 @@ REVOKE ALL ON pg_freespacemap_pages FROM PUBLIC; ...@@ -41,5 +40,3 @@ REVOKE ALL ON pg_freespacemap_pages FROM PUBLIC;
REVOKE ALL ON FUNCTION pg_freespacemap_relations() FROM PUBLIC; REVOKE ALL ON FUNCTION pg_freespacemap_relations() FROM PUBLIC;
REVOKE ALL ON pg_freespacemap_relations FROM PUBLIC; REVOKE ALL ON pg_freespacemap_relations FROM PUBLIC;
COMMIT;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP VIEW pg_freespacemap_pages; DROP VIEW pg_freespacemap_pages;
......
-- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
BEGIN; CREATE OR REPLACE FUNCTION set_limit(float4)
RETURNS float4
create function set_limit(float4)
returns float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
create function show_limit() CREATE OR REPLACE FUNCTION show_limit()
returns float4 RETURNS float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
create function show_trgm(text) CREATE OR REPLACE FUNCTION show_trgm(text)
returns _text RETURNS _text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
create function similarity(text,text) CREATE OR REPLACE FUNCTION similarity(text,text)
returns float4 RETURNS float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
create function similarity_op(text,text) CREATE OR REPLACE FUNCTION similarity_op(text,text)
returns bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -37,12 +36,12 @@ CREATE OPERATOR % ( ...@@ -37,12 +36,12 @@ CREATE OPERATOR % (
); );
-- gist key -- gist key
CREATE FUNCTION gtrgm_in(cstring) CREATE OR REPLACE FUNCTION gtrgm_in(cstring)
RETURNS gtrgm RETURNS gtrgm
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION gtrgm_out(gtrgm) CREATE OR REPLACE FUNCTION gtrgm_out(gtrgm)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
...@@ -54,37 +53,37 @@ CREATE TYPE gtrgm ( ...@@ -54,37 +53,37 @@ CREATE TYPE gtrgm (
); );
-- support functions for gist -- support functions for gist
CREATE FUNCTION gtrgm_consistent(gtrgm,internal,int4) CREATE OR REPLACE FUNCTION gtrgm_consistent(gtrgm,internal,int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_compress(internal) CREATE OR REPLACE FUNCTION gtrgm_compress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_decompress(internal) CREATE OR REPLACE FUNCTION gtrgm_decompress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_penalty(internal,internal,internal) CREATE OR REPLACE FUNCTION gtrgm_penalty(internal,internal,internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gtrgm_picksplit(internal, internal) CREATE OR REPLACE FUNCTION gtrgm_picksplit(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_union(bytea, internal) CREATE OR REPLACE FUNCTION gtrgm_union(bytea, internal)
RETURNS _int4 RETURNS _int4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_same(gtrgm, gtrgm, internal) CREATE OR REPLACE FUNCTION gtrgm_same(gtrgm, gtrgm, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -104,17 +103,17 @@ AS ...@@ -104,17 +103,17 @@ AS
STORAGE gtrgm; STORAGE gtrgm;
-- support functions for gin -- support functions for gin
CREATE FUNCTION gin_extract_trgm(text, internal) CREATE OR REPLACE FUNCTION gin_extract_trgm(text, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_extract_trgm(text, internal, internal) CREATE OR REPLACE FUNCTION gin_extract_trgm(text, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_trgm_consistent(internal, internal, text) CREATE OR REPLACE FUNCTION gin_trgm_consistent(internal, internal, text)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
...@@ -129,5 +128,3 @@ AS ...@@ -129,5 +128,3 @@ AS
FUNCTION 3 gin_extract_trgm (text, internal, internal), FUNCTION 3 gin_extract_trgm (text, internal, internal),
FUNCTION 4 gin_trgm_consistent (internal, internal, text), FUNCTION 4 gin_trgm_consistent (internal, internal, text),
STORAGE int4; STORAGE int4;
COMMIT;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
BEGIN;
DROP OPERATOR CLASS gist_trgm_ops USING gist; DROP OPERATOR CLASS gist_trgm_ops USING gist;
DROP FUNCTION gtrgm_same(gtrgm, gtrgm, internal); DROP FUNCTION gtrgm_same(gtrgm, gtrgm, internal);
...@@ -39,5 +38,3 @@ DROP FUNCTION show_trgm(text); ...@@ -39,5 +38,3 @@ DROP FUNCTION show_trgm(text);
DROP FUNCTION show_limit(); DROP FUNCTION show_limit();
DROP FUNCTION set_limit(float4); DROP FUNCTION set_limit(float4);
COMMIT;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION digest(text, text); DROP FUNCTION digest(text, text);
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION pgrowlocks(text); DROP FUNCTION pgrowlocks(text);
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION pgstattuple(text); DROP FUNCTION pgstattuple(text);
......
-- Create the user-defined type for 1-D floating point intervals (seg)
--
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
CREATE FUNCTION seg_in(cstring) -- Create the user-defined type for 1-D floating point intervals (seg)
--
CREATE OR REPLACE FUNCTION seg_in(cstring)
RETURNS seg RETURNS seg
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_out(seg) CREATE OR REPLACE FUNCTION seg_out(seg)
RETURNS cstring RETURNS cstring
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -29,7 +29,7 @@ COMMENT ON TYPE seg IS ...@@ -29,7 +29,7 @@ COMMENT ON TYPE seg IS
-- Left/Right methods -- Left/Right methods
CREATE FUNCTION seg_over_left(seg, seg) CREATE OR REPLACE FUNCTION seg_over_left(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -37,7 +37,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -37,7 +37,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_over_left(seg, seg) IS COMMENT ON FUNCTION seg_over_left(seg, seg) IS
'overlaps or is left of'; 'overlaps or is left of';
CREATE FUNCTION seg_over_right(seg, seg) CREATE OR REPLACE FUNCTION seg_over_right(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -45,7 +45,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -45,7 +45,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_over_right(seg, seg) IS COMMENT ON FUNCTION seg_over_right(seg, seg) IS
'overlaps or is right of'; 'overlaps or is right of';
CREATE FUNCTION seg_left(seg, seg) CREATE OR REPLACE FUNCTION seg_left(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -53,7 +53,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -53,7 +53,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_left(seg, seg) IS COMMENT ON FUNCTION seg_left(seg, seg) IS
'is left of'; 'is left of';
CREATE FUNCTION seg_right(seg, seg) CREATE OR REPLACE FUNCTION seg_right(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -64,7 +64,7 @@ COMMENT ON FUNCTION seg_right(seg, seg) IS ...@@ -64,7 +64,7 @@ COMMENT ON FUNCTION seg_right(seg, seg) IS
-- Scalar comparison methods -- Scalar comparison methods
CREATE FUNCTION seg_lt(seg, seg) CREATE OR REPLACE FUNCTION seg_lt(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -72,7 +72,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -72,7 +72,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_lt(seg, seg) IS COMMENT ON FUNCTION seg_lt(seg, seg) IS
'less than'; 'less than';
CREATE FUNCTION seg_le(seg, seg) CREATE OR REPLACE FUNCTION seg_le(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -80,7 +80,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -80,7 +80,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_le(seg, seg) IS COMMENT ON FUNCTION seg_le(seg, seg) IS
'less than or equal'; 'less than or equal';
CREATE FUNCTION seg_gt(seg, seg) CREATE OR REPLACE FUNCTION seg_gt(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -88,7 +88,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -88,7 +88,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_gt(seg, seg) IS COMMENT ON FUNCTION seg_gt(seg, seg) IS
'greater than'; 'greater than';
CREATE FUNCTION seg_ge(seg, seg) CREATE OR REPLACE FUNCTION seg_ge(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -96,7 +96,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -96,7 +96,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_ge(seg, seg) IS COMMENT ON FUNCTION seg_ge(seg, seg) IS
'greater than or equal'; 'greater than or equal';
CREATE FUNCTION seg_contains(seg, seg) CREATE OR REPLACE FUNCTION seg_contains(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -104,7 +104,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -104,7 +104,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_contains(seg, seg) IS COMMENT ON FUNCTION seg_contains(seg, seg) IS
'contains'; 'contains';
CREATE FUNCTION seg_contained(seg, seg) CREATE OR REPLACE FUNCTION seg_contained(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -112,7 +112,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -112,7 +112,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_contained(seg, seg) IS COMMENT ON FUNCTION seg_contained(seg, seg) IS
'contained in'; 'contained in';
CREATE FUNCTION seg_overlap(seg, seg) CREATE OR REPLACE FUNCTION seg_overlap(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -120,7 +120,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -120,7 +120,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_overlap(seg, seg) IS COMMENT ON FUNCTION seg_overlap(seg, seg) IS
'overlaps'; 'overlaps';
CREATE FUNCTION seg_same(seg, seg) CREATE OR REPLACE FUNCTION seg_same(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -128,7 +128,7 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -128,7 +128,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_same(seg, seg) IS COMMENT ON FUNCTION seg_same(seg, seg) IS
'same as'; 'same as';
CREATE FUNCTION seg_different(seg, seg) CREATE OR REPLACE FUNCTION seg_different(seg, seg)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -145,29 +145,29 @@ LANGUAGE C STRICT IMMUTABLE; ...@@ -145,29 +145,29 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_cmp(seg, seg) IS 'btree comparison function'; COMMENT ON FUNCTION seg_cmp(seg, seg) IS 'btree comparison function';
CREATE FUNCTION seg_union(seg, seg) CREATE OR REPLACE FUNCTION seg_union(seg, seg)
RETURNS seg RETURNS seg
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_inter(seg, seg) CREATE OR REPLACE FUNCTION seg_inter(seg, seg)
RETURNS seg RETURNS seg
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_size(seg) CREATE OR REPLACE FUNCTION seg_size(seg)
RETURNS float4 RETURNS float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
-- miscellaneous -- miscellaneous
CREATE FUNCTION seg_upper(seg) CREATE OR REPLACE FUNCTION seg_upper(seg)
RETURNS float4 RETURNS float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_lower(seg) CREATE OR REPLACE FUNCTION seg_lower(seg)
RETURNS float4 RETURNS float4
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
...@@ -320,37 +320,37 @@ CREATE OPERATOR ~ ( ...@@ -320,37 +320,37 @@ CREATE OPERATOR ~ (
-- define the GiST support methods -- define the GiST support methods
CREATE FUNCTION gseg_consistent(internal,seg,int4) CREATE OR REPLACE FUNCTION gseg_consistent(internal,seg,int4)
RETURNS bool RETURNS bool
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_compress(internal) CREATE OR REPLACE FUNCTION gseg_compress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_decompress(internal) CREATE OR REPLACE FUNCTION gseg_decompress(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_penalty(internal,internal,internal) CREATE OR REPLACE FUNCTION gseg_penalty(internal,internal,internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gseg_picksplit(internal, internal) CREATE OR REPLACE FUNCTION gseg_picksplit(internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_union(internal, internal) CREATE OR REPLACE FUNCTION gseg_union(internal, internal)
RETURNS seg RETURNS seg
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_same(seg, seg, internal) CREATE OR REPLACE FUNCTION gseg_same(seg, seg, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE; LANGUAGE C IMMUTABLE;
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP OPERATOR CLASS gist_seg_ops USING gist; DROP OPERATOR CLASS gist_seg_ops USING gist;
......
-- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
CREATE OR REPLACE FUNCTION ssl_client_serial() RETURNS numeric CREATE OR REPLACE FUNCTION ssl_client_serial() RETURNS numeric
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_client_serial';
AS 'MODULE_PATHNAME', 'ssl_client_serial'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_is_used() RETURNS boolean CREATE OR REPLACE FUNCTION ssl_is_used() RETURNS boolean
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_is_used';
AS 'MODULE_PATHNAME', 'ssl_is_used'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_client_cert_present() RETURNS boolean CREATE OR REPLACE FUNCTION ssl_client_cert_present() RETURNS boolean
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_client_cert_present';
AS 'MODULE_PATHNAME', 'ssl_client_cert_present'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_client_dn_field(text) RETURNS text CREATE OR REPLACE FUNCTION ssl_client_dn_field(text) RETURNS text
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_client_dn_field';
AS 'MODULE_PATHNAME', 'ssl_client_dn_field'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_issuer_field(text) RETURNS text CREATE OR REPLACE FUNCTION ssl_issuer_field(text) RETURNS text
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_issuer_field';
AS 'MODULE_PATHNAME', 'ssl_issuer_field'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_client_dn() RETURNS text CREATE OR REPLACE FUNCTION ssl_client_dn() RETURNS text
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_client_dn';
AS 'MODULE_PATHNAME', 'ssl_client_dn'; LANGUAGE C STRICT
CREATE OR REPLACE FUNCTION ssl_issuer_dn() RETURNS text CREATE OR REPLACE FUNCTION ssl_issuer_dn() RETURNS text
LANGUAGE C STRICT AS 'MODULE_PATHNAME', 'ssl_issuer_dn';
AS 'MODULE_PATHNAME', 'ssl_issuer_dn'; LANGUAGE C STRICT
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION ssl_client_serial(); DROP FUNCTION ssl_client_serial();
......
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION connectby(text,text,text,text,text,int); DROP FUNCTION connectby(text,text,text,text,text,int);
......
-- $PostgreSQL: pgsql/contrib/test_parser/test_parser.sql.in,v 1.1 2007/10/15 21:36:50 tgl Exp $
-- Adjust this setting to control where the objects get created. -- Adjust this setting to control where the objects get created.
SET search_path = public; SET search_path = public;
BEGIN; CREATE OR REPLACE FUNCTION testprs_start(internal, int4)
RETURNS internal
CREATE FUNCTION testprs_start(internal, int4) AS 'MODULE_PATHNAME'
RETURNS internal LANGUAGE C STRICT;
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION testprs_getlexeme(internal, internal, internal) CREATE OR REPLACE FUNCTION testprs_getlexeme(internal, internal, internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION testprs_end(internal) CREATE OR REPLACE FUNCTION testprs_end(internal)
RETURNS void RETURNS void
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE FUNCTION testprs_lextype(internal) CREATE OR REPLACE FUNCTION testprs_lextype(internal)
RETURNS internal RETURNS internal
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT; LANGUAGE C STRICT;
CREATE TEXT SEARCH PARSER testparser ( CREATE TEXT SEARCH PARSER testparser (
START = testprs_start, START = testprs_start,
...@@ -32,5 +28,3 @@ CREATE TEXT SEARCH PARSER testparser ( ...@@ -32,5 +28,3 @@ CREATE TEXT SEARCH PARSER testparser (
HEADLINE = pg_catalog.prsd_headline, HEADLINE = pg_catalog.prsd_headline,
LEXTYPES = testprs_lextype LEXTYPES = testprs_lextype
); );
END;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP TEXT SEARCH PARSER testparser; DROP TEXT SEARCH PARSER testparser;
......
This diff is collapsed.
BEGIN; -- Adjust this setting to control where the objects get dropped.
SET search_path = public;
--Be careful !!!
--script drops all indices, triggers and columns with types defined
--in tsearch2.sql
DROP OPERATOR CLASS gin_tsvector_ops USING gin CASCADE; DROP OPERATOR CLASS gin_tsvector_ops USING gin CASCADE;
...@@ -71,5 +67,3 @@ DROP FUNCTION gtsq_union(bytea, internal); ...@@ -71,5 +67,3 @@ DROP FUNCTION gtsq_union(bytea, internal);
DROP FUNCTION reset_tsearch(); DROP FUNCTION reset_tsearch();
DROP FUNCTION tsearch2() CASCADE; DROP FUNCTION tsearch2() CASCADE;
DROP FUNCTION _get_parser_from_curcfg(); DROP FUNCTION _get_parser_from_curcfg();
END;
/* $PostgreSQL: pgsql/contrib/uuid-ossp/uninstall_uuid-ossp.sql,v 1.1 2007/04/21 17:26:17 petere Exp $ */ -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION uuid_nil(); DROP FUNCTION uuid_nil();
......
/* $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.sql.in,v 1.2 2007/04/22 21:16:18 petere Exp $ */ -- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
CREATE FUNCTION uuid_nil() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_nil'; CREATE OR REPLACE FUNCTION uuid_nil()
CREATE FUNCTION uuid_ns_dns() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_dns'; RETURNS uuid
CREATE FUNCTION uuid_ns_url() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_url'; AS 'MODULE_PATHNAME', 'uuid_nil';
CREATE FUNCTION uuid_ns_oid() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_oid'; IMMUTABLE STRICT LANGUAGE C
CREATE FUNCTION uuid_ns_x500() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_x500';
CREATE OR REPLACE FUNCTION uuid_ns_dns()
CREATE FUNCTION uuid_generate_v1() RETURNS uuid VOLATILE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1'; RETURNS uuid
CREATE FUNCTION uuid_generate_v1mc() RETURNS uuid VOLATILE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1mc'; AS 'MODULE_PATHNAME', 'uuid_ns_dns';
CREATE FUNCTION uuid_generate_v3(namespace uuid, name text) RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v3'; IMMUTABLE STRICT LANGUAGE C
CREATE FUNCTION uuid_generate_v4() RETURNS uuid VOLATILE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v4';
CREATE FUNCTION uuid_generate_v5(namespace uuid, name text) RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v5'; CREATE OR REPLACE FUNCTION uuid_ns_url()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_ns_url';
IMMUTABLE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_ns_oid()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_ns_oid';
IMMUTABLE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_ns_x500()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_ns_x500';
IMMUTABLE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_generate_v1()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_generate_v1';
VOLATILE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_generate_v1mc()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_generate_v1mc';
VOLATILE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_generate_v3(namespace uuid, name text)
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_generate_v3';
IMMUTABLE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_generate_v4()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_generate_v4';
VOLATILE STRICT LANGUAGE C
CREATE OR REPLACE FUNCTION uuid_generate_v5(namespace uuid, name text)
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_generate_v5';
IMMUTABLE STRICT LANGUAGE C
-- Adjust this setting to control where the objects get created.
SET search_path = public;
--SQL for XML parser --SQL for XML parser
CREATE OR REPLACE FUNCTION xml_is_well_formed(text) RETURNS bool CREATE OR REPLACE FUNCTION xml_is_well_formed(text) RETURNS bool
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- deprecated old name for xml_is_well_formed -- deprecated old name for xml_is_well_formed
CREATE OR REPLACE FUNCTION xml_valid(text) RETURNS bool CREATE OR REPLACE FUNCTION xml_valid(text) RETURNS bool
AS 'MODULE_PATHNAME', 'xml_is_well_formed' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME', 'xml_is_well_formed'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xml_encode_special_chars(text) RETURNS text CREATE OR REPLACE FUNCTION xml_encode_special_chars(text) RETURNS text
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_number(text,text) RETURNS float4 CREATE OR REPLACE FUNCTION xpath_number(text,text) RETURNS float4
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_bool(text,text) RETURNS boolean CREATE OR REPLACE FUNCTION xpath_bool(text,text) RETURNS boolean
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- List function -- List function
CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text
AS 'MODULE_PATHNAME' AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE; LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text
AS 'SELECT xpath_list($1,$2,'','')' LANGUAGE SQL STRICT IMMUTABLE; AS 'SELECT xpath_list($1,$2,'','')'
LANGUAGE SQL STRICT IMMUTABLE;
-- Wrapper functions for nodeset where no tags needed -- Wrapper functions for nodeset where no tags needed
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text) RETURNS text AS CREATE OR REPLACE FUNCTION xpath_nodeset(text,text)
'SELECT xpath_nodeset($1,$2,'''','''')' LANGUAGE SQL STRICT IMMUTABLE; RETURNS text
AS 'SELECT xpath_nodeset($1,$2,'''','''')'
LANGUAGE SQL STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text) RETURNS text AS CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text)
'SELECT xpath_nodeset($1,$2,'''',$3)' LANGUAGE SQL STRICT IMMUTABLE; RETURNS text
AS 'SELECT xpath_nodeset($1,$2,'''',$3)'
LANGUAGE SQL STRICT IMMUTABLE;
-- Table function -- Table function
CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text) RETURNS setof record CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text)
AS 'MODULE_PATHNAME' RETURNS setof record
LANGUAGE C STRICT STABLE; AS 'MODULE_PATHNAME'
LANGUAGE C STRICT STABLE;
-- XSLT functions -- XSLT functions
-- Delete from here to the end of the file if you are not compiling with -- Delete from here to the end of the file if you are not compiling with
-- XSLT support. -- XSLT support.
CREATE OR REPLACE FUNCTION xslt_process(text,text,text) RETURNS text CREATE OR REPLACE FUNCTION xslt_process(text,text,text)
AS 'MODULE_PATHNAME' LANGUAGE C STRICT VOLATILE; RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT VOLATILE;
-- the function checks for the correct argument count -- the function checks for the correct argument count
CREATE OR REPLACE FUNCTION xslt_process(text,text) RETURNS text CREATE OR REPLACE FUNCTION xslt_process(text,text)
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- Adjust this setting to control where the objects get dropped.
SET search_path = public; SET search_path = public;
DROP FUNCTION xslt_process(text,text); DROP FUNCTION xslt_process(text,text);
......
...@@ -16,11 +16,17 @@ ...@@ -16,11 +16,17 @@
these cases, you will need to run <literal>make</literal> and <literal>make these cases, you will need to run <literal>make</literal> and <literal>make
install</literal> in <literal>contrib/module</literal>. After you have install</literal> in <literal>contrib/module</literal>. After you have
installed the files you need to register the new entities in the database installed the files you need to register the new entities in the database
system by running the commands in the supplied .sql file. For example, system by running the commands in the supplied <literal>.sql</> file.
For example,
<programlisting> <programlisting>
$ psql -d dbname -f module.sql $ psql -d dbname -f module.sql
</programlisting> </programlisting>
You can modify the first command in the <literal>.sql</> file to control
the schema where the module is created. During major upgrades, even
though the restored database might already have the desired module
functions, run the installation script again to add any new functions.
</para> </para>
&adminpack; &adminpack;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment