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.
This commit is contained in:
Bruce Momjian 2007-11-11 03:25:35 +00:00
parent 541ff409cc
commit 926bbab448
54 changed files with 1056 additions and 1025 deletions

View File

@ -1,41 +1,52 @@
-- 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 */
CREATE FUNCTION pg_catalog.pg_file_write(text, text, bool) RETURNS bigint
AS 'MODULE_PATHNAME', 'pg_file_write'
LANGUAGE C VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_write(text, text, bool)
RETURNS bigint
AS 'MODULE_PATHNAME', 'pg_file_write'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text, text) RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_rename'
LANGUAGE C VOLATILE;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_rename'
LANGUAGE C VOLATILE;
CREATE FUNCTION pg_catalog.pg_file_rename(text, text) RETURNS bool
AS 'SELECT pg_file_rename($1, $2, NULL); '
LANGUAGE SQL VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
RETURNS bool
AS 'SELECT pg_file_rename($1, $2, NULL); '
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_unlink(text) RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_unlink'
LANGUAGE C VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
RETURNS bool
AS 'MODULE_PATHNAME', 'pg_file_unlink'
LANGUAGE C VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logdir_ls() RETURNS setof record
AS 'MODULE_PATHNAME', 'pg_logdir_ls'
LANGUAGE C VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_logdir_ls()
RETURNS setof record
AS 'MODULE_PATHNAME', 'pg_logdir_ls'
LANGUAGE C VOLATILE STRICT;
/* Renaming of existing backend functions for pgAdmin compatibility */
CREATE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint) RETURNS text
AS 'pg_read_file'
LANGUAGE INTERNAL VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint)
RETURNS text
AS 'pg_read_file'
LANGUAGE INTERNAL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_file_length(text) RETURNS bigint
AS 'SELECT size FROM pg_stat_file($1)'
LANGUAGE SQL VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
RETURNS bigint
AS 'SELECT size FROM pg_stat_file($1)'
LANGUAGE SQL VOLATILE STRICT;
CREATE FUNCTION pg_catalog.pg_logfile_rotate() RETURNS int4
AS 'pg_rotate_logfile'
LANGUAGE INTERNAL VOLATILE STRICT;
CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
RETURNS int4
AS 'pg_rotate_logfile'
LANGUAGE INTERNAL VOLATILE STRICT;

View File

@ -1,3 +1,6 @@
-- 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_rename(text, text, text) ;
DROP FUNCTION pg_catalog.pg_file_rename(text, text) ;

View File

@ -1,85 +1,85 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE FUNCTION gbtreekey4_in(cstring)
CREATE OR REPLACE FUNCTION gbtreekey4_in(cstring)
RETURNS gbtreekey4
AS 'MODULE_PATHNAME', 'gbtreekey_in'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbtreekey4_out(gbtreekey4)
CREATE OR REPLACE FUNCTION gbtreekey4_out(gbtreekey4)
RETURNS cstring
AS 'MODULE_PATHNAME', 'gbtreekey_out'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE gbtreekey4 (
INTERNALLENGTH = 4,
INPUT = gbtreekey4_in,
OUTPUT = gbtreekey4_out
INTERNALLENGTH = 4,
INPUT = gbtreekey4_in,
OUTPUT = gbtreekey4_out
);
CREATE FUNCTION gbtreekey8_in(cstring)
CREATE OR REPLACE FUNCTION gbtreekey8_in(cstring)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME', 'gbtreekey_in'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbtreekey8_out(gbtreekey8)
CREATE OR REPLACE FUNCTION gbtreekey8_out(gbtreekey8)
RETURNS cstring
AS 'MODULE_PATHNAME', 'gbtreekey_out'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE gbtreekey8 (
INTERNALLENGTH = 8,
INPUT = gbtreekey8_in,
OUTPUT = gbtreekey8_out
INTERNALLENGTH = 8,
INPUT = gbtreekey8_in,
OUTPUT = gbtreekey8_out
);
CREATE FUNCTION gbtreekey16_in(cstring)
CREATE OR REPLACE FUNCTION gbtreekey16_in(cstring)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME', 'gbtreekey_in'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbtreekey16_out(gbtreekey16)
CREATE OR REPLACE FUNCTION gbtreekey16_out(gbtreekey16)
RETURNS cstring
AS 'MODULE_PATHNAME', 'gbtreekey_out'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE gbtreekey16 (
INTERNALLENGTH = 16,
INPUT = gbtreekey16_in,
OUTPUT = gbtreekey16_out
INTERNALLENGTH = 16,
INPUT = gbtreekey16_in,
OUTPUT = gbtreekey16_out
);
CREATE FUNCTION gbtreekey32_in(cstring)
CREATE OR REPLACE FUNCTION gbtreekey32_in(cstring)
RETURNS gbtreekey32
AS 'MODULE_PATHNAME', 'gbtreekey_in'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbtreekey32_out(gbtreekey32)
CREATE OR REPLACE FUNCTION gbtreekey32_out(gbtreekey32)
RETURNS cstring
AS 'MODULE_PATHNAME', 'gbtreekey_out'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE gbtreekey32 (
INTERNALLENGTH = 32,
INPUT = gbtreekey32_in,
OUTPUT = gbtreekey32_out
INTERNALLENGTH = 32,
INPUT = gbtreekey32_in,
OUTPUT = gbtreekey32_out
);
CREATE FUNCTION gbtreekey_var_in(cstring)
CREATE OR REPLACE FUNCTION gbtreekey_var_in(cstring)
RETURNS gbtreekey_var
AS 'MODULE_PATHNAME', 'gbtreekey_in'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbtreekey_var_out(gbtreekey_var)
CREATE OR REPLACE FUNCTION gbtreekey_var_out(gbtreekey_var)
RETURNS cstring
AS 'MODULE_PATHNAME', 'gbtreekey_out'
LANGUAGE C IMMUTABLE STRICT;
CREATE TYPE gbtreekey_var (
INTERNALLENGTH = VARIABLE,
INPUT = gbtreekey_var_in,
OUTPUT = gbtreekey_var_out,
STORAGE = EXTENDED
INTERNALLENGTH = VARIABLE,
INPUT = gbtreekey_var_in,
OUTPUT = gbtreekey_var_out,
STORAGE = EXTENDED
);
@ -92,42 +92,42 @@ STORAGE = EXTENDED
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_oid_consistent(internal,oid,int2)
CREATE OR REPLACE FUNCTION gbt_oid_consistent(internal,oid,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_oid_compress(internal)
CREATE OR REPLACE FUNCTION gbt_oid_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_decompress(internal)
CREATE OR REPLACE FUNCTION gbt_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_var_decompress(internal)
CREATE OR REPLACE FUNCTION gbt_var_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_oid_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_oid_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_oid_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_oid_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_oid_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_oid_union(bytea, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_oid_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_oid_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -159,32 +159,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_int2_consistent(internal,int2,int2)
CREATE OR REPLACE FUNCTION gbt_int2_consistent(internal,int2,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int2_compress(internal)
CREATE OR REPLACE FUNCTION gbt_int2_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int2_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_int2_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_int2_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_int2_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int2_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_int2_union(bytea, internal)
RETURNS gbtreekey4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int2_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_int2_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -215,32 +215,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_int4_consistent(internal,int4,int2)
CREATE OR REPLACE FUNCTION gbt_int4_consistent(internal,int4,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int4_compress(internal)
CREATE OR REPLACE FUNCTION gbt_int4_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int4_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_int4_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_int4_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_int4_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int4_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_int4_union(bytea, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int4_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_int4_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -271,32 +271,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_int8_consistent(internal,int8,int2)
CREATE OR REPLACE FUNCTION gbt_int8_consistent(internal,int8,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int8_compress(internal)
CREATE OR REPLACE FUNCTION gbt_int8_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int8_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_int8_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_int8_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_int8_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int8_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_int8_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_int8_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_int8_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -328,32 +328,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_float4_consistent(internal,float4,int2)
CREATE OR REPLACE FUNCTION gbt_float4_consistent(internal,float4,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float4_compress(internal)
CREATE OR REPLACE FUNCTION gbt_float4_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float4_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_float4_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_float4_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_float4_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float4_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_float4_union(bytea, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float4_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_float4_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -387,32 +387,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_float8_consistent(internal,float8,int2)
CREATE OR REPLACE FUNCTION gbt_float8_consistent(internal,float8,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float8_compress(internal)
CREATE OR REPLACE FUNCTION gbt_float8_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float8_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_float8_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_float8_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_float8_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float8_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_float8_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_float8_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_float8_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -444,42 +444,42 @@ AS
--
--
CREATE FUNCTION gbt_ts_consistent(internal,timestamp,int2)
CREATE OR REPLACE FUNCTION gbt_ts_consistent(internal,timestamp,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2)
CREATE OR REPLACE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_ts_compress(internal)
CREATE OR REPLACE FUNCTION gbt_ts_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_tstz_compress(internal)
CREATE OR REPLACE FUNCTION gbt_tstz_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_ts_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_ts_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_ts_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_ts_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_ts_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_ts_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_ts_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_ts_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -530,42 +530,42 @@ AS
--
--
CREATE FUNCTION gbt_time_consistent(internal,time,int2)
CREATE OR REPLACE FUNCTION gbt_time_consistent(internal,time,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_timetz_consistent(internal,timetz,int2)
CREATE OR REPLACE FUNCTION gbt_timetz_consistent(internal,timetz,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_time_compress(internal)
CREATE OR REPLACE FUNCTION gbt_time_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_timetz_compress(internal)
CREATE OR REPLACE FUNCTION gbt_timetz_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_time_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_time_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_time_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_time_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_time_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_time_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_time_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_time_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -614,32 +614,32 @@ AS
--
--
CREATE FUNCTION gbt_date_consistent(internal,date,int2)
CREATE OR REPLACE FUNCTION gbt_date_consistent(internal,date,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_date_compress(internal)
CREATE OR REPLACE FUNCTION gbt_date_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_date_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_date_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_date_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_date_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_date_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_date_union(bytea, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_date_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_date_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -671,37 +671,37 @@ AS
--
--
CREATE FUNCTION gbt_intv_consistent(internal,interval,int2)
CREATE OR REPLACE FUNCTION gbt_intv_consistent(internal,interval,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_intv_compress(internal)
CREATE OR REPLACE FUNCTION gbt_intv_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_intv_decompress(internal)
CREATE OR REPLACE FUNCTION gbt_intv_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_intv_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_intv_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_intv_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_intv_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_intv_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_intv_union(bytea, internal)
RETURNS gbtreekey32
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_intv_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_intv_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -732,32 +732,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_cash_consistent(internal,money,int2)
CREATE OR REPLACE FUNCTION gbt_cash_consistent(internal,money,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_cash_compress(internal)
CREATE OR REPLACE FUNCTION gbt_cash_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_cash_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_cash_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_cash_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_cash_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_cash_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_cash_union(bytea, internal)
RETURNS gbtreekey8
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_cash_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_cash_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -788,32 +788,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_macad_consistent(internal,macaddr,int2)
CREATE OR REPLACE FUNCTION gbt_macad_consistent(internal,macaddr,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_macad_compress(internal)
CREATE OR REPLACE FUNCTION gbt_macad_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_macad_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_macad_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_macad_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_macad_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_macad_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_macad_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_macad_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_macad_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -846,42 +846,42 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_text_consistent(internal,text,int2)
CREATE OR REPLACE FUNCTION gbt_text_consistent(internal,text,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2)
CREATE OR REPLACE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_text_compress(internal)
CREATE OR REPLACE FUNCTION gbt_text_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bpchar_compress(internal)
CREATE OR REPLACE FUNCTION gbt_bpchar_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_text_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_text_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_text_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_text_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_text_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_text_union(bytea, internal)
RETURNS gbtreekey_var
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_text_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_text_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -932,32 +932,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_bytea_consistent(internal,bytea,int2)
CREATE OR REPLACE FUNCTION gbt_bytea_consistent(internal,bytea,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bytea_compress(internal)
CREATE OR REPLACE FUNCTION gbt_bytea_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bytea_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_bytea_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_bytea_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_bytea_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bytea_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_bytea_union(bytea, internal)
RETURNS gbtreekey_var
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bytea_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_bytea_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -989,32 +989,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_numeric_consistent(internal,numeric,int2)
CREATE OR REPLACE FUNCTION gbt_numeric_consistent(internal,numeric,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_numeric_compress(internal)
CREATE OR REPLACE FUNCTION gbt_numeric_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_numeric_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_numeric_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_numeric_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_numeric_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_numeric_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_numeric_union(bytea, internal)
RETURNS gbtreekey_var
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_numeric_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_numeric_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -1044,32 +1044,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_bit_consistent(internal,bit,int2)
CREATE OR REPLACE FUNCTION gbt_bit_consistent(internal,bit,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bit_compress(internal)
CREATE OR REPLACE FUNCTION gbt_bit_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bit_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_bit_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_bit_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_bit_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bit_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_bit_union(bytea, internal)
RETURNS gbtreekey_var
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_bit_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_bit_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -1121,32 +1121,32 @@ AS
--
--
-- define the GiST support methods
CREATE FUNCTION gbt_inet_consistent(internal,inet,int2)
CREATE OR REPLACE FUNCTION gbt_inet_consistent(internal,inet,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_inet_compress(internal)
CREATE OR REPLACE FUNCTION gbt_inet_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_inet_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gbt_inet_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION gbt_inet_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gbt_inet_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_inet_union(bytea, internal)
CREATE OR REPLACE FUNCTION gbt_inet_union(bytea, internal)
RETURNS gbtreekey16
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gbt_inet_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION gbt_inet_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gist_cidr_ops USING gist;

View File

@ -1,27 +1,16 @@
--
-- PostgreSQL code for CHKPASS.
-- 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
--
-- Adjust this setting to control where the objects get created.
SET search_path = public;
--
-- Input and output functions and the type itself:
--
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE FUNCTION chkpass_in(cstring)
CREATE OR REPLACE FUNCTION chkpass_in(cstring)
RETURNS chkpass
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION chkpass_out(chkpass)
CREATE OR REPLACE FUNCTION chkpass_out(chkpass)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -33,7 +22,7 @@ CREATE TYPE chkpass (
output = chkpass_out
);
CREATE FUNCTION raw(chkpass)
CREATE OR REPLACE FUNCTION raw(chkpass)
RETURNS text
AS 'MODULE_PATHNAME', 'chkpass_rout'
LANGUAGE C STRICT;
@ -42,12 +31,12 @@ CREATE FUNCTION raw(chkpass)
-- The various boolean tests:
--
CREATE FUNCTION eq(chkpass, text)
CREATE OR REPLACE FUNCTION eq(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_eq'
LANGUAGE C STRICT;
CREATE FUNCTION ne(chkpass, text)
CREATE OR REPLACE FUNCTION ne(chkpass, text)
RETURNS bool
AS 'MODULE_PATHNAME', 'chkpass_ne'
LANGUAGE C STRICT;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR <>(chkpass, text);

View File

@ -1,9 +1,9 @@
-- Create the user-defined type for N-dimensional boxes
--
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- Create the user-defined type for N-dimensional boxes
--
CREATE OR REPLACE FUNCTION cube_in(cstring)
RETURNS cube
AS 'MODULE_PATHNAME'

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gist_cube_ops USING gist;

View File

@ -1,3 +1,6 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
-- dblink_connect now restricts non-superusers to password
-- authenticated connections
CREATE OR REPLACE FUNCTION dblink_connect (text)

View File

@ -1,3 +1,6 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION dblink_current_query ();
DROP FUNCTION dblink_build_sql_update (text, int2vector, int4, _text, _text);

View File

@ -1,16 +1,12 @@
-- $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.
SET search_path = public;
BEGIN;
CREATE FUNCTION dintdict_init(internal)
CREATE OR REPLACE FUNCTION dintdict_init(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION dintdict_lexize(internal, internal, internal, internal)
CREATE OR REPLACE FUNCTION dintdict_lexize(internal, internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY intdict (
);
COMMENT ON TEXT SEARCH DICTIONARY intdict IS 'dictionary for integers';
END;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP TEXT SEARCH DICTIONARY intdict;

View File

@ -1,16 +1,12 @@
-- $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.
SET search_path = public;
BEGIN;
CREATE FUNCTION dxsyn_init(internal)
CREATE OR REPLACE FUNCTION dxsyn_init(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION dxsyn_lexize(internal, internal, internal, internal)
CREATE OR REPLACE FUNCTION dxsyn_lexize(internal, internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -25,5 +21,3 @@ CREATE TEXT SEARCH DICTIONARY xsyn (
);
COMMENT ON TEXT SEARCH DICTIONARY xsyn IS 'eXtended synonym dictionary';
END;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP TEXT SEARCH DICTIONARY xsyn;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR <@> (point, point);

View File

@ -1,30 +1,30 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE FUNCTION levenshtein (text,text) RETURNS int
CREATE OR REPLACE FUNCTION levenshtein (text,text) RETURNS int
AS 'MODULE_PATHNAME','levenshtein'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION metaphone (text,int) RETURNS text
CREATE OR REPLACE FUNCTION metaphone (text,int) RETURNS text
AS 'MODULE_PATHNAME','metaphone'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION soundex(text) RETURNS text
CREATE OR REPLACE FUNCTION soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION text_soundex(text) RETURNS text
CREATE OR REPLACE FUNCTION text_soundex(text) RETURNS text
AS 'MODULE_PATHNAME', 'soundex'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION difference(text,text) RETURNS int
CREATE OR REPLACE FUNCTION difference(text,text) RETURNS int
AS 'MODULE_PATHNAME', 'difference'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION dmetaphone (text) RETURNS text
CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text
AS 'MODULE_PATHNAME', 'dmetaphone'
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'
LANGUAGE C IMMUTABLE STRICT;

View File

@ -1,4 +1,4 @@
-- Adjust this setting to control where the objects get created.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION dmetaphone_alt (text);

View File

@ -1,15 +1,14 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
BEGIN;
CREATE TYPE hstore;
CREATE FUNCTION hstore_in(cstring)
CREATE OR REPLACE FUNCTION hstore_in(cstring)
RETURNS hstore
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION hstore_out(hstore)
CREATE OR REPLACE FUNCTION hstore_out(hstore)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -21,7 +20,7 @@ CREATE TYPE hstore (
STORAGE = extended
);
CREATE FUNCTION fetchval(hstore,text)
CREATE OR REPLACE FUNCTION fetchval(hstore,text)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -32,12 +31,12 @@ CREATE OPERATOR -> (
PROCEDURE = fetchval
);
CREATE FUNCTION isexists(hstore,text)
CREATE OR REPLACE FUNCTION isexists(hstore,text)
RETURNS bool
AS 'MODULE_PATHNAME','exists'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION exist(hstore,text)
CREATE OR REPLACE FUNCTION exist(hstore,text)
RETURNS bool
AS 'MODULE_PATHNAME','exists'
LANGUAGE C STRICT IMMUTABLE;
@ -50,22 +49,22 @@ CREATE OPERATOR ? (
JOIN = contjoinsel
);
CREATE FUNCTION isdefined(hstore,text)
CREATE OR REPLACE FUNCTION isdefined(hstore,text)
RETURNS bool
AS 'MODULE_PATHNAME','defined'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION defined(hstore,text)
CREATE OR REPLACE FUNCTION defined(hstore,text)
RETURNS bool
AS 'MODULE_PATHNAME','defined'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION delete(hstore,text)
CREATE OR REPLACE FUNCTION delete(hstore,text)
RETURNS hstore
AS 'MODULE_PATHNAME','delete'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION hs_concat(hstore,hstore)
CREATE OR REPLACE FUNCTION hs_concat(hstore,hstore)
RETURNS hstore
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -76,12 +75,12 @@ CREATE OPERATOR || (
PROCEDURE = hs_concat
);
CREATE FUNCTION hs_contains(hstore,hstore)
CREATE OR REPLACE FUNCTION hs_contains(hstore,hstore)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION hs_contained(hstore,hstore)
CREATE OR REPLACE FUNCTION hs_contained(hstore,hstore)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -123,7 +122,7 @@ CREATE OPERATOR ~ (
JOIN = contjoinsel
);
CREATE FUNCTION tconvert(text,text)
CREATE OR REPLACE FUNCTION tconvert(text,text)
RETURNS hstore
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -134,27 +133,27 @@ CREATE OPERATOR => (
PROCEDURE = tconvert
);
CREATE FUNCTION akeys(hstore)
CREATE OR REPLACE FUNCTION akeys(hstore)
RETURNS _text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION avals(hstore)
CREATE OR REPLACE FUNCTION avals(hstore)
RETURNS _text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION skeys(hstore)
CREATE OR REPLACE FUNCTION skeys(hstore)
RETURNS setof text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION svals(hstore)
CREATE OR REPLACE FUNCTION svals(hstore)
RETURNS setof text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION each(IN hs hstore,
CREATE OR REPLACE FUNCTION each(IN hs hstore,
OUT key text,
OUT value text)
RETURNS SETOF record
@ -167,12 +166,12 @@ LANGUAGE C STRICT IMMUTABLE;
CREATE TYPE ghstore;
CREATE FUNCTION ghstore_in(cstring)
CREATE OR REPLACE FUNCTION ghstore_in(cstring)
RETURNS ghstore
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION ghstore_out(ghstore)
CREATE OR REPLACE FUNCTION ghstore_out(ghstore)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -183,37 +182,37 @@ CREATE TYPE ghstore (
OUTPUT = ghstore_out
);
CREATE FUNCTION ghstore_compress(internal)
CREATE OR REPLACE FUNCTION ghstore_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_decompress(internal)
CREATE OR REPLACE FUNCTION ghstore_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION ghstore_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION ghstore_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION ghstore_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_union(internal, internal)
CREATE OR REPLACE FUNCTION ghstore_union(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION ghstore_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ghstore_consistent(internal,internal,int4)
CREATE OR REPLACE FUNCTION ghstore_consistent(internal,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -238,17 +237,17 @@ AS
-- define the GIN support methods
CREATE FUNCTION gin_extract_hstore(internal, internal)
CREATE OR REPLACE FUNCTION gin_extract_hstore(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
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
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_consistent_hstore(internal, int2, internal)
CREATE OR REPLACE FUNCTION gin_consistent_hstore(internal, int2, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -263,6 +262,3 @@ AS
FUNCTION 3 gin_extract_hstore_query(internal, internal, int2),
FUNCTION 4 gin_consistent_hstore(internal, int2, internal),
STORAGE text;
END;

View File

@ -1,4 +1,5 @@
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 gin_hstore_ops USING gin CASCADE;
@ -41,5 +42,3 @@ DROP FUNCTION gin_extract_hstore_query(internal, internal, smallint);
DROP TYPE hstore CASCADE;
DROP TYPE ghstore CASCADE;
COMMIT;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION int_array_enum(int4[]);

View File

@ -1,20 +1,17 @@
-- 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)
--
-- Adjust this setting to control where the operators, functions, and
-- opclasses get created.
SET search_path = public;
BEGIN;
-- Query type
CREATE FUNCTION bqarr_in(cstring)
CREATE OR REPLACE FUNCTION bqarr_in(cstring)
RETURNS query_int
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION bqarr_out(query_int)
CREATE OR REPLACE FUNCTION bqarr_out(query_int)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -26,20 +23,20 @@ CREATE TYPE query_int (
);
--only for debug
CREATE FUNCTION querytree(query_int)
CREATE OR REPLACE FUNCTION querytree(query_int)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION boolop(_int4, query_int)
CREATE OR REPLACE FUNCTION boolop(_int4, query_int)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -71,35 +68,35 @@ CREATE OPERATOR ~~ (
-- Comparison methods
CREATE FUNCTION _int_contains(_int4, _int4)
CREATE OR REPLACE FUNCTION _int_contains(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -108,12 +105,12 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different';
-- support routines for indexing
CREATE FUNCTION _int_union(_int4, _int4)
CREATE OR REPLACE FUNCTION _int_union(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _int_inter(_int4, _int4)
CREATE OR REPLACE FUNCTION _int_inter(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -191,12 +188,12 @@ CREATE OPERATOR ~ (
);
--------------
CREATE FUNCTION intset(int4)
CREATE OR REPLACE FUNCTION intset(int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION icount(_int4)
CREATE OR REPLACE FUNCTION icount(_int4)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -206,32 +203,32 @@ CREATE OPERATOR # (
PROCEDURE = icount
);
CREATE FUNCTION sort(_int4, text)
CREATE OR REPLACE FUNCTION sort(_int4, text)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort(_int4)
CREATE OR REPLACE FUNCTION sort(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort_asc(_int4)
CREATE OR REPLACE FUNCTION sort_asc(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION sort_desc(_int4)
CREATE OR REPLACE FUNCTION sort_desc(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION uniq(_int4)
CREATE OR REPLACE FUNCTION uniq(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION idx(_int4, int4)
CREATE OR REPLACE FUNCTION idx(_int4, int4)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -242,17 +239,17 @@ CREATE OPERATOR # (
PROCEDURE = idx
);
CREATE FUNCTION subarray(_int4, int4, int4)
CREATE OR REPLACE FUNCTION subarray(_int4, int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION subarray(_int4, int4)
CREATE OR REPLACE FUNCTION subarray(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION intarray_push_elem(_int4, int4)
CREATE OR REPLACE FUNCTION intarray_push_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -263,7 +260,7 @@ CREATE OPERATOR + (
PROCEDURE = intarray_push_elem
);
CREATE FUNCTION intarray_push_array(_int4, _int4)
CREATE OR REPLACE FUNCTION intarray_push_array(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -275,7 +272,7 @@ CREATE OPERATOR + (
PROCEDURE = intarray_push_array
);
CREATE FUNCTION intarray_del_elem(_int4, int4)
CREATE OR REPLACE FUNCTION intarray_del_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -286,7 +283,7 @@ CREATE OPERATOR - (
PROCEDURE = intarray_del_elem
);
CREATE FUNCTION intset_union_elem(_int4, int4)
CREATE OR REPLACE FUNCTION intset_union_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -304,7 +301,7 @@ CREATE OPERATOR | (
PROCEDURE = _int_union
);
CREATE FUNCTION intset_subtract(_int4, _int4)
CREATE OR REPLACE FUNCTION intset_subtract(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -324,37 +321,37 @@ CREATE OPERATOR & (
--------------
-- 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
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_compress(internal)
CREATE OR REPLACE FUNCTION g_int_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_decompress(internal)
CREATE OR REPLACE FUNCTION g_int_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION g_int_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION g_int_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION g_int_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_union(internal, internal)
CREATE OR REPLACE FUNCTION g_int_union(internal, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_int_same(_int4, _int4, internal)
CREATE OR REPLACE FUNCTION g_int_same(_int4, _int4, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -385,12 +382,12 @@ DEFAULT FOR TYPE _int4 USING gist AS
---------------------------------------------
-- define the GiST support methods
CREATE FUNCTION _intbig_in(cstring)
CREATE OR REPLACE FUNCTION _intbig_in(cstring)
RETURNS intbig_gkey
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _intbig_out(intbig_gkey)
CREATE OR REPLACE FUNCTION _intbig_out(intbig_gkey)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -401,37 +398,37 @@ CREATE TYPE intbig_gkey (
OUTPUT = _intbig_out
);
CREATE FUNCTION g_intbig_consistent(internal,internal,int4)
CREATE OR REPLACE FUNCTION g_intbig_consistent(internal,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_compress(internal)
CREATE OR REPLACE FUNCTION g_intbig_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_decompress(internal)
CREATE OR REPLACE FUNCTION g_intbig_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION g_intbig_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION g_intbig_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION g_intbig_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_union(internal, internal)
CREATE OR REPLACE FUNCTION g_intbig_union(internal, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION g_intbig_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION g_intbig_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -459,12 +456,12 @@ AS
--GIN
CREATE FUNCTION ginint4_queryextract(internal, internal, int2)
CREATE OR REPLACE FUNCTION ginint4_queryextract(internal, internal, int2)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION ginint4_consistent(internal, int2, internal)
CREATE OR REPLACE FUNCTION ginint4_consistent(internal, int2, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -484,5 +481,3 @@ AS
FUNCTION 3 ginint4_queryextract (internal, internal, int2),
FUNCTION 4 ginint4_consistent (internal, int2, internal),
STORAGE int4;
COMMIT;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
DROP OPERATOR CLASS gin__int_ops USING gin;

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
--
-- Drop the actual types (in cascade):
--
---------------------------------------------------
SET search_path = public;
DROP TYPE ean13 CASCADE;
DROP TYPE isbn13 CASCADE;
DROP TYPE ismn13 CASCADE;

View File

@ -1,9 +1,3 @@
--
-- 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.
SET search_path = public;
@ -19,11 +13,11 @@ CREATE DOMAIN lo AS pg_catalog.oid;
-- The other functions that formerly existed are not needed because
-- 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;
-- This is used in triggers
CREATE FUNCTION lo_manage()
CREATE OR REPLACE FUNCTION lo_manage()
RETURNS pg_catalog.trigger
AS 'MODULE_PATHNAME'
LANGUAGE C;

View File

@ -1,3 +1,6 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
--
-- This runs some common tests against the type
--

View File

@ -1,11 +1,11 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
--
-- This removes the LO type
-- 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 TYPE lo CASCADE;

View File

@ -1,12 +1,12 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE FUNCTION ltree_in(cstring)
CREATE OR REPLACE FUNCTION ltree_in(cstring)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION ltree_out(ltree)
CREATE OR REPLACE FUNCTION ltree_out(ltree)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -20,37 +20,37 @@ CREATE TYPE ltree (
--Compare function for ltree
CREATE FUNCTION ltree_cmp(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_cmp(ltree,ltree)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_lt(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_lt(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_le(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_le(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_eq(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_eq(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_ge(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_ge(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_gt(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_gt(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_ne(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_ne(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -120,112 +120,112 @@ CREATE OPERATOR <> (
--util functions
CREATE FUNCTION subltree(ltree,int4,int4)
CREATE OR REPLACE FUNCTION subltree(ltree,int4,int4)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION subpath(ltree,int4,int4)
CREATE OR REPLACE FUNCTION subpath(ltree,int4,int4)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION subpath(ltree,int4)
CREATE OR REPLACE FUNCTION subpath(ltree,int4)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION index(ltree,ltree)
CREATE OR REPLACE FUNCTION index(ltree,ltree)
RETURNS int4
AS 'MODULE_PATHNAME', 'ltree_index'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION index(ltree,ltree,int4)
CREATE OR REPLACE FUNCTION index(ltree,ltree,int4)
RETURNS int4
AS 'MODULE_PATHNAME', 'ltree_index'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION nlevel(ltree)
CREATE OR REPLACE FUNCTION nlevel(ltree)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree2text(ltree)
CREATE OR REPLACE FUNCTION ltree2text(ltree)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION text2ltree(text)
CREATE OR REPLACE FUNCTION text2ltree(text)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(_ltree)
CREATE OR REPLACE FUNCTION lca(_ltree)
RETURNS ltree
AS 'MODULE_PATHNAME','_lca'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree,ltree)
CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_isparent(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_isparent(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_risparent(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_risparent(ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_addltree(ltree,ltree)
CREATE OR REPLACE FUNCTION ltree_addltree(ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_addtext(ltree,text)
CREATE OR REPLACE FUNCTION ltree_addtext(ltree,text)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltree_textadd(text,ltree)
CREATE OR REPLACE FUNCTION ltree_textadd(text,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltreeparentsel(internal, oid, internal, integer)
CREATE OR REPLACE FUNCTION ltreeparentsel(internal, oid, internal, integer)
RETURNS float8
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -298,12 +298,12 @@ CREATE OPERATOR CLASS ltree_ops
--lquery type
CREATE FUNCTION lquery_in(cstring)
CREATE OR REPLACE FUNCTION lquery_in(cstring)
RETURNS lquery
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION lquery_out(lquery)
CREATE OR REPLACE FUNCTION lquery_out(lquery)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -315,12 +315,12 @@ CREATE TYPE lquery (
STORAGE = extended
);
CREATE FUNCTION ltq_regex(ltree,lquery)
CREATE OR REPLACE FUNCTION ltq_regex(ltree,lquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltq_rregex(lquery,ltree)
CREATE OR REPLACE FUNCTION ltq_rregex(lquery,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -362,12 +362,12 @@ CREATE OPERATOR ^~ (
JOIN = contjoinsel
);
CREATE FUNCTION lt_q_regex(ltree,_lquery)
CREATE OR REPLACE FUNCTION lt_q_regex(ltree,_lquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION lt_q_rregex(_lquery,ltree)
CREATE OR REPLACE FUNCTION lt_q_rregex(_lquery,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -409,12 +409,12 @@ CREATE OPERATOR ^? (
JOIN = contjoinsel
);
CREATE FUNCTION ltxtq_in(cstring)
CREATE OR REPLACE FUNCTION ltxtq_in(cstring)
RETURNS ltxtquery
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION ltxtq_out(ltxtquery)
CREATE OR REPLACE FUNCTION ltxtq_out(ltxtquery)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -428,12 +428,12 @@ CREATE TYPE ltxtquery (
-- operations WITH ltxtquery
CREATE FUNCTION ltxtq_exec(ltree, ltxtquery)
CREATE OR REPLACE FUNCTION ltxtq_exec(ltree, ltxtquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION ltxtq_rexec(ltxtquery, ltree)
CREATE OR REPLACE FUNCTION ltxtq_rexec(ltxtquery, ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -476,12 +476,12 @@ CREATE OPERATOR ^@ (
);
--GiST support for ltree
CREATE FUNCTION ltree_gist_in(cstring)
CREATE OR REPLACE FUNCTION ltree_gist_in(cstring)
RETURNS ltree_gist
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION ltree_gist_out(ltree_gist)
CREATE OR REPLACE FUNCTION ltree_gist_out(ltree_gist)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -494,25 +494,25 @@ CREATE TYPE ltree_gist (
);
CREATE FUNCTION ltree_consistent(internal,internal,int2)
CREATE OR REPLACE FUNCTION ltree_consistent(internal,internal,int2)
RETURNS bool as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE FUNCTION ltree_compress(internal)
CREATE OR REPLACE FUNCTION ltree_compress(internal)
RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE FUNCTION ltree_decompress(internal)
CREATE OR REPLACE FUNCTION ltree_decompress(internal)
RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE FUNCTION ltree_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION ltree_penalty(internal,internal,internal)
RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION ltree_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION ltree_picksplit(internal, internal)
RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE FUNCTION ltree_union(internal, internal)
CREATE OR REPLACE FUNCTION ltree_union(internal, internal)
RETURNS int4 as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE FUNCTION ltree_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION ltree_same(internal, internal, internal)
RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE;
CREATE OPERATOR CLASS gist_ltree_ops
@ -542,52 +542,52 @@ CREATE OPERATOR CLASS gist_ltree_ops
-- arrays of ltree
CREATE FUNCTION _ltree_isparent(_ltree,ltree)
CREATE OR REPLACE FUNCTION _ltree_isparent(_ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltree_r_isparent(ltree,_ltree)
CREATE OR REPLACE FUNCTION _ltree_r_isparent(ltree,_ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltree_risparent(_ltree,ltree)
CREATE OR REPLACE FUNCTION _ltree_risparent(_ltree,ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltree_r_risparent(ltree,_ltree)
CREATE OR REPLACE FUNCTION _ltree_r_risparent(ltree,_ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltq_regex(_ltree,lquery)
CREATE OR REPLACE FUNCTION _ltq_regex(_ltree,lquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltq_rregex(lquery,_ltree)
CREATE OR REPLACE FUNCTION _ltq_rregex(lquery,_ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _lt_q_regex(_ltree,_lquery)
CREATE OR REPLACE FUNCTION _lt_q_regex(_ltree,_lquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _lt_q_rregex(_lquery,_ltree)
CREATE OR REPLACE FUNCTION _lt_q_rregex(_lquery,_ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltxtq_exec(_ltree, ltxtquery)
CREATE OR REPLACE FUNCTION _ltxtq_exec(_ltree, ltxtquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION _ltxtq_rexec(ltxtquery, _ltree)
CREATE OR REPLACE FUNCTION _ltxtq_rexec(ltxtquery, _ltree)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -775,7 +775,7 @@ CREATE OPERATOR ^@ (
);
--extractors
CREATE FUNCTION _ltree_extract_isparent(_ltree,ltree)
CREATE OR REPLACE FUNCTION _ltree_extract_isparent(_ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -786,7 +786,7 @@ CREATE OPERATOR ?@> (
PROCEDURE = _ltree_extract_isparent
);
CREATE FUNCTION _ltree_extract_risparent(_ltree,ltree)
CREATE OR REPLACE FUNCTION _ltree_extract_risparent(_ltree,ltree)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -797,7 +797,7 @@ CREATE OPERATOR ?<@ (
PROCEDURE = _ltree_extract_risparent
);
CREATE FUNCTION _ltq_extract_regex(_ltree,lquery)
CREATE OR REPLACE FUNCTION _ltq_extract_regex(_ltree,lquery)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -808,7 +808,7 @@ CREATE OPERATOR ?~ (
PROCEDURE = _ltq_extract_regex
);
CREATE FUNCTION _ltxtq_extract_exec(_ltree,ltxtquery)
CREATE OR REPLACE FUNCTION _ltxtq_extract_exec(_ltree,ltxtquery)
RETURNS ltree
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -820,32 +820,32 @@ CREATE OPERATOR ?@ (
);
--GiST support for ltree[]
CREATE FUNCTION _ltree_consistent(internal,internal,int2)
CREATE OR REPLACE FUNCTION _ltree_consistent(internal,internal,int2)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION _ltree_compress(internal)
CREATE OR REPLACE FUNCTION _ltree_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION _ltree_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION _ltree_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE STRICT;
CREATE FUNCTION _ltree_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION _ltree_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION _ltree_union(internal, internal)
CREATE OR REPLACE FUNCTION _ltree_union(internal, internal)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION _ltree_same(internal, internal, internal)
CREATE OR REPLACE FUNCTION _ltree_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;

View File

@ -1,3 +1,6 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
CREATE TABLE test ( path ltree);
INSERT INTO test VALUES ('Top');
INSERT INTO test VALUES ('Top.Science');

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gist__ltree_ops USING gist;

View File

@ -1,4 +1,4 @@
-- Adjust this setting to control where the objects get created.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION get_raw_page(text, int4);

View File

@ -1,5 +1,4 @@
-- Adjust this setting to control where the objects get created.
BEGIN;
SET search_path = public;
-- Register the function.
@ -17,5 +16,3 @@ CREATE VIEW pg_buffercache AS
-- Don't want these to be available at public.
REVOKE ALL ON FUNCTION pg_buffercache_pages() FROM PUBLIC;
REVOKE ALL ON pg_buffercache FROM PUBLIC;
COMMIT;

View File

@ -1,4 +1,4 @@
-- Adjust this setting to control where the objects get created.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP VIEW pg_buffercache;

View File

@ -1,5 +1,4 @@
-- Adjust this setting to control where the objects get created.
BEGIN;
SET search_path = 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 pg_freespacemap_relations FROM PUBLIC;
COMMIT;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP VIEW pg_freespacemap_pages;

View File

@ -1,29 +1,28 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
BEGIN;
create function set_limit(float4)
returns float4
CREATE OR REPLACE FUNCTION set_limit(float4)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
create function show_limit()
returns float4
CREATE OR REPLACE FUNCTION show_limit()
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
create function show_trgm(text)
returns _text
CREATE OR REPLACE FUNCTION show_trgm(text)
RETURNS _text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
create function similarity(text,text)
returns float4
CREATE OR REPLACE FUNCTION similarity(text,text)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
create function similarity_op(text,text)
returns bool
CREATE OR REPLACE FUNCTION similarity_op(text,text)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -37,12 +36,12 @@ CREATE OPERATOR % (
);
-- gist key
CREATE FUNCTION gtrgm_in(cstring)
CREATE OR REPLACE FUNCTION gtrgm_in(cstring)
RETURNS gtrgm
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION gtrgm_out(gtrgm)
CREATE OR REPLACE FUNCTION gtrgm_out(gtrgm)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
@ -54,37 +53,37 @@ CREATE TYPE gtrgm (
);
-- support functions for gist
CREATE FUNCTION gtrgm_consistent(gtrgm,internal,int4)
CREATE OR REPLACE FUNCTION gtrgm_consistent(gtrgm,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_compress(internal)
CREATE OR REPLACE FUNCTION gtrgm_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_decompress(internal)
CREATE OR REPLACE FUNCTION gtrgm_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gtrgm_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gtrgm_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gtrgm_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_union(bytea, internal)
CREATE OR REPLACE FUNCTION gtrgm_union(bytea, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gtrgm_same(gtrgm, gtrgm, internal)
CREATE OR REPLACE FUNCTION gtrgm_same(gtrgm, gtrgm, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -104,17 +103,17 @@ AS
STORAGE gtrgm;
-- support functions for gin
CREATE FUNCTION gin_extract_trgm(text, internal)
CREATE OR REPLACE FUNCTION gin_extract_trgm(text, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_extract_trgm(text, internal, internal)
CREATE OR REPLACE FUNCTION gin_extract_trgm(text, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gin_trgm_consistent(internal, internal, text)
CREATE OR REPLACE FUNCTION gin_trgm_consistent(internal, internal, text)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
@ -129,5 +128,3 @@ AS
FUNCTION 3 gin_extract_trgm (text, internal, internal),
FUNCTION 4 gin_trgm_consistent (internal, internal, text),
STORAGE int4;
COMMIT;

View File

@ -1,7 +1,6 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
BEGIN;
DROP OPERATOR CLASS gist_trgm_ops USING gist;
DROP FUNCTION gtrgm_same(gtrgm, gtrgm, internal);
@ -39,5 +38,3 @@ DROP FUNCTION show_trgm(text);
DROP FUNCTION show_limit();
DROP FUNCTION set_limit(float4);
COMMIT;

View File

@ -1,4 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION digest(text, text);

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION pgrowlocks(text);

View File

@ -1,4 +1,4 @@
-- Adjust this setting to control where the objects get created.
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION pgstattuple(text);

View File

@ -1,15 +1,15 @@
-- Create the user-defined type for 1-D floating point intervals (seg)
--
-- Adjust this setting to control where the objects get created.
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_out(seg)
CREATE OR REPLACE FUNCTION seg_out(seg)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -29,7 +29,7 @@ COMMENT ON TYPE seg IS
-- Left/Right methods
CREATE FUNCTION seg_over_left(seg, seg)
CREATE OR REPLACE FUNCTION seg_over_left(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -37,7 +37,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_over_left(seg, seg) IS
'overlaps or is left of';
CREATE FUNCTION seg_over_right(seg, seg)
CREATE OR REPLACE FUNCTION seg_over_right(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -45,7 +45,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_over_right(seg, seg) IS
'overlaps or is right of';
CREATE FUNCTION seg_left(seg, seg)
CREATE OR REPLACE FUNCTION seg_left(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -53,7 +53,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_left(seg, seg) IS
'is left of';
CREATE FUNCTION seg_right(seg, seg)
CREATE OR REPLACE FUNCTION seg_right(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -64,7 +64,7 @@ COMMENT ON FUNCTION seg_right(seg, seg) IS
-- Scalar comparison methods
CREATE FUNCTION seg_lt(seg, seg)
CREATE OR REPLACE FUNCTION seg_lt(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -72,7 +72,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_lt(seg, seg) IS
'less than';
CREATE FUNCTION seg_le(seg, seg)
CREATE OR REPLACE FUNCTION seg_le(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -80,7 +80,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_le(seg, seg) IS
'less than or equal';
CREATE FUNCTION seg_gt(seg, seg)
CREATE OR REPLACE FUNCTION seg_gt(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -88,7 +88,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_gt(seg, seg) IS
'greater than';
CREATE FUNCTION seg_ge(seg, seg)
CREATE OR REPLACE FUNCTION seg_ge(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -96,7 +96,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_ge(seg, seg) IS
'greater than or equal';
CREATE FUNCTION seg_contains(seg, seg)
CREATE OR REPLACE FUNCTION seg_contains(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -104,7 +104,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_contains(seg, seg) IS
'contains';
CREATE FUNCTION seg_contained(seg, seg)
CREATE OR REPLACE FUNCTION seg_contained(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -112,7 +112,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_contained(seg, seg) IS
'contained in';
CREATE FUNCTION seg_overlap(seg, seg)
CREATE OR REPLACE FUNCTION seg_overlap(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -120,7 +120,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_overlap(seg, seg) IS
'overlaps';
CREATE FUNCTION seg_same(seg, seg)
CREATE OR REPLACE FUNCTION seg_same(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -128,7 +128,7 @@ LANGUAGE C STRICT IMMUTABLE;
COMMENT ON FUNCTION seg_same(seg, seg) IS
'same as';
CREATE FUNCTION seg_different(seg, seg)
CREATE OR REPLACE FUNCTION seg_different(seg, seg)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -145,29 +145,29 @@ LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_inter(seg, seg)
CREATE OR REPLACE FUNCTION seg_inter(seg, seg)
RETURNS seg
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_size(seg)
CREATE OR REPLACE FUNCTION seg_size(seg)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- miscellaneous
CREATE FUNCTION seg_upper(seg)
CREATE OR REPLACE FUNCTION seg_upper(seg)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION seg_lower(seg)
CREATE OR REPLACE FUNCTION seg_lower(seg)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
@ -320,37 +320,37 @@ CREATE OPERATOR ~ (
-- define the GiST support methods
CREATE FUNCTION gseg_consistent(internal,seg,int4)
CREATE OR REPLACE FUNCTION gseg_consistent(internal,seg,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_compress(internal)
CREATE OR REPLACE FUNCTION gseg_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_decompress(internal)
CREATE OR REPLACE FUNCTION gseg_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gseg_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE FUNCTION gseg_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gseg_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_union(internal, internal)
CREATE OR REPLACE FUNCTION gseg_union(internal, internal)
RETURNS seg
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;
CREATE FUNCTION gseg_same(seg, seg, internal)
CREATE OR REPLACE FUNCTION gseg_same(seg, seg, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gist_seg_ops USING gist;

View File

@ -1,29 +1,31 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
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
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
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
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
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
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
LANGUAGE C STRICT
AS 'MODULE_PATHNAME', 'ssl_issuer_dn';
AS 'MODULE_PATHNAME', 'ssl_issuer_dn';
LANGUAGE C STRICT

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION ssl_client_serial();

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION connectby(text,text,text,text,text,int);

View File

@ -1,29 +1,25 @@
-- $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.
SET search_path = public;
BEGIN;
CREATE OR REPLACE FUNCTION testprs_start(internal, int4)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION testprs_start(internal, int4)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION testprs_getlexeme(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION testprs_getlexeme(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION testprs_end(internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION testprs_end(internal)
RETURNS void
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE FUNCTION testprs_lextype(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE OR REPLACE FUNCTION testprs_lextype(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
CREATE TEXT SEARCH PARSER testparser (
START = testprs_start,
@ -32,5 +28,3 @@ CREATE TEXT SEARCH PARSER testparser (
HEADLINE = pg_catalog.prsd_headline,
LEXTYPES = testprs_lextype
);
END;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP TEXT SEARCH PARSER testparser;

View File

@ -1,8 +1,6 @@
-- Adjust this setting to control where the objects get CREATEd.
SET search_path = public;
BEGIN;
--dict conf
CREATE TABLE pg_ts_dict (
dict_name text not null primary key,
@ -13,47 +11,47 @@ CREATE TABLE pg_ts_dict (
) with oids;
--dict interface
CREATE FUNCTION lexize(oid, text)
RETURNS _text
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION lexize(oid, text)
RETURNS _text
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION lexize(text, text)
CREATE OR REPLACE FUNCTION lexize(text, text)
RETURNS _text
as 'MODULE_PATHNAME', 'lexize_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION lexize(text)
CREATE OR REPLACE FUNCTION lexize(text)
RETURNS _text
as 'MODULE_PATHNAME', 'lexize_bycurrent'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION set_curdict(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curdict(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION set_curdict(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curdict_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curdict(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curdict_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
--built-in dictionaries
CREATE FUNCTION dex_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION dex_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION dex_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION dex_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_dict select
'simple',
@ -62,17 +60,17 @@ insert into pg_ts_dict select
'dex_lexize(internal,internal,int4)',
'Simple example of dictionary.'
;
CREATE FUNCTION snb_en_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION snb_en_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION snb_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION snb_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_dict select
'en_stem',
@ -82,10 +80,10 @@ insert into pg_ts_dict select
'English Stemmer. Snowball.'
;
CREATE FUNCTION snb_ru_init_koi8(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION snb_ru_init_koi8(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
insert into pg_ts_dict select
'ru_stem_koi8',
@ -94,11 +92,11 @@ insert into pg_ts_dict select
'snb_lexize(internal,internal,int4)',
'Russian Stemmer. Snowball. KOI8 Encoding'
;
CREATE FUNCTION snb_ru_init_utf8(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION snb_ru_init_utf8(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
insert into pg_ts_dict select
'ru_stem_utf8',
@ -107,17 +105,17 @@ insert into pg_ts_dict select
'snb_lexize(internal,internal,int4)',
'Russian Stemmer. Snowball. UTF8 Encoding'
;
CREATE FUNCTION spell_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION spell_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION spell_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION spell_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_dict select
'ispell_template',
@ -127,16 +125,16 @@ insert into pg_ts_dict select
'ISpell interface. Must have .dict and .aff files'
;
CREATE FUNCTION syn_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION syn_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION syn_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION syn_lexize(internal,internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_dict select
'synonym',
@ -146,16 +144,16 @@ insert into pg_ts_dict select
'Example of synonym dictionary'
;
CREATE FUNCTION thesaurus_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION thesaurus_init(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION thesaurus_lexize(internal,internal,int4,internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION thesaurus_lexize(internal,internal,int4,internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_dict select
'thesaurus_template',
@ -178,84 +176,84 @@ CREATE TABLE pg_ts_parser (
--sql-level interface
CREATE TYPE tokentype
as (tokid int4, alias text, descr text);
AS (tokid int4, alias text, descr text);
CREATE FUNCTION token_type(int4)
RETURNS setof tokentype
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION token_type(int4)
RETURNS setof tokentype
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION token_type(text)
RETURNS setof tokentype
as 'MODULE_PATHNAME', 'token_type_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION token_type(text)
RETURNS setof tokentype
as 'MODULE_PATHNAME', 'token_type_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION token_type()
RETURNS setof tokentype
as 'MODULE_PATHNAME', 'token_type_current'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION token_type()
RETURNS setof tokentype
as 'MODULE_PATHNAME', 'token_type_current'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION set_curprs(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curprs(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION set_curprs(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curprs_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curprs(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curprs_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE TYPE tokenout
as (tokid int4, token text);
AS (tokid int4, token text);
CREATE FUNCTION parse(oid,text)
RETURNS setof tokenout
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION parse(oid,text)
RETURNS setof tokenout
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION parse(text,text)
RETURNS setof tokenout
as 'MODULE_PATHNAME', 'parse_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION parse(text,text)
RETURNS setof tokenout
as 'MODULE_PATHNAME', 'parse_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION parse(text)
RETURNS setof tokenout
as 'MODULE_PATHNAME', 'parse_current'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION parse(text)
RETURNS setof tokenout
as 'MODULE_PATHNAME', 'parse_current'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
--default parser
CREATE FUNCTION prsd_start(internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION prsd_start(internal,int4)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION prsd_getlexeme(internal,internal,internal)
RETURNS int4
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION prsd_getlexeme(internal,internal,internal)
RETURNS int4
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION prsd_end(internal)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION prsd_end(internal)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION prsd_lextype(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION prsd_lextype(internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION prsd_headline(internal,internal,internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
CREATE OR REPLACE FUNCTION prsd_headline(internal,internal,internal)
RETURNS internal
as 'MODULE_PATHNAME'
LANGUAGE C;
insert into pg_ts_parser select
'default',
@ -282,23 +280,23 @@ CREATE TABLE pg_ts_cfgmap (
primary key (ts_name,tok_alias)
) with oids;
CREATE FUNCTION set_curcfg(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curcfg(int)
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION set_curcfg(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curcfg_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION set_curcfg(text)
RETURNS void
as 'MODULE_PATHNAME', 'set_curcfg_byname'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION show_curcfg()
RETURNS oid
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION show_curcfg()
RETURNS oid
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
insert into pg_ts_cfg values ('default', 'default','C');
insert into pg_ts_cfg values ('default_russian', 'default','ru_RU.KOI8-R');
@ -383,12 +381,12 @@ insert into pg_ts_cfgmap values ('simple', 'int', '{simple}');
insert into pg_ts_cfgmap values ('simple', 'uint', '{simple}');
--tsvector type
CREATE FUNCTION tsvector_in(cstring)
CREATE OR REPLACE FUNCTION tsvector_in(cstring)
RETURNS tsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION tsvector_out(tsvector)
CREATE OR REPLACE FUNCTION tsvector_out(tsvector)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -400,37 +398,37 @@ CREATE TYPE tsvector (
STORAGE = extended
);
CREATE FUNCTION length(tsvector)
CREATE OR REPLACE FUNCTION length(tsvector)
RETURNS int4
AS 'MODULE_PATHNAME', 'tsvector_length'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION to_tsvector(oid, text)
CREATE OR REPLACE FUNCTION to_tsvector(oid, text)
RETURNS tsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION to_tsvector(text, text)
CREATE OR REPLACE FUNCTION to_tsvector(text, text)
RETURNS tsvector
AS 'MODULE_PATHNAME', 'to_tsvector_name'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION to_tsvector(text)
CREATE OR REPLACE FUNCTION to_tsvector(text)
RETURNS tsvector
AS 'MODULE_PATHNAME', 'to_tsvector_current'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION strip(tsvector)
CREATE OR REPLACE FUNCTION strip(tsvector)
RETURNS tsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION setweight(tsvector,"char")
CREATE OR REPLACE FUNCTION setweight(tsvector,"char")
RETURNS tsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION concat(tsvector,tsvector)
CREATE OR REPLACE FUNCTION concat(tsvector,tsvector)
RETURNS tsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
@ -442,12 +440,12 @@ CREATE OPERATOR || (
);
--query type
CREATE FUNCTION tsquery_in(cstring)
CREATE OR REPLACE FUNCTION tsquery_in(cstring)
RETURNS tsquery
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION tsquery_out(tsquery)
CREATE OR REPLACE FUNCTION tsquery_out(tsquery)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -459,50 +457,50 @@ CREATE TYPE tsquery (
OUTPUT = tsquery_out
);
CREATE FUNCTION querytree(tsquery)
CREATE OR REPLACE FUNCTION querytree(tsquery)
RETURNS text
AS 'MODULE_PATHNAME', 'tsquerytree'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION to_tsquery(oid, text)
CREATE OR REPLACE FUNCTION to_tsquery(oid, text)
RETURNS tsquery
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION to_tsquery(text, text)
CREATE OR REPLACE FUNCTION to_tsquery(text, text)
RETURNS tsquery
AS 'MODULE_PATHNAME','to_tsquery_name'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION to_tsquery(text)
CREATE OR REPLACE FUNCTION to_tsquery(text)
RETURNS tsquery
AS 'MODULE_PATHNAME','to_tsquery_current'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION plainto_tsquery(oid, text)
CREATE OR REPLACE FUNCTION plainto_tsquery(oid, text)
RETURNS tsquery
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION plainto_tsquery(text, text)
CREATE OR REPLACE FUNCTION plainto_tsquery(text, text)
RETURNS tsquery
AS 'MODULE_PATHNAME','plainto_tsquery_name'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION plainto_tsquery(text)
CREATE OR REPLACE FUNCTION plainto_tsquery(text)
RETURNS tsquery
AS 'MODULE_PATHNAME','plainto_tsquery_current'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
--operations
CREATE FUNCTION exectsq(tsvector, tsquery)
CREATE OR REPLACE FUNCTION exectsq(tsvector, tsquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
COMMENT ON FUNCTION exectsq(tsvector, tsquery) IS 'boolean operation with text index';
CREATE FUNCTION rexectsq(tsquery, tsvector)
CREATE OR REPLACE FUNCTION rexectsq(tsquery, tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
@ -527,90 +525,90 @@ CREATE OPERATOR @@ (
);
--Trigger
CREATE FUNCTION tsearch2()
CREATE OR REPLACE FUNCTION tsearch2()
RETURNS trigger
AS 'MODULE_PATHNAME'
LANGUAGE C;
--Relevation
CREATE FUNCTION rank(float4[], tsvector, tsquery)
CREATE OR REPLACE FUNCTION rank(float4[], tsvector, tsquery)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank(float4[], tsvector, tsquery, int4)
CREATE OR REPLACE FUNCTION rank(float4[], tsvector, tsquery, int4)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank(tsvector, tsquery)
CREATE OR REPLACE FUNCTION rank(tsvector, tsquery)
RETURNS float4
AS 'MODULE_PATHNAME', 'rank_def'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank(tsvector, tsquery, int4)
CREATE OR REPLACE FUNCTION rank(tsvector, tsquery, int4)
RETURNS float4
AS 'MODULE_PATHNAME', 'rank_def'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank_cd(float4[], tsvector, tsquery)
CREATE OR REPLACE FUNCTION rank_cd(float4[], tsvector, tsquery)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank_cd(float4[], tsvector, tsquery, int4)
CREATE OR REPLACE FUNCTION rank_cd(float4[], tsvector, tsquery, int4)
RETURNS float4
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank_cd(tsvector, tsquery)
CREATE OR REPLACE FUNCTION rank_cd(tsvector, tsquery)
RETURNS float4
AS 'MODULE_PATHNAME', 'rank_cd_def'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION rank_cd(tsvector, tsquery, int4)
CREATE OR REPLACE FUNCTION rank_cd(tsvector, tsquery, int4)
RETURNS float4
AS 'MODULE_PATHNAME', 'rank_cd_def'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(oid, text, tsquery, text)
CREATE OR REPLACE FUNCTION headline(oid, text, tsquery, text)
RETURNS text
AS 'MODULE_PATHNAME', 'headline'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(oid, text, tsquery)
CREATE OR REPLACE FUNCTION headline(oid, text, tsquery)
RETURNS text
AS 'MODULE_PATHNAME', 'headline'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(text, text, tsquery, text)
CREATE OR REPLACE FUNCTION headline(text, text, tsquery, text)
RETURNS text
AS 'MODULE_PATHNAME', 'headline_byname'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(text, text, tsquery)
CREATE OR REPLACE FUNCTION headline(text, text, tsquery)
RETURNS text
AS 'MODULE_PATHNAME', 'headline_byname'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(text, tsquery, text)
CREATE OR REPLACE FUNCTION headline(text, tsquery, text)
RETURNS text
AS 'MODULE_PATHNAME', 'headline_current'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION headline(text, tsquery)
CREATE OR REPLACE FUNCTION headline(text, tsquery)
RETURNS text
AS 'MODULE_PATHNAME', 'headline_current'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
--GiST
--GiST key type
CREATE FUNCTION gtsvector_in(cstring)
CREATE OR REPLACE FUNCTION gtsvector_in(cstring)
RETURNS gtsvector
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gtsvector_out(gtsvector)
CREATE OR REPLACE FUNCTION gtsvector_out(gtsvector)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -622,37 +620,37 @@ CREATE TYPE gtsvector (
);
-- support FUNCTIONs
CREATE FUNCTION gtsvector_consistent(gtsvector,internal,int4)
CREATE OR REPLACE FUNCTION gtsvector_consistent(gtsvector,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsvector_compress(internal)
CREATE OR REPLACE FUNCTION gtsvector_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsvector_decompress(internal)
CREATE OR REPLACE FUNCTION gtsvector_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsvector_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gtsvector_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gtsvector_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gtsvector_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsvector_union(internal, internal)
CREATE OR REPLACE FUNCTION gtsvector_union(internal, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsvector_same(gtsvector, gtsvector, internal)
CREATE OR REPLACE FUNCTION gtsvector_same(gtsvector, gtsvector, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
@ -674,14 +672,14 @@ AS
--stat info
CREATE TYPE statinfo
as (word text, ndoc int4, nentry int4);
AS (word text, ndoc int4, nentry int4);
--CREATE FUNCTION tsstat_in(cstring)
--CREATE OR REPLACE FUNCTION tsstat_in(cstring)
--RETURNS tsstat
--AS 'MODULE_PATHNAME'
--LANGUAGE C RETURNS NULL ON NULL INPUT;
--
--CREATE FUNCTION tsstat_out(tsstat)
--CREATE OR REPLACE FUNCTION tsstat_out(tsstat)
--RETURNS cstring
--AS 'MODULE_PATHNAME'
--LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -693,12 +691,12 @@ CREATE TYPE statinfo
-- STORAGE = plain
--);
--
--CREATE FUNCTION ts_accum(tsstat,tsvector)
--CREATE OR REPLACE FUNCTION ts_accum(tsstat,tsvector)
--RETURNS tsstat
--AS 'MODULE_PATHNAME'
--LANGUAGE C RETURNS NULL ON NULL INPUT;
--
--CREATE FUNCTION ts_accum_finish(tsstat)
--CREATE OR REPLACE FUNCTION ts_accum_finish(tsstat)
-- RETURNS setof statinfo
-- as 'MODULE_PATHNAME'
-- LANGUAGE C
@ -712,27 +710,27 @@ CREATE TYPE statinfo
-- initcond = ''
--);
CREATE FUNCTION stat(text)
RETURNS setof statinfo
as 'MODULE_PATHNAME', 'ts_stat'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION stat(text)
RETURNS setof statinfo
as 'MODULE_PATHNAME', 'ts_stat'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE FUNCTION stat(text,text)
RETURNS setof statinfo
as 'MODULE_PATHNAME', 'ts_stat'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
CREATE OR REPLACE FUNCTION stat(text,text)
RETURNS setof statinfo
as 'MODULE_PATHNAME', 'ts_stat'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
--reset - just for debuging
CREATE FUNCTION reset_tsearch()
CREATE OR REPLACE FUNCTION reset_tsearch()
RETURNS void
as 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPUT;
--get cover (debug for rank_cd)
CREATE FUNCTION get_covers(tsvector,tsquery)
CREATE OR REPLACE FUNCTION get_covers(tsvector,tsquery)
RETURNS text
as 'MODULE_PATHNAME'
LANGUAGE C
@ -748,12 +746,12 @@ create type tsdebug as (
"tsvector" tsvector
);
CREATE FUNCTION _get_parser_from_curcfg()
CREATE OR REPLACE FUNCTION _get_parser_from_curcfg()
RETURNS text as
' select prs_name from pg_ts_cfg where oid = show_curcfg() '
LANGUAGE SQL RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION ts_debug(text)
CREATE OR REPLACE FUNCTION ts_debug(text)
RETURNS setof tsdebug as '
select
m.ts_name,
@ -775,37 +773,37 @@ where
' LANGUAGE SQL RETURNS NULL ON NULL INPUT;
--compare functions
CREATE FUNCTION tsvector_cmp(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_cmp(tsvector,tsvector)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_lt(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_lt(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_le(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_le(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_eq(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_eq(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_ge(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_ge(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_gt(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_gt(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
CREATE FUNCTION tsvector_ne(tsvector,tsvector)
CREATE OR REPLACE FUNCTION tsvector_ne(tsvector,tsvector)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT IMMUTABLE;
@ -1119,12 +1117,12 @@ CREATE OPERATOR ~ (
-----------gist support of rewrite------------------
CREATE FUNCTION gtsq_in(cstring)
CREATE OR REPLACE FUNCTION gtsq_in(cstring)
RETURNS gtsq
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gtsq_out(gtsq)
CREATE OR REPLACE FUNCTION gtsq_out(gtsq)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -1135,37 +1133,37 @@ CREATE TYPE gtsq (
OUTPUT = gtsq_out
);
CREATE FUNCTION gtsq_consistent(gtsq,internal,int4)
CREATE OR REPLACE FUNCTION gtsq_consistent(gtsq,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsq_compress(internal)
CREATE OR REPLACE FUNCTION gtsq_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsq_decompress(internal)
CREATE OR REPLACE FUNCTION gtsq_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsq_penalty(internal,internal,internal)
CREATE OR REPLACE FUNCTION gtsq_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gtsq_picksplit(internal, internal)
CREATE OR REPLACE FUNCTION gtsq_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsq_union(bytea, internal)
CREATE OR REPLACE FUNCTION gtsq_union(bytea, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C;
CREATE FUNCTION gtsq_same(gtsq, gtsq, internal)
CREATE OR REPLACE FUNCTION gtsq_same(gtsq, gtsq, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
@ -1187,17 +1185,17 @@ AS
STORAGE gtsq;
--GIN support function
CREATE FUNCTION gin_extract_tsvector(tsvector,internal)
CREATE OR REPLACE FUNCTION gin_extract_tsvector(tsvector,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gin_extract_tsquery(tsquery,internal,internal)
CREATE OR REPLACE FUNCTION gin_extract_tsquery(tsquery,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
CREATE FUNCTION gin_ts_consistent(internal,internal,tsquery)
CREATE OR REPLACE FUNCTION gin_ts_consistent(internal,internal,tsquery)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C RETURNS NULL ON NULL INPUT;
@ -1240,4 +1238,3 @@ AS
--example of thesaurus dict
--update pg_ts_dict set dict_initoption='DictFile="contrib/thesaurus", Dictionary="en_stem"' where dict_name='thesaurus_template';
--update pg_ts_cfgmap set dict_name = '{thesaurus_template,en_stem}' where dict_name = '{en_stem}';
END;

View File

@ -1,9 +1,5 @@
BEGIN;
--Be careful !!!
--script drops all indices, triggers and columns with types defined
--in tsearch2.sql
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP OPERATOR CLASS gin_tsvector_ops USING gin CASCADE;
@ -71,5 +67,3 @@ DROP FUNCTION gtsq_union(bytea, internal);
DROP FUNCTION reset_tsearch();
DROP FUNCTION tsearch2() CASCADE;
DROP FUNCTION _get_parser_from_curcfg();
END;

View File

@ -1,5 +1,4 @@
/* $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;
DROP FUNCTION uuid_nil();

View File

@ -1,15 +1,53 @@
/* $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;
CREATE FUNCTION uuid_nil() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_nil';
CREATE FUNCTION uuid_ns_dns() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_dns';
CREATE FUNCTION uuid_ns_url() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_url';
CREATE FUNCTION uuid_ns_oid() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_oid';
CREATE FUNCTION uuid_ns_x500() RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_ns_x500';
CREATE OR REPLACE FUNCTION uuid_nil()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_nil';
IMMUTABLE STRICT LANGUAGE C
CREATE FUNCTION uuid_generate_v1() RETURNS uuid VOLATILE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1';
CREATE FUNCTION uuid_generate_v1mc() RETURNS uuid VOLATILE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v1mc';
CREATE FUNCTION uuid_generate_v3(namespace uuid, name text) RETURNS uuid IMMUTABLE STRICT LANGUAGE C AS 'MODULE_PATHNAME', 'uuid_generate_v3';
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_dns()
RETURNS uuid
AS 'MODULE_PATHNAME', 'uuid_ns_dns';
IMMUTABLE STRICT LANGUAGE C
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

View File

@ -1,64 +1,84 @@
-- Adjust this setting to control where the objects get created.
SET search_path = public;
--SQL for XML parser
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
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
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE;
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE;
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
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
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE;
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
-- List function
CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text
AS 'SELECT xpath_list($1,$2,'','')' LANGUAGE SQL STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text
AS 'SELECT xpath_list($1,$2,'','')'
LANGUAGE SQL STRICT IMMUTABLE;
-- Wrapper functions for nodeset where no tags needed
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text) RETURNS text AS
'SELECT xpath_nodeset($1,$2,'''','''')' LANGUAGE SQL STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text)
RETURNS text
AS 'SELECT xpath_nodeset($1,$2,'''','''')'
LANGUAGE SQL STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text) RETURNS text AS
'SELECT xpath_nodeset($1,$2,'''',$3)' LANGUAGE SQL STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text)
RETURNS text
AS 'SELECT xpath_nodeset($1,$2,'''',$3)'
LANGUAGE SQL STRICT IMMUTABLE;
-- Table function
CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text) RETURNS setof record
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT STABLE;
CREATE OR REPLACE FUNCTION xpath_table(text,text,text,text,text)
RETURNS setof record
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT STABLE;
-- XSLT functions
-- Delete from here to the end of the file if you are not compiling with
-- XSLT support.
CREATE OR REPLACE FUNCTION xslt_process(text,text,text) RETURNS text
AS 'MODULE_PATHNAME' LANGUAGE C STRICT VOLATILE;
CREATE OR REPLACE FUNCTION xslt_process(text,text,text)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT VOLATILE;
-- the function checks for the correct argument count
CREATE OR REPLACE FUNCTION xslt_process(text,text) RETURNS text
AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE;
CREATE OR REPLACE FUNCTION xslt_process(text,text)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT IMMUTABLE;

View File

@ -1,3 +1,4 @@
-- Adjust this setting to control where the objects get dropped.
SET search_path = public;
DROP FUNCTION xslt_process(text,text);

View File

@ -16,11 +16,17 @@
these cases, you will need to run <literal>make</literal> and <literal>make
install</literal> in <literal>contrib/module</literal>. After you have
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>
$ psql -d dbname -f module.sql
</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>
&adminpack;