From 029fac2264101919b65fb6319bb994f941969471 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 13 Feb 2011 21:24:14 -0500 Subject: [PATCH] Avoid use of CREATE OR REPLACE FUNCTION in extension installation files. It was never terribly consistent to use OR REPLACE (because of the lack of comparable functionality for data types, operators, etc), and experimentation shows that it's now positively pernicious in the extension world. We really want a failure to occur if there are any conflicts, else it's unclear what the extension-ownership state of the conflicted object ought to be. Most of the time, CREATE EXTENSION will fail anyway because of conflicts on other object types, but an extension defining only functions can succeed, with bad results. --- contrib/adminpack/adminpack--1.0.sql | 16 +- contrib/btree_gin/btree_gin--1.0.sql | 136 ++--- contrib/btree_gist/btree_gist--1.0.sql | 242 ++++----- contrib/chkpass/chkpass--1.0.sql | 10 +- contrib/citext/citext--1.0.sql | 74 +-- contrib/cube/cube--1.0.sql | 70 +-- contrib/dblink/dblink--1.0.sql | 80 +-- contrib/dict_int/dict_int--1.0.sql | 4 +- contrib/dict_xsyn/dict_xsyn--1.0.sql | 4 +- contrib/earthdistance/earthdistance--1.0.sql | 20 +- contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql | 20 +- contrib/hstore/hstore--1.0.sql | 104 ++-- contrib/intagg/int_aggregate--1.0.sql | 6 +- contrib/intarray/intarray--1.0.sql | 90 ++-- contrib/isn/isn--1.0.sql | 490 +++++++++--------- contrib/lo/lo--1.0.sql | 4 +- contrib/ltree/ltree--1.0.sql | 140 ++--- contrib/pageinspect/pageinspect--1.0.sql | 16 +- .../pg_buffercache/pg_buffercache--1.0.sql | 2 +- .../pg_freespacemap/pg_freespacemap--1.0.sql | 4 +- contrib/pg_trgm/pg_trgm--1.0.sql | 38 +- contrib/pgcrypto/pgcrypto--1.0.sql | 66 +-- contrib/pgrowlocks/pgrowlocks--1.0.sql | 2 +- contrib/pgstattuple/pgstattuple--1.0.sql | 8 +- contrib/seg/seg--1.0.sql | 58 +-- contrib/spi/autoinc--1.0.sql | 2 +- contrib/spi/insert_username--1.0.sql | 2 +- contrib/spi/moddatetime--1.0.sql | 2 +- contrib/spi/refint--1.0.sql | 4 +- contrib/spi/timetravel--1.0.sql | 6 +- contrib/sslinfo/sslinfo--1.0.sql | 18 +- contrib/tablefunc/tablefunc--1.0.sql | 22 +- contrib/test_parser/test_parser--1.0.sql | 8 +- contrib/tsearch2/tsearch2--1.0.sql | 22 +- contrib/unaccent/unaccent--1.0.sql | 8 +- contrib/uuid-ossp/uuid-ossp--1.0.sql | 20 +- contrib/xml2/xml2--1.0.sql | 26 +- 37 files changed, 922 insertions(+), 922 deletions(-) diff --git a/contrib/adminpack/adminpack--1.0.sql b/contrib/adminpack/adminpack--1.0.sql index 0502a4c01f..090702231c 100644 --- a/contrib/adminpack/adminpack--1.0.sql +++ b/contrib/adminpack/adminpack--1.0.sql @@ -6,27 +6,27 @@ /* generic file access functions */ -CREATE OR REPLACE FUNCTION pg_catalog.pg_file_write(text, text, bool) +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_rename(text, text, text) +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) +CREATE FUNCTION pg_catalog.pg_file_rename(text, text) RETURNS bool AS 'SELECT pg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);' LANGUAGE SQL VOLATILE STRICT; -CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text) +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_logdir_ls() +CREATE FUNCTION pg_catalog.pg_logdir_ls() RETURNS setof record AS 'MODULE_PATHNAME', 'pg_logdir_ls' LANGUAGE C VOLATILE STRICT; @@ -34,17 +34,17 @@ LANGUAGE C VOLATILE STRICT; /* Renaming of existing backend functions for pgAdmin compatibility */ -CREATE OR REPLACE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint) +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_length(text) +CREATE FUNCTION pg_catalog.pg_file_length(text) RETURNS bigint AS 'SELECT size FROM pg_catalog.pg_stat_file($1)' LANGUAGE SQL VOLATILE STRICT; -CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate() +CREATE FUNCTION pg_catalog.pg_logfile_rotate() RETURNS int4 AS 'pg_rotate_logfile' LANGUAGE INTERNAL VOLATILE STRICT; diff --git a/contrib/btree_gin/btree_gin--1.0.sql b/contrib/btree_gin/btree_gin--1.0.sql index 08bbff721f..07f93640f3 100644 --- a/contrib/btree_gin/btree_gin--1.0.sql +++ b/contrib/btree_gin/btree_gin--1.0.sql @@ -1,21 +1,21 @@ /* contrib/btree_gin/btree_gin--1.0.sql */ -CREATE OR REPLACE FUNCTION gin_btree_consistent(internal, int2, anyelement, int4, internal, internal) +CREATE FUNCTION gin_btree_consistent(internal, int2, anyelement, int4, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_value_int2(int2, internal) +CREATE FUNCTION gin_extract_value_int2(int2, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_int2(int2, int2, int2, internal) +CREATE FUNCTION gin_compare_prefix_int2(int2, int2, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_int2(int2, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_int2(int2, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -35,17 +35,17 @@ AS FUNCTION 5 gin_compare_prefix_int2(int2,int2,int2, internal), STORAGE int2; -CREATE OR REPLACE FUNCTION gin_extract_value_int4(int4, internal) +CREATE FUNCTION gin_extract_value_int4(int4, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_int4(int4, int4, int2, internal) +CREATE FUNCTION gin_compare_prefix_int4(int4, int4, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_int4(int4, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_int4(int4, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -65,17 +65,17 @@ AS FUNCTION 5 gin_compare_prefix_int4(int4,int4,int2, internal), STORAGE int4; -CREATE OR REPLACE FUNCTION gin_extract_value_int8(int8, internal) +CREATE FUNCTION gin_extract_value_int8(int8, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_int8(int8, int8, int2, internal) +CREATE FUNCTION gin_compare_prefix_int8(int8, int8, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_int8(int8, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_int8(int8, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -95,17 +95,17 @@ AS FUNCTION 5 gin_compare_prefix_int8(int8,int8,int2, internal), STORAGE int8; -CREATE OR REPLACE FUNCTION gin_extract_value_float4(float4, internal) +CREATE FUNCTION gin_extract_value_float4(float4, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_float4(float4, float4, int2, internal) +CREATE FUNCTION gin_compare_prefix_float4(float4, float4, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_float4(float4, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_float4(float4, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -125,17 +125,17 @@ AS FUNCTION 5 gin_compare_prefix_float4(float4,float4,int2, internal), STORAGE float4; -CREATE OR REPLACE FUNCTION gin_extract_value_float8(float8, internal) +CREATE FUNCTION gin_extract_value_float8(float8, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_float8(float8, float8, int2, internal) +CREATE FUNCTION gin_compare_prefix_float8(float8, float8, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_float8(float8, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_float8(float8, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -155,17 +155,17 @@ AS FUNCTION 5 gin_compare_prefix_float8(float8,float8,int2, internal), STORAGE float8; -CREATE OR REPLACE FUNCTION gin_extract_value_money(money, internal) +CREATE FUNCTION gin_extract_value_money(money, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_money(money, money, int2, internal) +CREATE FUNCTION gin_compare_prefix_money(money, money, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_money(money, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_money(money, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -185,17 +185,17 @@ AS FUNCTION 5 gin_compare_prefix_money(money,money,int2, internal), STORAGE money; -CREATE OR REPLACE FUNCTION gin_extract_value_oid(oid, internal) +CREATE FUNCTION gin_extract_value_oid(oid, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_oid(oid, oid, int2, internal) +CREATE FUNCTION gin_compare_prefix_oid(oid, oid, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_oid(oid, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_oid(oid, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -215,17 +215,17 @@ AS FUNCTION 5 gin_compare_prefix_oid(oid,oid,int2, internal), STORAGE oid; -CREATE OR REPLACE FUNCTION gin_extract_value_timestamp(timestamp, internal) +CREATE FUNCTION gin_extract_value_timestamp(timestamp, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_timestamp(timestamp, timestamp, int2, internal) +CREATE FUNCTION gin_compare_prefix_timestamp(timestamp, timestamp, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_timestamp(timestamp, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_timestamp(timestamp, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -245,17 +245,17 @@ AS FUNCTION 5 gin_compare_prefix_timestamp(timestamp,timestamp,int2, internal), STORAGE timestamp; -CREATE OR REPLACE FUNCTION gin_extract_value_timestamptz(timestamptz, internal) +CREATE FUNCTION gin_extract_value_timestamptz(timestamptz, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_timestamptz(timestamptz, timestamptz, int2, internal) +CREATE FUNCTION gin_compare_prefix_timestamptz(timestamptz, timestamptz, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_timestamptz(timestamptz, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -275,17 +275,17 @@ AS FUNCTION 5 gin_compare_prefix_timestamptz(timestamptz,timestamptz,int2, internal), STORAGE timestamptz; -CREATE OR REPLACE FUNCTION gin_extract_value_time(time, internal) +CREATE FUNCTION gin_extract_value_time(time, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_time(time, time, int2, internal) +CREATE FUNCTION gin_compare_prefix_time(time, time, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_time(time, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_time(time, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -305,17 +305,17 @@ AS FUNCTION 5 gin_compare_prefix_time(time,time,int2, internal), STORAGE time; -CREATE OR REPLACE FUNCTION gin_extract_value_timetz(timetz, internal) +CREATE FUNCTION gin_extract_value_timetz(timetz, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_timetz(timetz, timetz, int2, internal) +CREATE FUNCTION gin_compare_prefix_timetz(timetz, timetz, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_timetz(timetz, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_timetz(timetz, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -335,17 +335,17 @@ AS FUNCTION 5 gin_compare_prefix_timetz(timetz,timetz,int2, internal), STORAGE timetz; -CREATE OR REPLACE FUNCTION gin_extract_value_date(date, internal) +CREATE FUNCTION gin_extract_value_date(date, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_date(date, date, int2, internal) +CREATE FUNCTION gin_compare_prefix_date(date, date, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_date(date, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_date(date, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -365,17 +365,17 @@ AS FUNCTION 5 gin_compare_prefix_date(date,date,int2, internal), STORAGE date; -CREATE OR REPLACE FUNCTION gin_extract_value_interval(interval, internal) +CREATE FUNCTION gin_extract_value_interval(interval, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_interval(interval, interval, int2, internal) +CREATE FUNCTION gin_compare_prefix_interval(interval, interval, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_interval(interval, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_interval(interval, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -395,17 +395,17 @@ AS FUNCTION 5 gin_compare_prefix_interval(interval,interval,int2, internal), STORAGE interval; -CREATE OR REPLACE FUNCTION gin_extract_value_macaddr(macaddr, internal) +CREATE FUNCTION gin_extract_value_macaddr(macaddr, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_macaddr(macaddr, macaddr, int2, internal) +CREATE FUNCTION gin_compare_prefix_macaddr(macaddr, macaddr, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_macaddr(macaddr, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_macaddr(macaddr, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -425,17 +425,17 @@ AS FUNCTION 5 gin_compare_prefix_macaddr(macaddr,macaddr,int2, internal), STORAGE macaddr; -CREATE OR REPLACE FUNCTION gin_extract_value_inet(inet, internal) +CREATE FUNCTION gin_extract_value_inet(inet, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_inet(inet, inet, int2, internal) +CREATE FUNCTION gin_compare_prefix_inet(inet, inet, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_inet(inet, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_inet(inet, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -455,17 +455,17 @@ AS FUNCTION 5 gin_compare_prefix_inet(inet,inet,int2, internal), STORAGE inet; -CREATE OR REPLACE FUNCTION gin_extract_value_cidr(cidr, internal) +CREATE FUNCTION gin_extract_value_cidr(cidr, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_cidr(cidr, cidr, int2, internal) +CREATE FUNCTION gin_compare_prefix_cidr(cidr, cidr, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_cidr(cidr, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_cidr(cidr, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -485,17 +485,17 @@ AS FUNCTION 5 gin_compare_prefix_cidr(cidr,cidr,int2, internal), STORAGE cidr; -CREATE OR REPLACE FUNCTION gin_extract_value_text(text, internal) +CREATE FUNCTION gin_extract_value_text(text, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_text(text, text, int2, internal) +CREATE FUNCTION gin_compare_prefix_text(text, text, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_text(text, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_text(text, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -530,17 +530,17 @@ AS FUNCTION 5 gin_compare_prefix_text(text,text,int2, internal), STORAGE varchar; -CREATE OR REPLACE FUNCTION gin_extract_value_char("char", internal) +CREATE FUNCTION gin_extract_value_char("char", internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_char("char", "char", int2, internal) +CREATE FUNCTION gin_compare_prefix_char("char", "char", int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_char("char", internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_char("char", internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -560,17 +560,17 @@ AS FUNCTION 5 gin_compare_prefix_char("char","char",int2, internal), STORAGE "char"; -CREATE OR REPLACE FUNCTION gin_extract_value_bytea(bytea, internal) +CREATE FUNCTION gin_extract_value_bytea(bytea, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_bytea(bytea, bytea, int2, internal) +CREATE FUNCTION gin_compare_prefix_bytea(bytea, bytea, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_bytea(bytea, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_bytea(bytea, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -590,17 +590,17 @@ AS FUNCTION 5 gin_compare_prefix_bytea(bytea,bytea,int2, internal), STORAGE bytea; -CREATE OR REPLACE FUNCTION gin_extract_value_bit(bit, internal) +CREATE FUNCTION gin_extract_value_bit(bit, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_bit(bit, bit, int2, internal) +CREATE FUNCTION gin_compare_prefix_bit(bit, bit, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_bit(bit, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_bit(bit, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -620,17 +620,17 @@ AS FUNCTION 5 gin_compare_prefix_bit(bit,bit,int2, internal), STORAGE bit; -CREATE OR REPLACE FUNCTION gin_extract_value_varbit(varbit, internal) +CREATE FUNCTION gin_extract_value_varbit(varbit, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_varbit(varbit, varbit, int2, internal) +CREATE FUNCTION gin_compare_prefix_varbit(varbit, varbit, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_varbit(varbit, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_varbit(varbit, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -650,22 +650,22 @@ AS FUNCTION 5 gin_compare_prefix_varbit(varbit,varbit,int2, internal), STORAGE varbit; -CREATE OR REPLACE FUNCTION gin_extract_value_numeric(numeric, internal) +CREATE FUNCTION gin_extract_value_numeric(numeric, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_compare_prefix_numeric(numeric, numeric, int2, internal) +CREATE FUNCTION gin_compare_prefix_numeric(numeric, numeric, int2, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_extract_query_numeric(numeric, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_query_numeric(numeric, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION gin_numeric_cmp(numeric, numeric) +CREATE FUNCTION gin_numeric_cmp(numeric, numeric) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; diff --git a/contrib/btree_gist/btree_gist--1.0.sql b/contrib/btree_gist/btree_gist--1.0.sql index ab6c8c3936..f1866f25ed 100644 --- a/contrib/btree_gist/btree_gist--1.0.sql +++ b/contrib/btree_gist/btree_gist--1.0.sql @@ -1,11 +1,11 @@ /* contrib/btree_gist/btree_gist--1.0.sql */ -CREATE OR REPLACE FUNCTION gbtreekey4_in(cstring) +CREATE FUNCTION gbtreekey4_in(cstring) RETURNS gbtreekey4 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbtreekey4_out(gbtreekey4) +CREATE FUNCTION gbtreekey4_out(gbtreekey4) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; @@ -16,12 +16,12 @@ CREATE TYPE gbtreekey4 ( OUTPUT = gbtreekey4_out ); -CREATE OR REPLACE FUNCTION gbtreekey8_in(cstring) +CREATE FUNCTION gbtreekey8_in(cstring) RETURNS gbtreekey8 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbtreekey8_out(gbtreekey8) +CREATE FUNCTION gbtreekey8_out(gbtreekey8) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; @@ -32,12 +32,12 @@ CREATE TYPE gbtreekey8 ( OUTPUT = gbtreekey8_out ); -CREATE OR REPLACE FUNCTION gbtreekey16_in(cstring) +CREATE FUNCTION gbtreekey16_in(cstring) RETURNS gbtreekey16 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbtreekey16_out(gbtreekey16) +CREATE FUNCTION gbtreekey16_out(gbtreekey16) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; @@ -48,12 +48,12 @@ CREATE TYPE gbtreekey16 ( OUTPUT = gbtreekey16_out ); -CREATE OR REPLACE FUNCTION gbtreekey32_in(cstring) +CREATE FUNCTION gbtreekey32_in(cstring) RETURNS gbtreekey32 AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbtreekey32_out(gbtreekey32) +CREATE FUNCTION gbtreekey32_out(gbtreekey32) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; @@ -64,12 +64,12 @@ CREATE TYPE gbtreekey32 ( OUTPUT = gbtreekey32_out ); -CREATE OR REPLACE FUNCTION gbtreekey_var_in(cstring) +CREATE FUNCTION gbtreekey_var_in(cstring) RETURNS gbtreekey_var AS 'MODULE_PATHNAME', 'gbtreekey_in' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbtreekey_var_out(gbtreekey_var) +CREATE FUNCTION gbtreekey_var_out(gbtreekey_var) RETURNS cstring AS 'MODULE_PATHNAME', 'gbtreekey_out' LANGUAGE C IMMUTABLE STRICT; @@ -91,42 +91,42 @@ CREATE TYPE gbtreekey_var ( -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_oid_consistent(internal,oid,int2,oid,internal) +CREATE FUNCTION gbt_oid_consistent(internal,oid,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_oid_compress(internal) +CREATE FUNCTION gbt_oid_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_decompress(internal) +CREATE FUNCTION gbt_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_var_decompress(internal) +CREATE FUNCTION gbt_var_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_oid_penalty(internal,internal,internal) +CREATE FUNCTION gbt_oid_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_oid_picksplit(internal, internal) +CREATE FUNCTION gbt_oid_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_oid_union(bytea, internal) +CREATE FUNCTION gbt_oid_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_oid_same(internal, internal, internal) +CREATE FUNCTION gbt_oid_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -159,32 +159,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_int2_consistent(internal,int2,int2,oid,internal) +CREATE FUNCTION gbt_int2_consistent(internal,int2,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int2_compress(internal) +CREATE FUNCTION gbt_int2_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int2_penalty(internal,internal,internal) +CREATE FUNCTION gbt_int2_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int2_picksplit(internal, internal) +CREATE FUNCTION gbt_int2_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int2_union(bytea, internal) +CREATE FUNCTION gbt_int2_union(bytea, internal) RETURNS gbtreekey4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int2_same(internal, internal, internal) +CREATE FUNCTION gbt_int2_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -216,32 +216,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_int4_consistent(internal,int4,int2,oid,internal) +CREATE FUNCTION gbt_int4_consistent(internal,int4,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int4_compress(internal) +CREATE FUNCTION gbt_int4_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int4_penalty(internal,internal,internal) +CREATE FUNCTION gbt_int4_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int4_picksplit(internal, internal) +CREATE FUNCTION gbt_int4_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int4_union(bytea, internal) +CREATE FUNCTION gbt_int4_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int4_same(internal, internal, internal) +CREATE FUNCTION gbt_int4_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -273,32 +273,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_int8_consistent(internal,int8,int2,oid,internal) +CREATE FUNCTION gbt_int8_consistent(internal,int8,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int8_compress(internal) +CREATE FUNCTION gbt_int8_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int8_penalty(internal,internal,internal) +CREATE FUNCTION gbt_int8_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int8_picksplit(internal, internal) +CREATE FUNCTION gbt_int8_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int8_union(bytea, internal) +CREATE FUNCTION gbt_int8_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_int8_same(internal, internal, internal) +CREATE FUNCTION gbt_int8_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -331,32 +331,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_float4_consistent(internal,float4,int2,oid,internal) +CREATE FUNCTION gbt_float4_consistent(internal,float4,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float4_compress(internal) +CREATE FUNCTION gbt_float4_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float4_penalty(internal,internal,internal) +CREATE FUNCTION gbt_float4_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float4_picksplit(internal, internal) +CREATE FUNCTION gbt_float4_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float4_union(bytea, internal) +CREATE FUNCTION gbt_float4_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float4_same(internal, internal, internal) +CREATE FUNCTION gbt_float4_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -391,32 +391,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_float8_consistent(internal,float8,int2,oid,internal) +CREATE FUNCTION gbt_float8_consistent(internal,float8,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float8_compress(internal) +CREATE FUNCTION gbt_float8_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float8_penalty(internal,internal,internal) +CREATE FUNCTION gbt_float8_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float8_picksplit(internal, internal) +CREATE FUNCTION gbt_float8_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float8_union(bytea, internal) +CREATE FUNCTION gbt_float8_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_float8_same(internal, internal, internal) +CREATE FUNCTION gbt_float8_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -449,42 +449,42 @@ AS -- -- -CREATE OR REPLACE FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal) +CREATE FUNCTION gbt_ts_consistent(internal,timestamp,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal) +CREATE FUNCTION gbt_tstz_consistent(internal,timestamptz,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_ts_compress(internal) +CREATE FUNCTION gbt_ts_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_tstz_compress(internal) +CREATE FUNCTION gbt_tstz_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_ts_penalty(internal,internal,internal) +CREATE FUNCTION gbt_ts_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_ts_picksplit(internal, internal) +CREATE FUNCTION gbt_ts_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_ts_union(bytea, internal) +CREATE FUNCTION gbt_ts_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_ts_same(internal, internal, internal) +CREATE FUNCTION gbt_ts_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -537,42 +537,42 @@ AS -- -- -CREATE OR REPLACE FUNCTION gbt_time_consistent(internal,time,int2,oid,internal) +CREATE FUNCTION gbt_time_consistent(internal,time,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_timetz_consistent(internal,timetz,int2,oid,internal) +CREATE FUNCTION gbt_timetz_consistent(internal,timetz,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_time_compress(internal) +CREATE FUNCTION gbt_time_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_timetz_compress(internal) +CREATE FUNCTION gbt_timetz_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_time_penalty(internal,internal,internal) +CREATE FUNCTION gbt_time_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_time_picksplit(internal, internal) +CREATE FUNCTION gbt_time_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_time_union(bytea, internal) +CREATE FUNCTION gbt_time_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_time_same(internal, internal, internal) +CREATE FUNCTION gbt_time_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -623,32 +623,32 @@ AS -- -- -CREATE OR REPLACE FUNCTION gbt_date_consistent(internal,date,int2,oid,internal) +CREATE FUNCTION gbt_date_consistent(internal,date,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_date_compress(internal) +CREATE FUNCTION gbt_date_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_date_penalty(internal,internal,internal) +CREATE FUNCTION gbt_date_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_date_picksplit(internal, internal) +CREATE FUNCTION gbt_date_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_date_union(bytea, internal) +CREATE FUNCTION gbt_date_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_date_same(internal, internal, internal) +CREATE FUNCTION gbt_date_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -681,37 +681,37 @@ AS -- -- -CREATE OR REPLACE FUNCTION gbt_intv_consistent(internal,interval,int2,oid,internal) +CREATE FUNCTION gbt_intv_consistent(internal,interval,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_compress(internal) +CREATE FUNCTION gbt_intv_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_decompress(internal) +CREATE FUNCTION gbt_intv_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_penalty(internal,internal,internal) +CREATE FUNCTION gbt_intv_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_picksplit(internal, internal) +CREATE FUNCTION gbt_intv_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_union(bytea, internal) +CREATE FUNCTION gbt_intv_union(bytea, internal) RETURNS gbtreekey32 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_intv_same(internal, internal, internal) +CREATE FUNCTION gbt_intv_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -743,32 +743,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_cash_consistent(internal,money,int2,oid,internal) +CREATE FUNCTION gbt_cash_consistent(internal,money,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_cash_compress(internal) +CREATE FUNCTION gbt_cash_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_cash_penalty(internal,internal,internal) +CREATE FUNCTION gbt_cash_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_cash_picksplit(internal, internal) +CREATE FUNCTION gbt_cash_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_cash_union(bytea, internal) +CREATE FUNCTION gbt_cash_union(bytea, internal) RETURNS gbtreekey8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_cash_same(internal, internal, internal) +CREATE FUNCTION gbt_cash_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -800,32 +800,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_macad_consistent(internal,macaddr,int2,oid,internal) +CREATE FUNCTION gbt_macad_consistent(internal,macaddr,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_macad_compress(internal) +CREATE FUNCTION gbt_macad_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_macad_penalty(internal,internal,internal) +CREATE FUNCTION gbt_macad_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_macad_picksplit(internal, internal) +CREATE FUNCTION gbt_macad_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_macad_union(bytea, internal) +CREATE FUNCTION gbt_macad_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_macad_same(internal, internal, internal) +CREATE FUNCTION gbt_macad_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -859,42 +859,42 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_text_consistent(internal,text,int2,oid,internal) +CREATE FUNCTION gbt_text_consistent(internal,text,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2,oid,internal) +CREATE FUNCTION gbt_bpchar_consistent(internal,bpchar,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_text_compress(internal) +CREATE FUNCTION gbt_text_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bpchar_compress(internal) +CREATE FUNCTION gbt_bpchar_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_text_penalty(internal,internal,internal) +CREATE FUNCTION gbt_text_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_text_picksplit(internal, internal) +CREATE FUNCTION gbt_text_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_text_union(bytea, internal) +CREATE FUNCTION gbt_text_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_text_same(internal, internal, internal) +CREATE FUNCTION gbt_text_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -947,32 +947,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_bytea_consistent(internal,bytea,int2,oid,internal) +CREATE FUNCTION gbt_bytea_consistent(internal,bytea,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bytea_compress(internal) +CREATE FUNCTION gbt_bytea_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bytea_penalty(internal,internal,internal) +CREATE FUNCTION gbt_bytea_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bytea_picksplit(internal, internal) +CREATE FUNCTION gbt_bytea_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bytea_union(bytea, internal) +CREATE FUNCTION gbt_bytea_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bytea_same(internal, internal, internal) +CREATE FUNCTION gbt_bytea_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -1005,32 +1005,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_numeric_consistent(internal,numeric,int2,oid,internal) +CREATE FUNCTION gbt_numeric_consistent(internal,numeric,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_numeric_compress(internal) +CREATE FUNCTION gbt_numeric_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_numeric_penalty(internal,internal,internal) +CREATE FUNCTION gbt_numeric_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_numeric_picksplit(internal, internal) +CREATE FUNCTION gbt_numeric_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_numeric_union(bytea, internal) +CREATE FUNCTION gbt_numeric_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_numeric_same(internal, internal, internal) +CREATE FUNCTION gbt_numeric_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -1061,32 +1061,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_bit_consistent(internal,bit,int2,oid,internal) +CREATE FUNCTION gbt_bit_consistent(internal,bit,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bit_compress(internal) +CREATE FUNCTION gbt_bit_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bit_penalty(internal,internal,internal) +CREATE FUNCTION gbt_bit_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bit_picksplit(internal, internal) +CREATE FUNCTION gbt_bit_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bit_union(bytea, internal) +CREATE FUNCTION gbt_bit_union(bytea, internal) RETURNS gbtreekey_var AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_bit_same(internal, internal, internal) +CREATE FUNCTION gbt_bit_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -1140,32 +1140,32 @@ AS -- -- -- define the GiST support methods -CREATE OR REPLACE FUNCTION gbt_inet_consistent(internal,inet,int2,oid,internal) +CREATE FUNCTION gbt_inet_consistent(internal,inet,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_inet_compress(internal) +CREATE FUNCTION gbt_inet_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_inet_penalty(internal,internal,internal) +CREATE FUNCTION gbt_inet_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_inet_picksplit(internal, internal) +CREATE FUNCTION gbt_inet_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_inet_union(bytea, internal) +CREATE FUNCTION gbt_inet_union(bytea, internal) RETURNS gbtreekey16 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gbt_inet_same(internal, internal, internal) +CREATE FUNCTION gbt_inet_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/chkpass/chkpass--1.0.sql b/contrib/chkpass/chkpass--1.0.sql index aad74683f7..755fee3bc3 100644 --- a/contrib/chkpass/chkpass--1.0.sql +++ b/contrib/chkpass/chkpass--1.0.sql @@ -4,12 +4,12 @@ -- Input and output functions and the type itself: -- -CREATE OR REPLACE FUNCTION chkpass_in(cstring) +CREATE FUNCTION chkpass_in(cstring) RETURNS chkpass AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION chkpass_out(chkpass) +CREATE FUNCTION chkpass_out(chkpass) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -20,7 +20,7 @@ CREATE TYPE chkpass ( output = chkpass_out ); -CREATE OR REPLACE FUNCTION raw(chkpass) +CREATE FUNCTION raw(chkpass) RETURNS text AS 'MODULE_PATHNAME', 'chkpass_rout' LANGUAGE C STRICT; @@ -29,12 +29,12 @@ CREATE OR REPLACE FUNCTION raw(chkpass) -- The various boolean tests: -- -CREATE OR REPLACE FUNCTION eq(chkpass, text) +CREATE FUNCTION eq(chkpass, text) RETURNS bool AS 'MODULE_PATHNAME', 'chkpass_eq' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ne(chkpass, text) +CREATE FUNCTION ne(chkpass, text) RETURNS bool AS 'MODULE_PATHNAME', 'chkpass_ne' LANGUAGE C STRICT; diff --git a/contrib/citext/citext--1.0.sql b/contrib/citext/citext--1.0.sql index 13cff8134a..2760f7e08d 100644 --- a/contrib/citext/citext--1.0.sql +++ b/contrib/citext/citext--1.0.sql @@ -16,22 +16,22 @@ CREATE TYPE citext; -- -- Input and output functions. -- -CREATE OR REPLACE FUNCTION citextin(cstring) +CREATE FUNCTION citextin(cstring) RETURNS citext AS 'textin' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citextout(citext) +CREATE FUNCTION citextout(citext) RETURNS cstring AS 'textout' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citextrecv(internal) +CREATE FUNCTION citextrecv(internal) RETURNS citext AS 'textrecv' LANGUAGE internal STABLE STRICT; -CREATE OR REPLACE FUNCTION citextsend(citext) +CREATE FUNCTION citextsend(citext) RETURNS bytea AS 'textsend' LANGUAGE internal STABLE STRICT; @@ -58,17 +58,17 @@ CREATE TYPE citext ( -- automatically kick in. -- -CREATE OR REPLACE FUNCTION citext(bpchar) +CREATE FUNCTION citext(bpchar) RETURNS citext AS 'rtrim1' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext(boolean) +CREATE FUNCTION citext(boolean) RETURNS citext AS 'booltext' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext(inet) +CREATE FUNCTION citext(inet) RETURNS citext AS 'network_show' LANGUAGE internal IMMUTABLE STRICT; @@ -90,32 +90,32 @@ CREATE CAST (inet AS citext) WITH FUNCTION citext(inet) AS ASSIGNMENT; -- Operator Functions. -- -CREATE OR REPLACE FUNCTION citext_eq( citext, citext ) +CREATE FUNCTION citext_eq( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_ne( citext, citext ) +CREATE FUNCTION citext_ne( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_lt( citext, citext ) +CREATE FUNCTION citext_lt( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_le( citext, citext ) +CREATE FUNCTION citext_le( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_gt( citext, citext ) +CREATE FUNCTION citext_gt( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_ge( citext, citext ) +CREATE FUNCTION citext_ge( citext, citext ) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -190,12 +190,12 @@ CREATE OPERATOR > ( -- Support functions for indexing. -- -CREATE OR REPLACE FUNCTION citext_cmp(citext, citext) +CREATE FUNCTION citext_cmp(citext, citext) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION citext_hash(citext) +CREATE FUNCTION citext_hash(citext) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -226,12 +226,12 @@ DEFAULT FOR TYPE citext USING hash AS -- Aggregates. -- -CREATE OR REPLACE FUNCTION citext_smaller(citext, citext) +CREATE FUNCTION citext_smaller(citext, citext) RETURNS citext AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION citext_larger(citext, citext) +CREATE FUNCTION citext_larger(citext, citext) RETURNS citext AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; @@ -252,19 +252,19 @@ CREATE AGGREGATE max(citext) ( -- CITEXT pattern matching. -- -CREATE OR REPLACE FUNCTION texticlike(citext, citext) +CREATE FUNCTION texticlike(citext, citext) RETURNS bool AS 'texticlike' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticnlike(citext, citext) +CREATE FUNCTION texticnlike(citext, citext) RETURNS bool AS 'texticnlike' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticregexeq(citext, citext) +CREATE FUNCTION texticregexeq(citext, citext) RETURNS bool AS 'texticregexeq' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticregexne(citext, citext) +CREATE FUNCTION texticregexne(citext, citext) RETURNS bool AS 'texticregexne' LANGUAGE internal IMMUTABLE STRICT; @@ -344,19 +344,19 @@ CREATE OPERATOR !~~* ( -- Matching citext to text. -- -CREATE OR REPLACE FUNCTION texticlike(citext, text) +CREATE FUNCTION texticlike(citext, text) RETURNS bool AS 'texticlike' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticnlike(citext, text) +CREATE FUNCTION texticnlike(citext, text) RETURNS bool AS 'texticnlike' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticregexeq(citext, text) +CREATE FUNCTION texticregexeq(citext, text) RETURNS bool AS 'texticregexeq' LANGUAGE internal IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION texticregexne(citext, text) +CREATE FUNCTION texticregexne(citext, text) RETURNS bool AS 'texticregexne' LANGUAGE internal IMMUTABLE STRICT; @@ -437,50 +437,50 @@ CREATE OPERATOR !~~* ( -- XXX TODO Ideally these would be implemented in C. -- -CREATE OR REPLACE FUNCTION regexp_matches( citext, citext ) RETURNS TEXT[] AS $$ +CREATE FUNCTION regexp_matches( citext, citext ) RETURNS TEXT[] AS $$ SELECT pg_catalog.regexp_matches( $1::pg_catalog.text, $2::pg_catalog.text, 'i' ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_matches( citext, citext, text ) RETURNS TEXT[] AS $$ +CREATE FUNCTION regexp_matches( citext, citext, text ) RETURNS TEXT[] AS $$ SELECT pg_catalog.regexp_matches( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_replace( citext, citext, text ) returns TEXT AS $$ +CREATE FUNCTION regexp_replace( citext, citext, text ) returns TEXT AS $$ SELECT pg_catalog.regexp_replace( $1::pg_catalog.text, $2::pg_catalog.text, $3, 'i'); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_replace( citext, citext, text, text ) returns TEXT AS $$ +CREATE FUNCTION regexp_replace( citext, citext, text, text ) returns TEXT AS $$ SELECT pg_catalog.regexp_replace( $1::pg_catalog.text, $2::pg_catalog.text, $3, CASE WHEN pg_catalog.strpos($4, 'c') = 0 THEN $4 || 'i' ELSE $4 END); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_split_to_array( citext, citext ) RETURNS TEXT[] AS $$ +CREATE FUNCTION regexp_split_to_array( citext, citext ) RETURNS TEXT[] AS $$ SELECT pg_catalog.regexp_split_to_array( $1::pg_catalog.text, $2::pg_catalog.text, 'i' ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_split_to_array( citext, citext, text ) RETURNS TEXT[] AS $$ +CREATE FUNCTION regexp_split_to_array( citext, citext, text ) RETURNS TEXT[] AS $$ SELECT pg_catalog.regexp_split_to_array( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_split_to_table( citext, citext ) RETURNS SETOF TEXT AS $$ +CREATE FUNCTION regexp_split_to_table( citext, citext ) RETURNS SETOF TEXT AS $$ SELECT pg_catalog.regexp_split_to_table( $1::pg_catalog.text, $2::pg_catalog.text, 'i' ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION regexp_split_to_table( citext, citext, text ) RETURNS SETOF TEXT AS $$ +CREATE FUNCTION regexp_split_to_table( citext, citext, text ) RETURNS SETOF TEXT AS $$ SELECT pg_catalog.regexp_split_to_table( $1::pg_catalog.text, $2::pg_catalog.text, CASE WHEN pg_catalog.strpos($3, 'c') = 0 THEN $3 || 'i' ELSE $3 END ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION strpos( citext, citext ) RETURNS INT AS $$ +CREATE FUNCTION strpos( citext, citext ) RETURNS INT AS $$ SELECT pg_catalog.strpos( pg_catalog.lower( $1::pg_catalog.text ), pg_catalog.lower( $2::pg_catalog.text ) ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION replace( citext, citext, citext ) RETURNS TEXT AS $$ +CREATE FUNCTION replace( citext, citext, citext ) RETURNS TEXT AS $$ SELECT pg_catalog.regexp_replace( $1::pg_catalog.text, pg_catalog.regexp_replace($2::pg_catalog.text, '([^a-zA-Z_0-9])', E'\\\\\\1', 'g'), $3::pg_catalog.text, 'gi' ); $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION split_part( citext, citext, int ) RETURNS TEXT AS $$ +CREATE FUNCTION split_part( citext, citext, int ) RETURNS TEXT AS $$ SELECT (pg_catalog.regexp_split_to_array( $1::pg_catalog.text, pg_catalog.regexp_replace($2::pg_catalog.text, '([^a-zA-Z_0-9])', E'\\\\\\1', 'g'), 'i'))[$3]; $$ LANGUAGE SQL IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION translate( citext, citext, text ) RETURNS TEXT AS $$ +CREATE FUNCTION translate( citext, citext, text ) RETURNS TEXT AS $$ SELECT pg_catalog.translate( pg_catalog.translate( $1::pg_catalog.text, pg_catalog.lower($2::pg_catalog.text), $3), pg_catalog.upper($2::pg_catalog.text), $3); $$ LANGUAGE SQL IMMUTABLE STRICT; diff --git a/contrib/cube/cube--1.0.sql b/contrib/cube/cube--1.0.sql index 18d69a5488..ee9febe005 100644 --- a/contrib/cube/cube--1.0.sql +++ b/contrib/cube/cube--1.0.sql @@ -2,20 +2,20 @@ -- Create the user-defined type for N-dimensional boxes -CREATE OR REPLACE FUNCTION cube_in(cstring) +CREATE FUNCTION cube_in(cstring) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(float8[], float8[]) RETURNS cube +CREATE FUNCTION cube(float8[], float8[]) RETURNS cube AS 'MODULE_PATHNAME', 'cube_a_f8_f8' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(float8[]) RETURNS cube +CREATE FUNCTION cube(float8[]) RETURNS cube AS 'MODULE_PATHNAME', 'cube_a_f8' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube_out(cube) +CREATE FUNCTION cube_out(cube) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -35,70 +35,70 @@ COMMENT ON TYPE cube IS 'multi-dimensional cube ''(FLOAT-1, FLOAT-2, ..., FLOAT- -- Comparison methods -CREATE OR REPLACE FUNCTION cube_eq(cube, cube) +CREATE FUNCTION cube_eq(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_eq(cube, cube) IS 'same as'; -CREATE OR REPLACE FUNCTION cube_ne(cube, cube) +CREATE FUNCTION cube_ne(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_ne(cube, cube) IS 'different'; -CREATE OR REPLACE FUNCTION cube_lt(cube, cube) +CREATE FUNCTION cube_lt(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_lt(cube, cube) IS 'lower than'; -CREATE OR REPLACE FUNCTION cube_gt(cube, cube) +CREATE FUNCTION cube_gt(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_gt(cube, cube) IS 'greater than'; -CREATE OR REPLACE FUNCTION cube_le(cube, cube) +CREATE FUNCTION cube_le(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_le(cube, cube) IS 'lower than or equal to'; -CREATE OR REPLACE FUNCTION cube_ge(cube, cube) +CREATE FUNCTION cube_ge(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_ge(cube, cube) IS 'greater than or equal to'; -CREATE OR REPLACE FUNCTION cube_cmp(cube, cube) +CREATE FUNCTION cube_cmp(cube, cube) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_cmp(cube, cube) IS 'btree comparison function'; -CREATE OR REPLACE FUNCTION cube_contains(cube, cube) +CREATE FUNCTION cube_contains(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_contains(cube, cube) IS 'contains'; -CREATE OR REPLACE FUNCTION cube_contained(cube, cube) +CREATE FUNCTION cube_contained(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; COMMENT ON FUNCTION cube_contained(cube, cube) IS 'contained in'; -CREATE OR REPLACE FUNCTION cube_overlap(cube, cube) +CREATE FUNCTION cube_overlap(cube, cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -107,17 +107,17 @@ COMMENT ON FUNCTION cube_overlap(cube, cube) IS 'overlaps'; -- support routines for indexing -CREATE OR REPLACE FUNCTION cube_union(cube, cube) +CREATE FUNCTION cube_union(cube, cube) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube_inter(cube, cube) +CREATE FUNCTION cube_inter(cube, cube) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube_size(cube) +CREATE FUNCTION cube_size(cube) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -125,61 +125,61 @@ LANGUAGE C IMMUTABLE STRICT; -- Misc N-dimensional functions -CREATE OR REPLACE FUNCTION cube_subset(cube, int4[]) +CREATE FUNCTION cube_subset(cube, int4[]) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- proximity routines -CREATE OR REPLACE FUNCTION cube_distance(cube, cube) +CREATE FUNCTION cube_distance(cube, cube) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Extracting elements functions -CREATE OR REPLACE FUNCTION cube_dim(cube) +CREATE FUNCTION cube_dim(cube) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube_ll_coord(cube, int4) +CREATE FUNCTION cube_ll_coord(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube_ur_coord(cube, int4) +CREATE FUNCTION cube_ur_coord(cube, int4) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(float8) RETURNS cube +CREATE FUNCTION cube(float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_f8' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(float8, float8) RETURNS cube +CREATE FUNCTION cube(float8, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_f8_f8' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(cube, float8) RETURNS cube +CREATE FUNCTION cube(cube, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_c_f8' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION cube(cube, float8, float8) RETURNS cube +CREATE FUNCTION cube(cube, float8, float8) RETURNS cube AS 'MODULE_PATHNAME', 'cube_c_f8_f8' LANGUAGE C IMMUTABLE STRICT; -- Test if cube is also a point -CREATE OR REPLACE FUNCTION cube_is_point(cube) +CREATE FUNCTION cube_is_point(cube) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -- Increasing the size of a cube by a radius in at least n dimensions -CREATE OR REPLACE FUNCTION cube_enlarge(cube, float8, int4) +CREATE FUNCTION cube_enlarge(cube, float8, int4) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -258,37 +258,37 @@ CREATE OPERATOR ~ ( -- define the GiST support methods -CREATE OR REPLACE FUNCTION g_cube_consistent(internal,cube,int,oid,internal) +CREATE FUNCTION g_cube_consistent(internal,cube,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_compress(internal) +CREATE FUNCTION g_cube_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_decompress(internal) +CREATE FUNCTION g_cube_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_penalty(internal,internal,internal) +CREATE FUNCTION g_cube_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_picksplit(internal, internal) +CREATE FUNCTION g_cube_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_union(internal, internal) +CREATE FUNCTION g_cube_union(internal, internal) RETURNS cube AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_cube_same(cube, cube, internal) +CREATE FUNCTION g_cube_same(cube, cube, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/dblink/dblink--1.0.sql b/contrib/dblink/dblink--1.0.sql index e9137828f1..4ac5514461 100644 --- a/contrib/dblink/dblink--1.0.sql +++ b/contrib/dblink/dblink--1.0.sql @@ -2,12 +2,12 @@ -- dblink_connect now restricts non-superusers to password -- authenticated connections -CREATE OR REPLACE FUNCTION dblink_connect (text) +CREATE FUNCTION dblink_connect (text) RETURNS text AS 'MODULE_PATHNAME','dblink_connect' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_connect (text, text) +CREATE FUNCTION dblink_connect (text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_connect' LANGUAGE C STRICT; @@ -15,12 +15,12 @@ LANGUAGE C STRICT; -- dblink_connect_u allows non-superusers to use -- non-password authenticated connections, but initially -- privileges are revoked from public -CREATE OR REPLACE FUNCTION dblink_connect_u (text) +CREATE FUNCTION dblink_connect_u (text) RETURNS text AS 'MODULE_PATHNAME','dblink_connect' LANGUAGE C STRICT SECURITY DEFINER; -CREATE OR REPLACE FUNCTION dblink_connect_u (text, text) +CREATE FUNCTION dblink_connect_u (text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_connect' LANGUAGE C STRICT SECURITY DEFINER; @@ -28,179 +28,179 @@ LANGUAGE C STRICT SECURITY DEFINER; REVOKE ALL ON FUNCTION dblink_connect_u (text) FROM public; REVOKE ALL ON FUNCTION dblink_connect_u (text, text) FROM public; -CREATE OR REPLACE FUNCTION dblink_disconnect () +CREATE FUNCTION dblink_disconnect () RETURNS text AS 'MODULE_PATHNAME','dblink_disconnect' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_disconnect (text) +CREATE FUNCTION dblink_disconnect (text) RETURNS text AS 'MODULE_PATHNAME','dblink_disconnect' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_open (text, text) +CREATE FUNCTION dblink_open (text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_open' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_open (text, text, boolean) +CREATE FUNCTION dblink_open (text, text, boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_open' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_open (text, text, text) +CREATE FUNCTION dblink_open (text, text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_open' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_open (text, text, text, boolean) +CREATE FUNCTION dblink_open (text, text, text, boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_open' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_fetch (text, int) +CREATE FUNCTION dblink_fetch (text, int) RETURNS setof record AS 'MODULE_PATHNAME','dblink_fetch' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_fetch (text, int, boolean) +CREATE FUNCTION dblink_fetch (text, int, boolean) RETURNS setof record AS 'MODULE_PATHNAME','dblink_fetch' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_fetch (text, text, int) +CREATE FUNCTION dblink_fetch (text, text, int) RETURNS setof record AS 'MODULE_PATHNAME','dblink_fetch' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_fetch (text, text, int, boolean) +CREATE FUNCTION dblink_fetch (text, text, int, boolean) RETURNS setof record AS 'MODULE_PATHNAME','dblink_fetch' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_close (text) +CREATE FUNCTION dblink_close (text) RETURNS text AS 'MODULE_PATHNAME','dblink_close' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_close (text, boolean) +CREATE FUNCTION dblink_close (text, boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_close' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_close (text, text) +CREATE FUNCTION dblink_close (text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_close' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_close (text, text, boolean) +CREATE FUNCTION dblink_close (text, text, boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_close' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink (text, text) +CREATE FUNCTION dblink (text, text) RETURNS setof record AS 'MODULE_PATHNAME','dblink_record' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink (text, text, boolean) +CREATE FUNCTION dblink (text, text, boolean) RETURNS setof record AS 'MODULE_PATHNAME','dblink_record' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink (text) +CREATE FUNCTION dblink (text) RETURNS setof record AS 'MODULE_PATHNAME','dblink_record' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink (text, boolean) +CREATE FUNCTION dblink (text, boolean) RETURNS setof record AS 'MODULE_PATHNAME','dblink_record' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_exec (text, text) +CREATE FUNCTION dblink_exec (text, text) RETURNS text AS 'MODULE_PATHNAME','dblink_exec' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_exec (text, text, boolean) +CREATE FUNCTION dblink_exec (text, text, boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_exec' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_exec (text) +CREATE FUNCTION dblink_exec (text) RETURNS text AS 'MODULE_PATHNAME','dblink_exec' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_exec (text,boolean) +CREATE FUNCTION dblink_exec (text,boolean) RETURNS text AS 'MODULE_PATHNAME','dblink_exec' LANGUAGE C STRICT; CREATE TYPE dblink_pkey_results AS (position int, colname text); -CREATE OR REPLACE FUNCTION dblink_get_pkey (text) +CREATE FUNCTION dblink_get_pkey (text) RETURNS setof dblink_pkey_results AS 'MODULE_PATHNAME','dblink_get_pkey' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_build_sql_insert (text, int2vector, int, _text, _text) +CREATE FUNCTION dblink_build_sql_insert (text, int2vector, int, _text, _text) RETURNS text AS 'MODULE_PATHNAME','dblink_build_sql_insert' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_build_sql_delete (text, int2vector, int, _text) +CREATE FUNCTION dblink_build_sql_delete (text, int2vector, int, _text) RETURNS text AS 'MODULE_PATHNAME','dblink_build_sql_delete' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_build_sql_update (text, int2vector, int, _text, _text) +CREATE FUNCTION dblink_build_sql_update (text, int2vector, int, _text, _text) RETURNS text AS 'MODULE_PATHNAME','dblink_build_sql_update' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_current_query () +CREATE FUNCTION dblink_current_query () RETURNS text AS 'MODULE_PATHNAME','dblink_current_query' LANGUAGE C; -CREATE OR REPLACE FUNCTION dblink_send_query(text, text) +CREATE FUNCTION dblink_send_query(text, text) RETURNS int4 AS 'MODULE_PATHNAME', 'dblink_send_query' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_is_busy(text) +CREATE FUNCTION dblink_is_busy(text) RETURNS int4 AS 'MODULE_PATHNAME', 'dblink_is_busy' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_get_result(text) +CREATE FUNCTION dblink_get_result(text) RETURNS SETOF record AS 'MODULE_PATHNAME', 'dblink_get_result' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_get_result(text, bool) +CREATE FUNCTION dblink_get_result(text, bool) RETURNS SETOF record AS 'MODULE_PATHNAME', 'dblink_get_result' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_get_connections() +CREATE FUNCTION dblink_get_connections() RETURNS text[] AS 'MODULE_PATHNAME', 'dblink_get_connections' LANGUAGE C; -CREATE OR REPLACE FUNCTION dblink_cancel_query(text) +CREATE FUNCTION dblink_cancel_query(text) RETURNS text AS 'MODULE_PATHNAME', 'dblink_cancel_query' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_error_message(text) +CREATE FUNCTION dblink_error_message(text) RETURNS text AS 'MODULE_PATHNAME', 'dblink_error_message' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_get_notify( +CREATE FUNCTION dblink_get_notify( OUT notify_name TEXT, OUT be_pid INT4, OUT extra TEXT @@ -209,7 +209,7 @@ RETURNS setof record AS 'MODULE_PATHNAME', 'dblink_get_notify' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dblink_get_notify( +CREATE FUNCTION dblink_get_notify( conname TEXT, OUT notify_name TEXT, OUT be_pid INT4, diff --git a/contrib/dict_int/dict_int--1.0.sql b/contrib/dict_int/dict_int--1.0.sql index a0e2b9af64..585a56552d 100644 --- a/contrib/dict_int/dict_int--1.0.sql +++ b/contrib/dict_int/dict_int--1.0.sql @@ -1,11 +1,11 @@ /* contrib/dict_int/dict_int--1.0.sql */ -CREATE OR REPLACE FUNCTION dintdict_init(internal) +CREATE FUNCTION dintdict_init(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dintdict_lexize(internal, internal, internal, internal) +CREATE FUNCTION dintdict_lexize(internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; diff --git a/contrib/dict_xsyn/dict_xsyn--1.0.sql b/contrib/dict_xsyn/dict_xsyn--1.0.sql index 0b6a21730f..30eaff4db5 100644 --- a/contrib/dict_xsyn/dict_xsyn--1.0.sql +++ b/contrib/dict_xsyn/dict_xsyn--1.0.sql @@ -1,11 +1,11 @@ /* contrib/dict_xsyn/dict_xsyn--1.0.sql */ -CREATE OR REPLACE FUNCTION dxsyn_init(internal) +CREATE FUNCTION dxsyn_init(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION dxsyn_lexize(internal, internal, internal, internal) +CREATE FUNCTION dxsyn_lexize(internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; diff --git a/contrib/earthdistance/earthdistance--1.0.sql b/contrib/earthdistance/earthdistance--1.0.sql index 0a2af648de..71e4025f6f 100644 --- a/contrib/earthdistance/earthdistance--1.0.sql +++ b/contrib/earthdistance/earthdistance--1.0.sql @@ -4,7 +4,7 @@ -- place you need to change things for the cube base distance functions -- in order to use different units (or a better value for the Earth's radius). -CREATE OR REPLACE FUNCTION earth() RETURNS float8 +CREATE FUNCTION earth() RETURNS float8 LANGUAGE SQL IMMUTABLE AS 'SELECT ''6378168''::float8'; @@ -13,7 +13,7 @@ AS 'SELECT ''6378168''::float8'; -- uncomment the one below. Note that doing this will break the regression -- tests. -- --- CREATE OR REPLACE FUNCTION earth() RETURNS float8 +-- CREATE FUNCTION earth() RETURNS float8 -- LANGUAGE SQL IMMUTABLE -- AS 'SELECT 180/pi()'; @@ -30,43 +30,43 @@ CREATE DOMAIN earth AS cube CONSTRAINT on_surface check(abs(cube_distance(value, '(0)'::cube) / earth() - 1) < '10e-7'::float8); -CREATE OR REPLACE FUNCTION sec_to_gc(float8) +CREATE FUNCTION sec_to_gc(float8) RETURNS float8 LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/(2*earth()) > 1 THEN pi()*earth() ELSE 2*earth()*asin($1/(2*earth())) END'; -CREATE OR REPLACE FUNCTION gc_to_sec(float8) +CREATE FUNCTION gc_to_sec(float8) RETURNS float8 LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT CASE WHEN $1 < 0 THEN 0::float8 WHEN $1/earth() > pi() THEN 2*earth() ELSE 2*earth()*sin($1/(2*earth())) END'; -CREATE OR REPLACE FUNCTION ll_to_earth(float8, float8) +CREATE FUNCTION ll_to_earth(float8, float8) RETURNS earth LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT cube(cube(cube(earth()*cos(radians($1))*cos(radians($2))),earth()*cos(radians($1))*sin(radians($2))),earth()*sin(radians($1)))::earth'; -CREATE OR REPLACE FUNCTION latitude(earth) +CREATE FUNCTION latitude(earth) RETURNS float8 LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT CASE WHEN cube_ll_coord($1, 3)/earth() < -1 THEN -90::float8 WHEN cube_ll_coord($1, 3)/earth() > 1 THEN 90::float8 ELSE degrees(asin(cube_ll_coord($1, 3)/earth())) END'; -CREATE OR REPLACE FUNCTION longitude(earth) +CREATE FUNCTION longitude(earth) RETURNS float8 LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT degrees(atan2(cube_ll_coord($1, 2), cube_ll_coord($1, 1)))'; -CREATE OR REPLACE FUNCTION earth_distance(earth, earth) +CREATE FUNCTION earth_distance(earth, earth) RETURNS float8 LANGUAGE SQL IMMUTABLE STRICT AS 'SELECT sec_to_gc(cube_distance($1, $2))'; -CREATE OR REPLACE FUNCTION earth_box(earth, float8) +CREATE FUNCTION earth_box(earth, float8) RETURNS cube LANGUAGE SQL IMMUTABLE STRICT @@ -74,7 +74,7 @@ AS 'SELECT cube_enlarge($1, gc_to_sec($2), 3)'; --------------- geo_distance -CREATE OR REPLACE FUNCTION geo_distance (point, point) +CREATE FUNCTION geo_distance (point, point) RETURNS float8 LANGUAGE C IMMUTABLE STRICT AS 'MODULE_PATHNAME'; diff --git a/contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql b/contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql index 1d27f5c3dd..d9b8987adf 100644 --- a/contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql +++ b/contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql @@ -1,41 +1,41 @@ /* contrib/fuzzystrmatch/fuzzystrmatch--1.0.sql */ -CREATE OR REPLACE FUNCTION levenshtein (text,text) RETURNS int +CREATE FUNCTION levenshtein (text,text) RETURNS int AS 'MODULE_PATHNAME','levenshtein' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION levenshtein (text,text,int,int,int) RETURNS int +CREATE FUNCTION levenshtein (text,text,int,int,int) RETURNS int AS 'MODULE_PATHNAME','levenshtein_with_costs' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION levenshtein_less_equal (text,text,int) RETURNS int +CREATE FUNCTION levenshtein_less_equal (text,text,int) RETURNS int AS 'MODULE_PATHNAME','levenshtein_less_equal' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION levenshtein_less_equal (text,text,int,int,int,int) RETURNS int +CREATE FUNCTION levenshtein_less_equal (text,text,int,int,int,int) RETURNS int AS 'MODULE_PATHNAME','levenshtein_less_equal_with_costs' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION metaphone (text,int) RETURNS text +CREATE FUNCTION metaphone (text,int) RETURNS text AS 'MODULE_PATHNAME','metaphone' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION soundex(text) RETURNS text +CREATE FUNCTION soundex(text) RETURNS text AS 'MODULE_PATHNAME', 'soundex' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION text_soundex(text) RETURNS text +CREATE FUNCTION text_soundex(text) RETURNS text AS 'MODULE_PATHNAME', 'soundex' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION difference(text,text) RETURNS int +CREATE FUNCTION difference(text,text) RETURNS int AS 'MODULE_PATHNAME', 'difference' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION dmetaphone (text) RETURNS text +CREATE FUNCTION dmetaphone (text) RETURNS text AS 'MODULE_PATHNAME', 'dmetaphone' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION dmetaphone_alt (text) RETURNS text +CREATE FUNCTION dmetaphone_alt (text) RETURNS text AS 'MODULE_PATHNAME', 'dmetaphone_alt' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/hstore/hstore--1.0.sql b/contrib/hstore/hstore--1.0.sql index d77b14286b..247a2773f5 100644 --- a/contrib/hstore/hstore--1.0.sql +++ b/contrib/hstore/hstore--1.0.sql @@ -2,22 +2,22 @@ CREATE TYPE hstore; -CREATE OR REPLACE FUNCTION hstore_in(cstring) +CREATE FUNCTION hstore_in(cstring) RETURNS hstore AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_out(hstore) +CREATE FUNCTION hstore_out(hstore) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_recv(internal) +CREATE FUNCTION hstore_recv(internal) RETURNS hstore AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_send(hstore) +CREATE FUNCTION hstore_send(hstore) RETURNS bytea AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -31,12 +31,12 @@ CREATE TYPE hstore ( STORAGE = extended ); -CREATE OR REPLACE FUNCTION hstore_version_diag(hstore) +CREATE FUNCTION hstore_version_diag(hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_version_diag' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION fetchval(hstore,text) +CREATE FUNCTION fetchval(hstore,text) RETURNS text AS 'MODULE_PATHNAME','hstore_fetchval' LANGUAGE C STRICT IMMUTABLE; @@ -47,7 +47,7 @@ CREATE OPERATOR -> ( PROCEDURE = fetchval ); -CREATE OR REPLACE FUNCTION slice_array(hstore,text[]) +CREATE FUNCTION slice_array(hstore,text[]) RETURNS text[] AS 'MODULE_PATHNAME','hstore_slice_to_array' LANGUAGE C STRICT IMMUTABLE; @@ -58,17 +58,17 @@ CREATE OPERATOR -> ( PROCEDURE = slice_array ); -CREATE OR REPLACE FUNCTION slice(hstore,text[]) +CREATE FUNCTION slice(hstore,text[]) RETURNS hstore AS 'MODULE_PATHNAME','hstore_slice_to_hstore' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION isexists(hstore,text) +CREATE FUNCTION isexists(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION exist(hstore,text) +CREATE FUNCTION exist(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists' LANGUAGE C STRICT IMMUTABLE; @@ -81,7 +81,7 @@ CREATE OPERATOR ? ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION exists_any(hstore,text[]) +CREATE FUNCTION exists_any(hstore,text[]) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists_any' LANGUAGE C STRICT IMMUTABLE; @@ -94,7 +94,7 @@ CREATE OPERATOR ?| ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION exists_all(hstore,text[]) +CREATE FUNCTION exists_all(hstore,text[]) RETURNS bool AS 'MODULE_PATHNAME','hstore_exists_all' LANGUAGE C STRICT IMMUTABLE; @@ -107,27 +107,27 @@ CREATE OPERATOR ?& ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION isdefined(hstore,text) +CREATE FUNCTION isdefined(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_defined' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION defined(hstore,text) +CREATE FUNCTION defined(hstore,text) RETURNS bool AS 'MODULE_PATHNAME','hstore_defined' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION delete(hstore,text) +CREATE FUNCTION delete(hstore,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION delete(hstore,text[]) +CREATE FUNCTION delete(hstore,text[]) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete_array' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION delete(hstore,hstore) +CREATE FUNCTION delete(hstore,hstore) RETURNS hstore AS 'MODULE_PATHNAME','hstore_delete_hstore' LANGUAGE C STRICT IMMUTABLE; @@ -150,7 +150,7 @@ CREATE OPERATOR - ( PROCEDURE = delete ); -CREATE OR REPLACE FUNCTION hs_concat(hstore,hstore) +CREATE FUNCTION hs_concat(hstore,hstore) RETURNS hstore AS 'MODULE_PATHNAME','hstore_concat' LANGUAGE C STRICT IMMUTABLE; @@ -161,12 +161,12 @@ CREATE OPERATOR || ( PROCEDURE = hs_concat ); -CREATE OR REPLACE FUNCTION hs_contains(hstore,hstore) +CREATE FUNCTION hs_contains(hstore,hstore) RETURNS bool AS 'MODULE_PATHNAME','hstore_contains' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hs_contained(hstore,hstore) +CREATE FUNCTION hs_contained(hstore,hstore) RETURNS bool AS 'MODULE_PATHNAME','hstore_contained' LANGUAGE C STRICT IMMUTABLE; @@ -208,12 +208,12 @@ CREATE OPERATOR ~ ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION tconvert(text,text) +CREATE FUNCTION tconvert(text,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_from_text' LANGUAGE C IMMUTABLE; -- not STRICT; needs to allow (key,NULL) -CREATE OR REPLACE FUNCTION hstore(text,text) +CREATE FUNCTION hstore(text,text) RETURNS hstore AS 'MODULE_PATHNAME','hstore_from_text' LANGUAGE C IMMUTABLE; -- not STRICT; needs to allow (key,NULL) @@ -224,7 +224,7 @@ CREATE OPERATOR => ( PROCEDURE = hstore ); -CREATE OR REPLACE FUNCTION hstore(text[],text[]) +CREATE FUNCTION hstore(text[],text[]) RETURNS hstore AS 'MODULE_PATHNAME', 'hstore_from_arrays' LANGUAGE C IMMUTABLE; -- not STRICT; allows (keys,null) @@ -237,12 +237,12 @@ LANGUAGE C IMMUTABLE STRICT; CREATE CAST (text[] AS hstore) WITH FUNCTION hstore(text[]); -CREATE OR REPLACE FUNCTION hstore(record) +CREATE FUNCTION hstore(record) RETURNS hstore AS 'MODULE_PATHNAME', 'hstore_from_record' LANGUAGE C IMMUTABLE; -- not STRICT; allows (null::recordtype) -CREATE OR REPLACE FUNCTION hstore_to_array(hstore) +CREATE FUNCTION hstore_to_array(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_to_array' LANGUAGE C STRICT IMMUTABLE; @@ -252,7 +252,7 @@ CREATE OPERATOR %% ( PROCEDURE = hstore_to_array ); -CREATE OR REPLACE FUNCTION hstore_to_matrix(hstore) +CREATE FUNCTION hstore_to_matrix(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_to_matrix' LANGUAGE C STRICT IMMUTABLE; @@ -262,34 +262,34 @@ CREATE OPERATOR %# ( PROCEDURE = hstore_to_matrix ); -CREATE OR REPLACE FUNCTION akeys(hstore) +CREATE FUNCTION akeys(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_akeys' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION avals(hstore) +CREATE FUNCTION avals(hstore) RETURNS text[] AS 'MODULE_PATHNAME','hstore_avals' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION skeys(hstore) +CREATE FUNCTION skeys(hstore) RETURNS setof text AS 'MODULE_PATHNAME','hstore_skeys' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION svals(hstore) +CREATE FUNCTION svals(hstore) RETURNS setof text AS 'MODULE_PATHNAME','hstore_svals' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION each(IN hs hstore, +CREATE FUNCTION each(IN hs hstore, OUT key text, OUT value text) RETURNS SETOF record AS 'MODULE_PATHNAME','hstore_each' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION populate_record(anyelement,hstore) +CREATE FUNCTION populate_record(anyelement,hstore) RETURNS anyelement AS 'MODULE_PATHNAME', 'hstore_populate_record' LANGUAGE C IMMUTABLE; -- not STRICT; allows (null::rectype,hstore) @@ -302,37 +302,37 @@ CREATE OPERATOR #= ( -- btree support -CREATE OR REPLACE FUNCTION hstore_eq(hstore,hstore) +CREATE FUNCTION hstore_eq(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_eq' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_ne(hstore,hstore) +CREATE FUNCTION hstore_ne(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_ne' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_gt(hstore,hstore) +CREATE FUNCTION hstore_gt(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_gt' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_ge(hstore,hstore) +CREATE FUNCTION hstore_ge(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_ge' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_lt(hstore,hstore) +CREATE FUNCTION hstore_lt(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_lt' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_le(hstore,hstore) +CREATE FUNCTION hstore_le(hstore,hstore) RETURNS boolean AS 'MODULE_PATHNAME','hstore_le' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION hstore_cmp(hstore,hstore) +CREATE FUNCTION hstore_cmp(hstore,hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_cmp' LANGUAGE C STRICT IMMUTABLE; @@ -411,7 +411,7 @@ AS -- hash support -CREATE OR REPLACE FUNCTION hstore_hash(hstore) +CREATE FUNCTION hstore_hash(hstore) RETURNS integer AS 'MODULE_PATHNAME','hstore_hash' LANGUAGE C STRICT IMMUTABLE; @@ -426,12 +426,12 @@ AS CREATE TYPE ghstore; -CREATE OR REPLACE FUNCTION ghstore_in(cstring) +CREATE FUNCTION ghstore_in(cstring) RETURNS ghstore AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ghstore_out(ghstore) +CREATE FUNCTION ghstore_out(ghstore) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -442,37 +442,37 @@ CREATE TYPE ghstore ( OUTPUT = ghstore_out ); -CREATE OR REPLACE FUNCTION ghstore_compress(internal) +CREATE FUNCTION ghstore_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_decompress(internal) +CREATE FUNCTION ghstore_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_penalty(internal,internal,internal) +CREATE FUNCTION ghstore_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_picksplit(internal, internal) +CREATE FUNCTION ghstore_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_union(internal, internal) +CREATE FUNCTION ghstore_union(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_same(internal, internal, internal) +CREATE FUNCTION ghstore_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ghstore_consistent(internal,internal,int,oid,internal) +CREATE FUNCTION ghstore_consistent(internal,internal,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -498,17 +498,17 @@ AS -- GIN support -CREATE OR REPLACE FUNCTION gin_extract_hstore(internal, internal) +CREATE FUNCTION gin_extract_hstore(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gin_extract_hstore_query(internal, internal, int2, internal, internal) +CREATE FUNCTION gin_extract_hstore_query(internal, internal, int2, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gin_consistent_hstore(internal, int2, internal, int4, internal, internal) +CREATE FUNCTION gin_consistent_hstore(internal, int2, internal, int4, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/intagg/int_aggregate--1.0.sql b/contrib/intagg/int_aggregate--1.0.sql index 3df72c18cf..ce78d17b77 100644 --- a/contrib/intagg/int_aggregate--1.0.sql +++ b/contrib/intagg/int_aggregate--1.0.sql @@ -2,14 +2,14 @@ -- Internal function for the aggregate -- Is called for each item in an aggregation -CREATE OR REPLACE FUNCTION int_agg_state (internal, int4) +CREATE FUNCTION int_agg_state (internal, int4) RETURNS internal AS 'array_agg_transfn' LANGUAGE INTERNAL; -- Internal function for the aggregate -- Is called at the end of the aggregation, and returns an array. -CREATE OR REPLACE FUNCTION int_agg_final_array (internal) +CREATE FUNCTION int_agg_final_array (internal) RETURNS int4[] AS 'array_agg_finalfn' LANGUAGE INTERNAL; @@ -26,7 +26,7 @@ CREATE AGGREGATE int_array_aggregate ( -- The enumeration function -- returns each element in a one dimensional integer array -- as a row. -CREATE OR REPLACE FUNCTION int_array_enum(int4[]) +CREATE FUNCTION int_array_enum(int4[]) RETURNS setof integer AS 'array_unnest' LANGUAGE INTERNAL IMMUTABLE STRICT; diff --git a/contrib/intarray/intarray--1.0.sql b/contrib/intarray/intarray--1.0.sql index 5f86ee607f..3b77c516cb 100644 --- a/contrib/intarray/intarray--1.0.sql +++ b/contrib/intarray/intarray--1.0.sql @@ -5,12 +5,12 @@ -- -- Query type -CREATE OR REPLACE FUNCTION bqarr_in(cstring) +CREATE FUNCTION bqarr_in(cstring) RETURNS query_int AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION bqarr_out(query_int) +CREATE FUNCTION bqarr_out(query_int) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -22,20 +22,20 @@ CREATE TYPE query_int ( ); --only for debug -CREATE OR REPLACE FUNCTION querytree(query_int) +CREATE FUNCTION querytree(query_int) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION boolop(_int4, query_int) +CREATE 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 OR REPLACE FUNCTION rboolop(query_int, _int4) +CREATE FUNCTION rboolop(query_int, _int4) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -67,35 +67,35 @@ CREATE OPERATOR ~~ ( -- Comparison methods -CREATE OR REPLACE FUNCTION _int_contains(_int4, _int4) +CREATE FUNCTION _int_contains(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION _int_contains(_int4, _int4) IS 'contains'; -CREATE OR REPLACE FUNCTION _int_contained(_int4, _int4) +CREATE 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 OR REPLACE FUNCTION _int_overlap(_int4, _int4) +CREATE FUNCTION _int_overlap(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION _int_overlap(_int4, _int4) IS 'overlaps'; -CREATE OR REPLACE FUNCTION _int_same(_int4, _int4) +CREATE 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 OR REPLACE FUNCTION _int_different(_int4, _int4) +CREATE FUNCTION _int_different(_int4, _int4) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -104,12 +104,12 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different'; -- support routines for indexing -CREATE OR REPLACE FUNCTION _int_union(_int4, _int4) +CREATE FUNCTION _int_union(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _int_inter(_int4, _int4) +CREATE FUNCTION _int_inter(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -187,12 +187,12 @@ CREATE OPERATOR ~ ( ); -------------- -CREATE OR REPLACE FUNCTION intset(int4) +CREATE FUNCTION intset(int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION icount(_int4) +CREATE FUNCTION icount(_int4) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -202,32 +202,32 @@ CREATE OPERATOR # ( PROCEDURE = icount ); -CREATE OR REPLACE FUNCTION sort(_int4, text) +CREATE FUNCTION sort(_int4, text) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION sort(_int4) +CREATE FUNCTION sort(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION sort_asc(_int4) +CREATE FUNCTION sort_asc(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION sort_desc(_int4) +CREATE FUNCTION sort_desc(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION uniq(_int4) +CREATE FUNCTION uniq(_int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION idx(_int4, int4) +CREATE FUNCTION idx(_int4, int4) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -238,17 +238,17 @@ CREATE OPERATOR # ( PROCEDURE = idx ); -CREATE OR REPLACE FUNCTION subarray(_int4, int4, int4) +CREATE FUNCTION subarray(_int4, int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION subarray(_int4, int4) +CREATE FUNCTION subarray(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION intarray_push_elem(_int4, int4) +CREATE FUNCTION intarray_push_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -259,7 +259,7 @@ CREATE OPERATOR + ( PROCEDURE = intarray_push_elem ); -CREATE OR REPLACE FUNCTION intarray_push_array(_int4, _int4) +CREATE FUNCTION intarray_push_array(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -271,7 +271,7 @@ CREATE OPERATOR + ( PROCEDURE = intarray_push_array ); -CREATE OR REPLACE FUNCTION intarray_del_elem(_int4, int4) +CREATE FUNCTION intarray_del_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -282,7 +282,7 @@ CREATE OPERATOR - ( PROCEDURE = intarray_del_elem ); -CREATE OR REPLACE FUNCTION intset_union_elem(_int4, int4) +CREATE FUNCTION intset_union_elem(_int4, int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -300,7 +300,7 @@ CREATE OPERATOR | ( PROCEDURE = _int_union ); -CREATE OR REPLACE FUNCTION intset_subtract(_int4, _int4) +CREATE FUNCTION intset_subtract(_int4, _int4) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -320,37 +320,37 @@ CREATE OPERATOR & ( -------------- -- define the GiST support methods -CREATE OR REPLACE FUNCTION g_int_consistent(internal,_int4,int,oid,internal) +CREATE FUNCTION g_int_consistent(internal,_int4,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_compress(internal) +CREATE FUNCTION g_int_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_decompress(internal) +CREATE FUNCTION g_int_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_penalty(internal,internal,internal) +CREATE FUNCTION g_int_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_picksplit(internal, internal) +CREATE FUNCTION g_int_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_union(internal, internal) +CREATE FUNCTION g_int_union(internal, internal) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_int_same(_int4, _int4, internal) +CREATE FUNCTION g_int_same(_int4, _int4, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -381,12 +381,12 @@ DEFAULT FOR TYPE _int4 USING gist AS --------------------------------------------- -- define the GiST support methods -CREATE OR REPLACE FUNCTION _intbig_in(cstring) +CREATE FUNCTION _intbig_in(cstring) RETURNS intbig_gkey AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _intbig_out(intbig_gkey) +CREATE FUNCTION _intbig_out(intbig_gkey) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -397,37 +397,37 @@ CREATE TYPE intbig_gkey ( OUTPUT = _intbig_out ); -CREATE OR REPLACE FUNCTION g_intbig_consistent(internal,internal,int,oid,internal) +CREATE FUNCTION g_intbig_consistent(internal,internal,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_compress(internal) +CREATE FUNCTION g_intbig_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_decompress(internal) +CREATE FUNCTION g_intbig_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_penalty(internal,internal,internal) +CREATE FUNCTION g_intbig_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_picksplit(internal, internal) +CREATE FUNCTION g_intbig_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_union(internal, internal) +CREATE FUNCTION g_intbig_union(internal, internal) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION g_intbig_same(internal, internal, internal) +CREATE FUNCTION g_intbig_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -455,12 +455,12 @@ AS --GIN -CREATE OR REPLACE FUNCTION ginint4_queryextract(internal, internal, int2, internal, internal, internal, internal) +CREATE FUNCTION ginint4_queryextract(internal, internal, int2, internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ginint4_consistent(internal, int2, internal, int4, internal, internal, internal, internal) +CREATE FUNCTION ginint4_consistent(internal, int2, internal, int4, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/isn/isn--1.0.sql b/contrib/isn/isn--1.0.sql index a6499f267a..336ad1db3c 100644 --- a/contrib/isn/isn--1.0.sql +++ b/contrib/isn/isn--1.0.sql @@ -12,12 +12,12 @@ -- Input and output functions and data types: -- --------------------------------------------------- -CREATE OR REPLACE FUNCTION ean13_in(cstring) +CREATE FUNCTION ean13_in(cstring) RETURNS ean13 AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ean13_out(ean13) +CREATE FUNCTION ean13_out(ean13) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -30,12 +30,12 @@ CREATE TYPE ean13 ( COMMENT ON TYPE ean13 IS 'International European Article Number (EAN13)'; -CREATE OR REPLACE FUNCTION isbn13_in(cstring) +CREATE FUNCTION isbn13_in(cstring) RETURNS isbn13 AS 'MODULE_PATHNAME', 'isbn_in' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ean13_out(isbn13) +CREATE FUNCTION ean13_out(isbn13) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -48,12 +48,12 @@ CREATE TYPE isbn13 ( COMMENT ON TYPE isbn13 IS 'International Standard Book Number 13 (ISBN13)'; -CREATE OR REPLACE FUNCTION ismn13_in(cstring) +CREATE FUNCTION ismn13_in(cstring) RETURNS ismn13 AS 'MODULE_PATHNAME', 'ismn_in' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ean13_out(ismn13) +CREATE FUNCTION ean13_out(ismn13) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -66,12 +66,12 @@ CREATE TYPE ismn13 ( COMMENT ON TYPE ismn13 IS 'International Standard Music Number 13 (ISMN13)'; -CREATE OR REPLACE FUNCTION issn13_in(cstring) +CREATE FUNCTION issn13_in(cstring) RETURNS issn13 AS 'MODULE_PATHNAME', 'issn_in' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ean13_out(issn13) +CREATE FUNCTION ean13_out(issn13) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -86,12 +86,12 @@ COMMENT ON TYPE issn13 -- Short format: -CREATE OR REPLACE FUNCTION isbn_in(cstring) +CREATE FUNCTION isbn_in(cstring) RETURNS isbn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isn_out(isbn) +CREATE FUNCTION isn_out(isbn) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -104,12 +104,12 @@ CREATE TYPE isbn ( COMMENT ON TYPE isbn IS 'International Standard Book Number (ISBN)'; -CREATE OR REPLACE FUNCTION ismn_in(cstring) +CREATE FUNCTION ismn_in(cstring) RETURNS ismn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isn_out(ismn) +CREATE FUNCTION isn_out(ismn) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -122,12 +122,12 @@ CREATE TYPE ismn ( COMMENT ON TYPE ismn IS 'International Standard Music Number (ISMN)'; -CREATE OR REPLACE FUNCTION issn_in(cstring) +CREATE FUNCTION issn_in(cstring) RETURNS issn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isn_out(issn) +CREATE FUNCTION isn_out(issn) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -140,12 +140,12 @@ CREATE TYPE issn ( COMMENT ON TYPE issn IS 'International Standard Serial Number (ISSN)'; -CREATE OR REPLACE FUNCTION upc_in(cstring) +CREATE FUNCTION upc_in(cstring) RETURNS upc AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isn_out(upc) +CREATE FUNCTION isn_out(upc) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -163,249 +163,249 @@ COMMENT ON TYPE upc -- --------------------------------------------------- -- EAN13: -CREATE OR REPLACE FUNCTION isnlt(ean13, ean13) +CREATE FUNCTION isnlt(ean13, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, ean13) +CREATE FUNCTION isnle(ean13, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, ean13) +CREATE FUNCTION isneq(ean13, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, ean13) +CREATE FUNCTION isnge(ean13, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, ean13) +CREATE FUNCTION isngt(ean13, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, ean13) +CREATE FUNCTION isnne(ean13, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, isbn13) +CREATE FUNCTION isnlt(ean13, isbn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, isbn13) +CREATE FUNCTION isnle(ean13, isbn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, isbn13) +CREATE FUNCTION isneq(ean13, isbn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, isbn13) +CREATE FUNCTION isnge(ean13, isbn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, isbn13) +CREATE FUNCTION isngt(ean13, isbn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, isbn13) +CREATE FUNCTION isnne(ean13, isbn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, ismn13) +CREATE FUNCTION isnlt(ean13, ismn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, ismn13) +CREATE FUNCTION isnle(ean13, ismn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, ismn13) +CREATE FUNCTION isneq(ean13, ismn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, ismn13) +CREATE FUNCTION isnge(ean13, ismn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, ismn13) +CREATE FUNCTION isngt(ean13, ismn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, ismn13) +CREATE FUNCTION isnne(ean13, ismn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, issn13) +CREATE FUNCTION isnlt(ean13, issn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, issn13) +CREATE FUNCTION isnle(ean13, issn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, issn13) +CREATE FUNCTION isneq(ean13, issn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, issn13) +CREATE FUNCTION isnge(ean13, issn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, issn13) +CREATE FUNCTION isngt(ean13, issn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, issn13) +CREATE FUNCTION isnne(ean13, issn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, isbn) +CREATE FUNCTION isnlt(ean13, isbn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, isbn) +CREATE FUNCTION isnle(ean13, isbn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, isbn) +CREATE FUNCTION isneq(ean13, isbn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, isbn) +CREATE FUNCTION isnge(ean13, isbn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, isbn) +CREATE FUNCTION isngt(ean13, isbn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, isbn) +CREATE FUNCTION isnne(ean13, isbn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, ismn) +CREATE FUNCTION isnlt(ean13, ismn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, ismn) +CREATE FUNCTION isnle(ean13, ismn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, ismn) +CREATE FUNCTION isneq(ean13, ismn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, ismn) +CREATE FUNCTION isnge(ean13, ismn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, ismn) +CREATE FUNCTION isngt(ean13, ismn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, ismn) +CREATE FUNCTION isnne(ean13, ismn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, issn) +CREATE FUNCTION isnlt(ean13, issn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, issn) +CREATE FUNCTION isnle(ean13, issn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, issn) +CREATE FUNCTION isneq(ean13, issn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, issn) +CREATE FUNCTION isnge(ean13, issn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, issn) +CREATE FUNCTION isngt(ean13, issn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, issn) +CREATE FUNCTION isnne(ean13, issn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ean13, upc) +CREATE FUNCTION isnlt(ean13, upc) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ean13, upc) +CREATE FUNCTION isnle(ean13, upc) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ean13, upc) +CREATE FUNCTION isneq(ean13, upc) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ean13, upc) +CREATE FUNCTION isnge(ean13, upc) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ean13, upc) +CREATE FUNCTION isngt(ean13, upc) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ean13, upc) +CREATE FUNCTION isnne(ean13, upc) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -413,94 +413,94 @@ CREATE OR REPLACE FUNCTION isnne(ean13, upc) --------------------------------------------------- -- ISBN13: -CREATE OR REPLACE FUNCTION isnlt(isbn13, isbn13) +CREATE FUNCTION isnlt(isbn13, isbn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn13, isbn13) +CREATE FUNCTION isnle(isbn13, isbn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn13, isbn13) +CREATE FUNCTION isneq(isbn13, isbn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn13, isbn13) +CREATE FUNCTION isnge(isbn13, isbn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn13, isbn13) +CREATE FUNCTION isngt(isbn13, isbn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn13, isbn13) +CREATE FUNCTION isnne(isbn13, isbn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(isbn13, isbn) +CREATE FUNCTION isnlt(isbn13, isbn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn13, isbn) +CREATE FUNCTION isnle(isbn13, isbn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn13, isbn) +CREATE FUNCTION isneq(isbn13, isbn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn13, isbn) +CREATE FUNCTION isnge(isbn13, isbn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn13, isbn) +CREATE FUNCTION isngt(isbn13, isbn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn13, isbn) +CREATE FUNCTION isnne(isbn13, isbn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(isbn13, ean13) +CREATE FUNCTION isnlt(isbn13, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn13, ean13) +CREATE FUNCTION isnle(isbn13, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn13, ean13) +CREATE FUNCTION isneq(isbn13, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn13, ean13) +CREATE FUNCTION isnge(isbn13, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn13, ean13) +CREATE FUNCTION isngt(isbn13, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn13, ean13) +CREATE FUNCTION isnne(isbn13, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -508,94 +508,94 @@ CREATE OR REPLACE FUNCTION isnne(isbn13, ean13) --------------------------------------------------- -- ISBN: -CREATE OR REPLACE FUNCTION isnlt(isbn, isbn) +CREATE FUNCTION isnlt(isbn, isbn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn, isbn) +CREATE FUNCTION isnle(isbn, isbn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn, isbn) +CREATE FUNCTION isneq(isbn, isbn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn, isbn) +CREATE FUNCTION isnge(isbn, isbn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn, isbn) +CREATE FUNCTION isngt(isbn, isbn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn, isbn) +CREATE FUNCTION isnne(isbn, isbn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(isbn, isbn13) +CREATE FUNCTION isnlt(isbn, isbn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn, isbn13) +CREATE FUNCTION isnle(isbn, isbn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn, isbn13) +CREATE FUNCTION isneq(isbn, isbn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn, isbn13) +CREATE FUNCTION isnge(isbn, isbn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn, isbn13) +CREATE FUNCTION isngt(isbn, isbn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn, isbn13) +CREATE FUNCTION isnne(isbn, isbn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(isbn, ean13) +CREATE FUNCTION isnlt(isbn, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(isbn, ean13) +CREATE FUNCTION isnle(isbn, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(isbn, ean13) +CREATE FUNCTION isneq(isbn, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(isbn, ean13) +CREATE FUNCTION isnge(isbn, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(isbn, ean13) +CREATE FUNCTION isngt(isbn, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(isbn, ean13) +CREATE FUNCTION isnne(isbn, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -603,94 +603,94 @@ CREATE OR REPLACE FUNCTION isnne(isbn, ean13) --------------------------------------------------- -- ISMN13: -CREATE OR REPLACE FUNCTION isnlt(ismn13, ismn13) +CREATE FUNCTION isnlt(ismn13, ismn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn13, ismn13) +CREATE FUNCTION isnle(ismn13, ismn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn13, ismn13) +CREATE FUNCTION isneq(ismn13, ismn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn13, ismn13) +CREATE FUNCTION isnge(ismn13, ismn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn13, ismn13) +CREATE FUNCTION isngt(ismn13, ismn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn13, ismn13) +CREATE FUNCTION isnne(ismn13, ismn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ismn13, ismn) +CREATE FUNCTION isnlt(ismn13, ismn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn13, ismn) +CREATE FUNCTION isnle(ismn13, ismn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn13, ismn) +CREATE FUNCTION isneq(ismn13, ismn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn13, ismn) +CREATE FUNCTION isnge(ismn13, ismn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn13, ismn) +CREATE FUNCTION isngt(ismn13, ismn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn13, ismn) +CREATE FUNCTION isnne(ismn13, ismn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ismn13, ean13) +CREATE FUNCTION isnlt(ismn13, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn13, ean13) +CREATE FUNCTION isnle(ismn13, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn13, ean13) +CREATE FUNCTION isneq(ismn13, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn13, ean13) +CREATE FUNCTION isnge(ismn13, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn13, ean13) +CREATE FUNCTION isngt(ismn13, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn13, ean13) +CREATE FUNCTION isnne(ismn13, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -698,94 +698,94 @@ CREATE OR REPLACE FUNCTION isnne(ismn13, ean13) --------------------------------------------------- -- ISMN: -CREATE OR REPLACE FUNCTION isnlt(ismn, ismn) +CREATE FUNCTION isnlt(ismn, ismn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn, ismn) +CREATE FUNCTION isnle(ismn, ismn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn, ismn) +CREATE FUNCTION isneq(ismn, ismn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn, ismn) +CREATE FUNCTION isnge(ismn, ismn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn, ismn) +CREATE FUNCTION isngt(ismn, ismn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn, ismn) +CREATE FUNCTION isnne(ismn, ismn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ismn, ismn13) +CREATE FUNCTION isnlt(ismn, ismn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn, ismn13) +CREATE FUNCTION isnle(ismn, ismn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn, ismn13) +CREATE FUNCTION isneq(ismn, ismn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn, ismn13) +CREATE FUNCTION isnge(ismn, ismn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn, ismn13) +CREATE FUNCTION isngt(ismn, ismn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn, ismn13) +CREATE FUNCTION isnne(ismn, ismn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(ismn, ean13) +CREATE FUNCTION isnlt(ismn, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(ismn, ean13) +CREATE FUNCTION isnle(ismn, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(ismn, ean13) +CREATE FUNCTION isneq(ismn, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(ismn, ean13) +CREATE FUNCTION isnge(ismn, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(ismn, ean13) +CREATE FUNCTION isngt(ismn, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(ismn, ean13) +CREATE FUNCTION isnne(ismn, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -793,94 +793,94 @@ CREATE OR REPLACE FUNCTION isnne(ismn, ean13) --------------------------------------------------- -- ISSN13: -CREATE OR REPLACE FUNCTION isnlt(issn13, issn13) +CREATE FUNCTION isnlt(issn13, issn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn13, issn13) +CREATE FUNCTION isnle(issn13, issn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn13, issn13) +CREATE FUNCTION isneq(issn13, issn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn13, issn13) +CREATE FUNCTION isnge(issn13, issn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn13, issn13) +CREATE FUNCTION isngt(issn13, issn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn13, issn13) +CREATE FUNCTION isnne(issn13, issn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(issn13, issn) +CREATE FUNCTION isnlt(issn13, issn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn13, issn) +CREATE FUNCTION isnle(issn13, issn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn13, issn) +CREATE FUNCTION isneq(issn13, issn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn13, issn) +CREATE FUNCTION isnge(issn13, issn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn13, issn) +CREATE FUNCTION isngt(issn13, issn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn13, issn) +CREATE FUNCTION isnne(issn13, issn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(issn13, ean13) +CREATE FUNCTION isnlt(issn13, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn13, ean13) +CREATE FUNCTION isnle(issn13, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn13, ean13) +CREATE FUNCTION isneq(issn13, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn13, ean13) +CREATE FUNCTION isnge(issn13, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn13, ean13) +CREATE FUNCTION isngt(issn13, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn13, ean13) +CREATE FUNCTION isnne(issn13, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -888,94 +888,94 @@ CREATE OR REPLACE FUNCTION isnne(issn13, ean13) --------------------------------------------------- -- ISSN: -CREATE OR REPLACE FUNCTION isnlt(issn, issn) +CREATE FUNCTION isnlt(issn, issn) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn, issn) +CREATE FUNCTION isnle(issn, issn) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn, issn) +CREATE FUNCTION isneq(issn, issn) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn, issn) +CREATE FUNCTION isnge(issn, issn) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn, issn) +CREATE FUNCTION isngt(issn, issn) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn, issn) +CREATE FUNCTION isnne(issn, issn) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(issn, issn13) +CREATE FUNCTION isnlt(issn, issn13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn, issn13) +CREATE FUNCTION isnle(issn, issn13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn, issn13) +CREATE FUNCTION isneq(issn, issn13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn, issn13) +CREATE FUNCTION isnge(issn, issn13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn, issn13) +CREATE FUNCTION isngt(issn, issn13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn, issn13) +CREATE FUNCTION isnne(issn, issn13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(issn, ean13) +CREATE FUNCTION isnlt(issn, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(issn, ean13) +CREATE FUNCTION isnle(issn, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(issn, ean13) +CREATE FUNCTION isneq(issn, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(issn, ean13) +CREATE FUNCTION isnge(issn, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(issn, ean13) +CREATE FUNCTION isngt(issn, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(issn, ean13) +CREATE FUNCTION isnne(issn, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -983,63 +983,63 @@ CREATE OR REPLACE FUNCTION isnne(issn, ean13) --------------------------------------------------- -- UPC: -CREATE OR REPLACE FUNCTION isnlt(upc, upc) +CREATE FUNCTION isnlt(upc, upc) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(upc, upc) +CREATE FUNCTION isnle(upc, upc) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(upc, upc) +CREATE FUNCTION isneq(upc, upc) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(upc, upc) +CREATE FUNCTION isnge(upc, upc) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(upc, upc) +CREATE FUNCTION isngt(upc, upc) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(upc, upc) +CREATE FUNCTION isnne(upc, upc) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnlt(upc, ean13) +CREATE FUNCTION isnlt(upc, ean13) RETURNS boolean AS 'int8lt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnle(upc, ean13) +CREATE FUNCTION isnle(upc, ean13) RETURNS boolean AS 'int8le' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isneq(upc, ean13) +CREATE FUNCTION isneq(upc, ean13) RETURNS boolean AS 'int8eq' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnge(upc, ean13) +CREATE FUNCTION isnge(upc, ean13) RETURNS boolean AS 'int8ge' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isngt(upc, ean13) +CREATE FUNCTION isngt(upc, ean13) RETURNS boolean AS 'int8gt' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isnne(upc, ean13) +CREATE FUNCTION isnne(upc, ean13) RETURNS boolean AS 'int8ne' LANGUAGE 'internal' @@ -2522,7 +2522,7 @@ CREATE OPERATOR FAMILY isn_ops USING hash; -- --------------------------------------------------- -- EAN13: -CREATE OR REPLACE FUNCTION btean13cmp(ean13, ean13) +CREATE FUNCTION btean13cmp(ean13, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2537,7 +2537,7 @@ CREATE OPERATOR CLASS ean13_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btean13cmp(ean13, ean13); -CREATE OR REPLACE FUNCTION hashean13(ean13) +CREATE FUNCTION hashean13(ean13) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' IMMUTABLE STRICT; @@ -2548,37 +2548,37 @@ CREATE OPERATOR CLASS ean13_ops DEFAULT FUNCTION 1 hashean13(ean13); -- EAN13 vs other types: -CREATE OR REPLACE FUNCTION btean13cmp(ean13, isbn13) +CREATE FUNCTION btean13cmp(ean13, isbn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, ismn13) +CREATE FUNCTION btean13cmp(ean13, ismn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, issn13) +CREATE FUNCTION btean13cmp(ean13, issn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, isbn) +CREATE FUNCTION btean13cmp(ean13, isbn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, ismn) +CREATE FUNCTION btean13cmp(ean13, ismn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, issn) +CREATE FUNCTION btean13cmp(ean13, issn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btean13cmp(ean13, upc) +CREATE FUNCTION btean13cmp(ean13, upc) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2639,7 +2639,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISBN13: -CREATE OR REPLACE FUNCTION btisbn13cmp(isbn13, isbn13) +CREATE FUNCTION btisbn13cmp(isbn13, isbn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2654,7 +2654,7 @@ CREATE OPERATOR CLASS isbn13_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btisbn13cmp(isbn13, isbn13); -CREATE OR REPLACE FUNCTION hashisbn13(isbn13) +CREATE FUNCTION hashisbn13(isbn13) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2666,12 +2666,12 @@ CREATE OPERATOR CLASS isbn13_ops DEFAULT FUNCTION 1 hashisbn13(isbn13); -- ISBN13 vs other types: -CREATE OR REPLACE FUNCTION btisbn13cmp(isbn13, ean13) +CREATE FUNCTION btisbn13cmp(isbn13, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btisbn13cmp(isbn13, isbn) +CREATE FUNCTION btisbn13cmp(isbn13, isbn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2697,7 +2697,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISBN: -CREATE OR REPLACE FUNCTION btisbncmp(isbn, isbn) +CREATE FUNCTION btisbncmp(isbn, isbn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2712,7 +2712,7 @@ CREATE OPERATOR CLASS isbn_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btisbncmp(isbn, isbn); -CREATE OR REPLACE FUNCTION hashisbn(isbn) +CREATE FUNCTION hashisbn(isbn) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2724,12 +2724,12 @@ CREATE OPERATOR CLASS isbn_ops DEFAULT FUNCTION 1 hashisbn(isbn); -- ISBN vs other types: -CREATE OR REPLACE FUNCTION btisbncmp(isbn, ean13) +CREATE FUNCTION btisbncmp(isbn, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btisbncmp(isbn, isbn13) +CREATE FUNCTION btisbncmp(isbn, isbn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2755,7 +2755,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISMN13: -CREATE OR REPLACE FUNCTION btismn13cmp(ismn13, ismn13) +CREATE FUNCTION btismn13cmp(ismn13, ismn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2770,7 +2770,7 @@ CREATE OPERATOR CLASS ismn13_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btismn13cmp(ismn13, ismn13); -CREATE OR REPLACE FUNCTION hashismn13(ismn13) +CREATE FUNCTION hashismn13(ismn13) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2782,12 +2782,12 @@ CREATE OPERATOR CLASS ismn13_ops DEFAULT FUNCTION 1 hashismn13(ismn13); -- ISMN13 vs other types: -CREATE OR REPLACE FUNCTION btismn13cmp(ismn13, ean13) +CREATE FUNCTION btismn13cmp(ismn13, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btismn13cmp(ismn13, ismn) +CREATE FUNCTION btismn13cmp(ismn13, ismn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2813,7 +2813,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISMN: -CREATE OR REPLACE FUNCTION btismncmp(ismn, ismn) +CREATE FUNCTION btismncmp(ismn, ismn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2828,7 +2828,7 @@ CREATE OPERATOR CLASS ismn_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btismncmp(ismn, ismn); -CREATE OR REPLACE FUNCTION hashismn(ismn) +CREATE FUNCTION hashismn(ismn) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2840,12 +2840,12 @@ CREATE OPERATOR CLASS ismn_ops DEFAULT FUNCTION 1 hashismn(ismn); -- ISMN vs other types: -CREATE OR REPLACE FUNCTION btismncmp(ismn, ean13) +CREATE FUNCTION btismncmp(ismn, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btismncmp(ismn, ismn13) +CREATE FUNCTION btismncmp(ismn, ismn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2871,7 +2871,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISSN13: -CREATE OR REPLACE FUNCTION btissn13cmp(issn13, issn13) +CREATE FUNCTION btissn13cmp(issn13, issn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2886,7 +2886,7 @@ CREATE OPERATOR CLASS issn13_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btissn13cmp(issn13, issn13); -CREATE OR REPLACE FUNCTION hashissn13(issn13) +CREATE FUNCTION hashissn13(issn13) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2898,12 +2898,12 @@ CREATE OPERATOR CLASS issn13_ops DEFAULT FUNCTION 1 hashissn13(issn13); -- ISSN13 vs other types: -CREATE OR REPLACE FUNCTION btissn13cmp(issn13, ean13) +CREATE FUNCTION btissn13cmp(issn13, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btissn13cmp(issn13, issn) +CREATE FUNCTION btissn13cmp(issn13, issn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2929,7 +2929,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- ISSN: -CREATE OR REPLACE FUNCTION btissncmp(issn, issn) +CREATE FUNCTION btissncmp(issn, issn) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2944,7 +2944,7 @@ CREATE OPERATOR CLASS issn_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btissncmp(issn, issn); -CREATE OR REPLACE FUNCTION hashissn(issn) +CREATE FUNCTION hashissn(issn) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -2956,12 +2956,12 @@ CREATE OPERATOR CLASS issn_ops DEFAULT FUNCTION 1 hashissn(issn); -- ISSN vs other types: -CREATE OR REPLACE FUNCTION btissncmp(issn, ean13) +CREATE FUNCTION btissncmp(issn, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION btissncmp(issn, issn13) +CREATE FUNCTION btissncmp(issn, issn13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -2987,7 +2987,7 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD --------------------------------------------------- -- UPC: -CREATE OR REPLACE FUNCTION btupccmp(upc, upc) +CREATE FUNCTION btupccmp(upc, upc) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -3002,7 +3002,7 @@ CREATE OPERATOR CLASS upc_ops DEFAULT OPERATOR 5 >, FUNCTION 1 btupccmp(upc, upc); -CREATE OR REPLACE FUNCTION hashupc(upc) +CREATE FUNCTION hashupc(upc) RETURNS int4 AS 'hashint8' LANGUAGE 'internal' @@ -3014,7 +3014,7 @@ CREATE OPERATOR CLASS upc_ops DEFAULT FUNCTION 1 hashupc(upc); -- UPC vs other types: -CREATE OR REPLACE FUNCTION btupccmp(upc, ean13) +CREATE FUNCTION btupccmp(upc, ean13) RETURNS int4 AS 'btint8cmp' LANGUAGE 'internal' @@ -3035,31 +3035,31 @@ ALTER OPERATOR FAMILY isn_ops USING hash ADD -- Type casts: -- --------------------------------------------------- -CREATE OR REPLACE FUNCTION isbn13(ean13) +CREATE FUNCTION isbn13(ean13) RETURNS isbn13 AS 'MODULE_PATHNAME', 'isbn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ismn13(ean13) +CREATE FUNCTION ismn13(ean13) RETURNS ismn13 AS 'MODULE_PATHNAME', 'ismn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION issn13(ean13) +CREATE FUNCTION issn13(ean13) RETURNS issn13 AS 'MODULE_PATHNAME', 'issn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION isbn(ean13) +CREATE FUNCTION isbn(ean13) RETURNS isbn AS 'MODULE_PATHNAME', 'isbn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ismn(ean13) +CREATE FUNCTION ismn(ean13) RETURNS ismn AS 'MODULE_PATHNAME', 'ismn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION issn(ean13) +CREATE FUNCTION issn(ean13) RETURNS issn AS 'MODULE_PATHNAME', 'issn_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION upc(ean13) +CREATE FUNCTION upc(ean13) RETURNS upc AS 'MODULE_PATHNAME', 'upc_cast_from_ean13' LANGUAGE 'C' IMMUTABLE STRICT; @@ -3091,83 +3091,83 @@ CREATE CAST (issn13 AS issn) WITHOUT FUNCTION AS ASSIGNMENT; -- -- Validation stuff for lose types: -- -CREATE OR REPLACE FUNCTION make_valid(ean13) +CREATE FUNCTION make_valid(ean13) RETURNS ean13 AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(isbn13) +CREATE FUNCTION make_valid(isbn13) RETURNS isbn13 AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(ismn13) +CREATE FUNCTION make_valid(ismn13) RETURNS ismn13 AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(issn13) +CREATE FUNCTION make_valid(issn13) RETURNS issn13 AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(isbn) +CREATE FUNCTION make_valid(isbn) RETURNS isbn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(ismn) +CREATE FUNCTION make_valid(ismn) RETURNS ismn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(issn) +CREATE FUNCTION make_valid(issn) RETURNS issn AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION make_valid(upc) +CREATE FUNCTION make_valid(upc) RETURNS upc AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(ean13) +CREATE FUNCTION is_valid(ean13) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(isbn13) +CREATE FUNCTION is_valid(isbn13) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(ismn13) +CREATE FUNCTION is_valid(ismn13) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(issn13) +CREATE FUNCTION is_valid(issn13) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(isbn) +CREATE FUNCTION is_valid(isbn) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(ismn) +CREATE FUNCTION is_valid(ismn) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(issn) +CREATE FUNCTION is_valid(issn) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION is_valid(upc) +CREATE FUNCTION is_valid(upc) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE 'C' @@ -3177,7 +3177,7 @@ CREATE OR REPLACE FUNCTION is_valid(upc) -- isn_weak(boolean) - Sets the weak input mode. -- This function is intended for testing use only! -- -CREATE OR REPLACE FUNCTION isn_weak(boolean) +CREATE FUNCTION isn_weak(boolean) RETURNS boolean AS 'MODULE_PATHNAME', 'accept_weak_input' LANGUAGE 'C' @@ -3186,7 +3186,7 @@ CREATE OR REPLACE FUNCTION isn_weak(boolean) -- -- isn_weak() - Gets the weak input mode status -- -CREATE OR REPLACE FUNCTION isn_weak() +CREATE FUNCTION isn_weak() RETURNS boolean AS 'MODULE_PATHNAME', 'weak_input_status' LANGUAGE 'C' diff --git a/contrib/lo/lo--1.0.sql b/contrib/lo/lo--1.0.sql index 6ecb370a22..4b9a7dee32 100644 --- a/contrib/lo/lo--1.0.sql +++ b/contrib/lo/lo--1.0.sql @@ -12,11 +12,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 OR REPLACE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS +CREATE FUNCTION lo_oid(lo) RETURNS pg_catalog.oid AS 'SELECT $1::pg_catalog.oid' LANGUAGE SQL STRICT IMMUTABLE; -- This is used in triggers -CREATE OR REPLACE FUNCTION lo_manage() +CREATE FUNCTION lo_manage() RETURNS pg_catalog.trigger AS 'MODULE_PATHNAME' LANGUAGE C; diff --git a/contrib/ltree/ltree--1.0.sql b/contrib/ltree/ltree--1.0.sql index d9b5ead53a..32969538a0 100644 --- a/contrib/ltree/ltree--1.0.sql +++ b/contrib/ltree/ltree--1.0.sql @@ -1,11 +1,11 @@ /* contrib/ltree/ltree--1.0.sql */ -CREATE OR REPLACE FUNCTION ltree_in(cstring) +CREATE FUNCTION ltree_in(cstring) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ltree_out(ltree) +CREATE FUNCTION ltree_out(ltree) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -19,37 +19,37 @@ CREATE TYPE ltree ( --Compare function for ltree -CREATE OR REPLACE FUNCTION ltree_cmp(ltree,ltree) +CREATE FUNCTION ltree_cmp(ltree,ltree) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_lt(ltree,ltree) +CREATE FUNCTION ltree_lt(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_le(ltree,ltree) +CREATE FUNCTION ltree_le(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_eq(ltree,ltree) +CREATE FUNCTION ltree_eq(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_ge(ltree,ltree) +CREATE FUNCTION ltree_ge(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_gt(ltree,ltree) +CREATE FUNCTION ltree_gt(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_ne(ltree,ltree) +CREATE FUNCTION ltree_ne(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -119,112 +119,112 @@ CREATE OPERATOR <> ( --util functions -CREATE OR REPLACE FUNCTION subltree(ltree,int4,int4) +CREATE FUNCTION subltree(ltree,int4,int4) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION subpath(ltree,int4,int4) +CREATE FUNCTION subpath(ltree,int4,int4) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION subpath(ltree,int4) +CREATE FUNCTION subpath(ltree,int4) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION index(ltree,ltree) +CREATE FUNCTION index(ltree,ltree) RETURNS int4 AS 'MODULE_PATHNAME', 'ltree_index' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION index(ltree,ltree,int4) +CREATE FUNCTION index(ltree,ltree,int4) RETURNS int4 AS 'MODULE_PATHNAME', 'ltree_index' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION nlevel(ltree) +CREATE FUNCTION nlevel(ltree) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree2text(ltree) +CREATE FUNCTION ltree2text(ltree) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION text2ltree(text) +CREATE FUNCTION text2ltree(text) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(_ltree) +CREATE FUNCTION lca(_ltree) RETURNS ltree AS 'MODULE_PATHNAME','_lca' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree) +CREATE FUNCTION lca(ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree,ltree) +CREATE FUNCTION lca(ltree,ltree,ltree,ltree,ltree,ltree,ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_isparent(ltree,ltree) +CREATE FUNCTION ltree_isparent(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_risparent(ltree,ltree) +CREATE FUNCTION ltree_risparent(ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_addltree(ltree,ltree) +CREATE FUNCTION ltree_addltree(ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_addtext(ltree,text) +CREATE FUNCTION ltree_addtext(ltree,text) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltree_textadd(text,ltree) +CREATE FUNCTION ltree_textadd(text,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltreeparentsel(internal, oid, internal, integer) +CREATE FUNCTION ltreeparentsel(internal, oid, internal, integer) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -297,12 +297,12 @@ CREATE OPERATOR CLASS ltree_ops --lquery type -CREATE OR REPLACE FUNCTION lquery_in(cstring) +CREATE FUNCTION lquery_in(cstring) RETURNS lquery AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION lquery_out(lquery) +CREATE FUNCTION lquery_out(lquery) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -314,12 +314,12 @@ CREATE TYPE lquery ( STORAGE = extended ); -CREATE OR REPLACE FUNCTION ltq_regex(ltree,lquery) +CREATE FUNCTION ltq_regex(ltree,lquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltq_rregex(lquery,ltree) +CREATE FUNCTION ltq_rregex(lquery,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -361,12 +361,12 @@ CREATE OPERATOR ^~ ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION lt_q_regex(ltree,_lquery) +CREATE FUNCTION lt_q_regex(ltree,_lquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION lt_q_rregex(_lquery,ltree) +CREATE FUNCTION lt_q_rregex(_lquery,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -408,12 +408,12 @@ CREATE OPERATOR ^? ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION ltxtq_in(cstring) +CREATE FUNCTION ltxtq_in(cstring) RETURNS ltxtquery AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ltxtq_out(ltxtquery) +CREATE FUNCTION ltxtq_out(ltxtquery) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -427,12 +427,12 @@ CREATE TYPE ltxtquery ( -- operations WITH ltxtquery -CREATE OR REPLACE FUNCTION ltxtq_exec(ltree, ltxtquery) +CREATE FUNCTION ltxtq_exec(ltree, ltxtquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION ltxtq_rexec(ltxtquery, ltree) +CREATE FUNCTION ltxtq_rexec(ltxtquery, ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -475,12 +475,12 @@ CREATE OPERATOR ^@ ( ); --GiST support for ltree -CREATE OR REPLACE FUNCTION ltree_gist_in(cstring) +CREATE FUNCTION ltree_gist_in(cstring) RETURNS ltree_gist AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ltree_gist_out(ltree_gist) +CREATE FUNCTION ltree_gist_out(ltree_gist) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -493,25 +493,25 @@ CREATE TYPE ltree_gist ( ); -CREATE OR REPLACE FUNCTION ltree_consistent(internal,internal,int2,oid,internal) +CREATE FUNCTION ltree_consistent(internal,internal,int2,oid,internal) RETURNS bool as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_compress(internal) +CREATE FUNCTION ltree_compress(internal) RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_decompress(internal) +CREATE FUNCTION ltree_decompress(internal) RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_penalty(internal,internal,internal) +CREATE FUNCTION ltree_penalty(internal,internal,internal) RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_picksplit(internal, internal) +CREATE FUNCTION ltree_picksplit(internal, internal) RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_union(internal, internal) +CREATE FUNCTION ltree_union(internal, internal) RETURNS int4 as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION ltree_same(internal, internal, internal) +CREATE FUNCTION ltree_same(internal, internal, internal) RETURNS internal as 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; CREATE OPERATOR CLASS gist_ltree_ops @@ -541,52 +541,52 @@ CREATE OPERATOR CLASS gist_ltree_ops -- arrays of ltree -CREATE OR REPLACE FUNCTION _ltree_isparent(_ltree,ltree) +CREATE FUNCTION _ltree_isparent(_ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltree_r_isparent(ltree,_ltree) +CREATE FUNCTION _ltree_r_isparent(ltree,_ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltree_risparent(_ltree,ltree) +CREATE FUNCTION _ltree_risparent(_ltree,ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltree_r_risparent(ltree,_ltree) +CREATE FUNCTION _ltree_r_risparent(ltree,_ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltq_regex(_ltree,lquery) +CREATE FUNCTION _ltq_regex(_ltree,lquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltq_rregex(lquery,_ltree) +CREATE FUNCTION _ltq_rregex(lquery,_ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _lt_q_regex(_ltree,_lquery) +CREATE FUNCTION _lt_q_regex(_ltree,_lquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _lt_q_rregex(_lquery,_ltree) +CREATE FUNCTION _lt_q_rregex(_lquery,_ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltxtq_exec(_ltree, ltxtquery) +CREATE FUNCTION _ltxtq_exec(_ltree, ltxtquery) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION _ltxtq_rexec(ltxtquery, _ltree) +CREATE FUNCTION _ltxtq_rexec(ltxtquery, _ltree) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -774,7 +774,7 @@ CREATE OPERATOR ^@ ( ); --extractors -CREATE OR REPLACE FUNCTION _ltree_extract_isparent(_ltree,ltree) +CREATE FUNCTION _ltree_extract_isparent(_ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -785,7 +785,7 @@ CREATE OPERATOR ?@> ( PROCEDURE = _ltree_extract_isparent ); -CREATE OR REPLACE FUNCTION _ltree_extract_risparent(_ltree,ltree) +CREATE FUNCTION _ltree_extract_risparent(_ltree,ltree) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -796,7 +796,7 @@ CREATE OPERATOR ?<@ ( PROCEDURE = _ltree_extract_risparent ); -CREATE OR REPLACE FUNCTION _ltq_extract_regex(_ltree,lquery) +CREATE FUNCTION _ltq_extract_regex(_ltree,lquery) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -807,7 +807,7 @@ CREATE OPERATOR ?~ ( PROCEDURE = _ltq_extract_regex ); -CREATE OR REPLACE FUNCTION _ltxtq_extract_exec(_ltree,ltxtquery) +CREATE FUNCTION _ltxtq_extract_exec(_ltree,ltxtquery) RETURNS ltree AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -819,32 +819,32 @@ CREATE OPERATOR ?@ ( ); --GiST support for ltree[] -CREATE OR REPLACE FUNCTION _ltree_consistent(internal,internal,int2,oid,internal) +CREATE FUNCTION _ltree_consistent(internal,internal,int2,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ltree_compress(internal) +CREATE FUNCTION _ltree_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ltree_penalty(internal,internal,internal) +CREATE FUNCTION _ltree_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ltree_picksplit(internal, internal) +CREATE FUNCTION _ltree_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ltree_union(internal, internal) +CREATE FUNCTION _ltree_union(internal, internal) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION _ltree_same(internal, internal, internal) +CREATE FUNCTION _ltree_same(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/pageinspect/pageinspect--1.0.sql b/contrib/pageinspect/pageinspect--1.0.sql index b6e46063ba..b64eb61774 100644 --- a/contrib/pageinspect/pageinspect--1.0.sql +++ b/contrib/pageinspect/pageinspect--1.0.sql @@ -3,12 +3,12 @@ -- -- get_raw_page() -- -CREATE OR REPLACE FUNCTION get_raw_page(text, int4) +CREATE FUNCTION get_raw_page(text, int4) RETURNS bytea AS 'MODULE_PATHNAME', 'get_raw_page' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION get_raw_page(text, text, int4) +CREATE FUNCTION get_raw_page(text, text, int4) RETURNS bytea AS 'MODULE_PATHNAME', 'get_raw_page_fork' LANGUAGE C STRICT; @@ -16,7 +16,7 @@ LANGUAGE C STRICT; -- -- page_header() -- -CREATE OR REPLACE FUNCTION page_header(IN page bytea, +CREATE FUNCTION page_header(IN page bytea, OUT lsn text, OUT tli smallint, OUT flags smallint, @@ -32,7 +32,7 @@ LANGUAGE C STRICT; -- -- heap_page_items() -- -CREATE OR REPLACE FUNCTION heap_page_items(IN page bytea, +CREATE FUNCTION heap_page_items(IN page bytea, OUT lp smallint, OUT lp_off smallint, OUT lp_flags smallint, @@ -53,7 +53,7 @@ LANGUAGE C STRICT; -- -- bt_metap() -- -CREATE OR REPLACE FUNCTION bt_metap(IN relname text, +CREATE FUNCTION bt_metap(IN relname text, OUT magic int4, OUT version int4, OUT root int4, @@ -66,7 +66,7 @@ LANGUAGE C STRICT; -- -- bt_page_stats() -- -CREATE OR REPLACE FUNCTION bt_page_stats(IN relname text, IN blkno int4, +CREATE FUNCTION bt_page_stats(IN relname text, IN blkno int4, OUT blkno int4, OUT type "char", OUT live_items int4, @@ -84,7 +84,7 @@ LANGUAGE C STRICT; -- -- bt_page_items() -- -CREATE OR REPLACE FUNCTION bt_page_items(IN relname text, IN blkno int4, +CREATE FUNCTION bt_page_items(IN relname text, IN blkno int4, OUT itemoffset smallint, OUT ctid tid, OUT itemlen smallint, @@ -98,7 +98,7 @@ LANGUAGE C STRICT; -- -- fsm_page_contents() -- -CREATE OR REPLACE FUNCTION fsm_page_contents(IN page bytea) +CREATE FUNCTION fsm_page_contents(IN page bytea) RETURNS text AS 'MODULE_PATHNAME', 'fsm_page_contents' LANGUAGE C STRICT; diff --git a/contrib/pg_buffercache/pg_buffercache--1.0.sql b/contrib/pg_buffercache/pg_buffercache--1.0.sql index a49d171e04..9407d21410 100644 --- a/contrib/pg_buffercache/pg_buffercache--1.0.sql +++ b/contrib/pg_buffercache/pg_buffercache--1.0.sql @@ -1,7 +1,7 @@ /* contrib/pg_buffercache/pg_buffercache--1.0.sql */ -- Register the function. -CREATE OR REPLACE FUNCTION pg_buffercache_pages() +CREATE FUNCTION pg_buffercache_pages() RETURNS SETOF RECORD AS 'MODULE_PATHNAME', 'pg_buffercache_pages' LANGUAGE C; diff --git a/contrib/pg_freespacemap/pg_freespacemap--1.0.sql b/contrib/pg_freespacemap/pg_freespacemap--1.0.sql index 19f099ee37..d63420e33a 100644 --- a/contrib/pg_freespacemap/pg_freespacemap--1.0.sql +++ b/contrib/pg_freespacemap/pg_freespacemap--1.0.sql @@ -1,13 +1,13 @@ /* contrib/pg_freespacemap/pg_freespacemap--1.0.sql */ -- Register the C function. -CREATE OR REPLACE FUNCTION pg_freespace(regclass, bigint) +CREATE FUNCTION pg_freespace(regclass, bigint) RETURNS int2 AS 'MODULE_PATHNAME', 'pg_freespace' LANGUAGE C STRICT; -- pg_freespace shows the recorded space avail at each block in a relation -CREATE OR REPLACE FUNCTION +CREATE FUNCTION pg_freespace(rel regclass, blkno OUT bigint, avail OUT int2) RETURNS SETOF RECORD AS $$ diff --git a/contrib/pg_trgm/pg_trgm--1.0.sql b/contrib/pg_trgm/pg_trgm--1.0.sql index fc31728dcc..79ea509042 100644 --- a/contrib/pg_trgm/pg_trgm--1.0.sql +++ b/contrib/pg_trgm/pg_trgm--1.0.sql @@ -1,26 +1,26 @@ /* contrib/pg_trgm/pg_trgm--1.0.sql */ -CREATE OR REPLACE FUNCTION set_limit(float4) +CREATE FUNCTION set_limit(float4) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT VOLATILE; -CREATE OR REPLACE FUNCTION show_limit() +CREATE FUNCTION show_limit() RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT STABLE; -CREATE OR REPLACE FUNCTION show_trgm(text) +CREATE FUNCTION show_trgm(text) RETURNS _text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION similarity(text,text) +CREATE FUNCTION similarity(text,text) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION similarity_op(text,text) +CREATE FUNCTION similarity_op(text,text) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT STABLE; -- stable because depends on trgm_limit @@ -34,7 +34,7 @@ CREATE OPERATOR % ( JOIN = contjoinsel ); -CREATE OR REPLACE FUNCTION similarity_dist(text,text) +CREATE FUNCTION similarity_dist(text,text) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -47,12 +47,12 @@ CREATE OPERATOR <-> ( ); -- gist key -CREATE OR REPLACE FUNCTION gtrgm_in(cstring) +CREATE FUNCTION gtrgm_in(cstring) RETURNS gtrgm AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION gtrgm_out(gtrgm) +CREATE FUNCTION gtrgm_out(gtrgm) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT; @@ -64,42 +64,42 @@ CREATE TYPE gtrgm ( ); -- support functions for gist -CREATE OR REPLACE FUNCTION gtrgm_consistent(internal,text,int,oid,internal) +CREATE FUNCTION gtrgm_consistent(internal,text,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_distance(internal,text,int,oid) +CREATE FUNCTION gtrgm_distance(internal,text,int,oid) RETURNS float8 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_compress(internal) +CREATE FUNCTION gtrgm_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_decompress(internal) +CREATE FUNCTION gtrgm_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_penalty(internal,internal,internal) +CREATE FUNCTION gtrgm_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_picksplit(internal, internal) +CREATE FUNCTION gtrgm_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_union(bytea, internal) +CREATE FUNCTION gtrgm_union(bytea, internal) RETURNS _int4 AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gtrgm_same(gtrgm, gtrgm, internal) +CREATE FUNCTION gtrgm_same(gtrgm, gtrgm, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; @@ -123,17 +123,17 @@ AS STORAGE gtrgm; -- support functions for gin -CREATE OR REPLACE FUNCTION gin_extract_value_trgm(text, internal) +CREATE FUNCTION gin_extract_value_trgm(text, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gin_extract_query_trgm(text, internal, int2, internal, internal, internal, internal) +CREATE FUNCTION gin_extract_query_trgm(text, internal, int2, internal, internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gin_trgm_consistent(internal, int2, text, int4, internal, internal, internal, internal) +CREATE FUNCTION gin_trgm_consistent(internal, int2, text, int4, internal, internal, internal, internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/pgcrypto/pgcrypto--1.0.sql b/contrib/pgcrypto/pgcrypto--1.0.sql index 29b489fbe5..52be0950ce 100644 --- a/contrib/pgcrypto/pgcrypto--1.0.sql +++ b/contrib/pgcrypto/pgcrypto--1.0.sql @@ -1,61 +1,61 @@ /* contrib/pgcrypto/pgcrypto--1.0.sql */ -CREATE OR REPLACE FUNCTION digest(text, text) +CREATE FUNCTION digest(text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_digest' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION digest(bytea, text) +CREATE FUNCTION digest(bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_digest' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION hmac(text, text, text) +CREATE FUNCTION hmac(text, text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_hmac' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION hmac(bytea, bytea, text) +CREATE FUNCTION hmac(bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_hmac' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION crypt(text, text) +CREATE FUNCTION crypt(text, text) RETURNS text AS 'MODULE_PATHNAME', 'pg_crypt' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gen_salt(text) +CREATE FUNCTION gen_salt(text) RETURNS text AS 'MODULE_PATHNAME', 'pg_gen_salt' LANGUAGE C VOLATILE STRICT; -CREATE OR REPLACE FUNCTION gen_salt(text, int4) +CREATE FUNCTION gen_salt(text, int4) RETURNS text AS 'MODULE_PATHNAME', 'pg_gen_salt_rounds' LANGUAGE C VOLATILE STRICT; -CREATE OR REPLACE FUNCTION encrypt(bytea, bytea, text) +CREATE FUNCTION encrypt(bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_encrypt' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION decrypt(bytea, bytea, text) +CREATE FUNCTION decrypt(bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_decrypt' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION encrypt_iv(bytea, bytea, bytea, text) +CREATE FUNCTION encrypt_iv(bytea, bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_encrypt_iv' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION decrypt_iv(bytea, bytea, bytea, text) +CREATE FUNCTION decrypt_iv(bytea, bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_decrypt_iv' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gen_random_bytes(int4) +CREATE FUNCTION gen_random_bytes(int4) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_random_bytes' LANGUAGE 'C' VOLATILE STRICT; @@ -63,12 +63,12 @@ LANGUAGE 'C' VOLATILE STRICT; -- -- pgp_sym_encrypt(data, key) -- -CREATE OR REPLACE FUNCTION pgp_sym_encrypt(text, text) +CREATE FUNCTION pgp_sym_encrypt(text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_encrypt_text' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgp_sym_encrypt_bytea(bytea, text) +CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_encrypt_bytea' LANGUAGE C STRICT; @@ -76,12 +76,12 @@ LANGUAGE C STRICT; -- -- pgp_sym_encrypt(data, key, args) -- -CREATE OR REPLACE FUNCTION pgp_sym_encrypt(text, text, text) +CREATE FUNCTION pgp_sym_encrypt(text, text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_encrypt_text' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) +CREATE FUNCTION pgp_sym_encrypt_bytea(bytea, text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_encrypt_bytea' LANGUAGE C STRICT; @@ -89,12 +89,12 @@ LANGUAGE C STRICT; -- -- pgp_sym_decrypt(data, key) -- -CREATE OR REPLACE FUNCTION pgp_sym_decrypt(bytea, text) +CREATE FUNCTION pgp_sym_decrypt(bytea, text) RETURNS text AS 'MODULE_PATHNAME', 'pgp_sym_decrypt_text' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION pgp_sym_decrypt_bytea(bytea, text) +CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_decrypt_bytea' LANGUAGE C IMMUTABLE STRICT; @@ -102,12 +102,12 @@ LANGUAGE C IMMUTABLE STRICT; -- -- pgp_sym_decrypt(data, key, args) -- -CREATE OR REPLACE FUNCTION pgp_sym_decrypt(bytea, text, text) +CREATE FUNCTION pgp_sym_decrypt(bytea, text, text) RETURNS text AS 'MODULE_PATHNAME', 'pgp_sym_decrypt_text' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) +CREATE FUNCTION pgp_sym_decrypt_bytea(bytea, text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_sym_decrypt_bytea' LANGUAGE C IMMUTABLE STRICT; @@ -115,12 +115,12 @@ LANGUAGE C IMMUTABLE STRICT; -- -- pgp_pub_encrypt(data, key) -- -CREATE OR REPLACE FUNCTION pgp_pub_encrypt(text, bytea) +CREATE FUNCTION pgp_pub_encrypt(text, bytea) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_encrypt_text' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) +CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_encrypt_bytea' LANGUAGE C STRICT; @@ -128,12 +128,12 @@ LANGUAGE C STRICT; -- -- pgp_pub_encrypt(data, key, args) -- -CREATE OR REPLACE FUNCTION pgp_pub_encrypt(text, bytea, text) +CREATE FUNCTION pgp_pub_encrypt(text, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_encrypt_text' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) +CREATE FUNCTION pgp_pub_encrypt_bytea(bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_encrypt_bytea' LANGUAGE C STRICT; @@ -141,12 +141,12 @@ LANGUAGE C STRICT; -- -- pgp_pub_decrypt(data, key) -- -CREATE OR REPLACE FUNCTION pgp_pub_decrypt(bytea, bytea) +CREATE FUNCTION pgp_pub_decrypt(bytea, bytea) RETURNS text AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_text' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) +CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_bytea' LANGUAGE C IMMUTABLE STRICT; @@ -154,12 +154,12 @@ LANGUAGE C IMMUTABLE STRICT; -- -- pgp_pub_decrypt(data, key, psw) -- -CREATE OR REPLACE FUNCTION pgp_pub_decrypt(bytea, bytea, text) +CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text) RETURNS text AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_text' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) +CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_bytea' LANGUAGE C IMMUTABLE STRICT; @@ -167,12 +167,12 @@ LANGUAGE C IMMUTABLE STRICT; -- -- pgp_pub_decrypt(data, key, psw, arg) -- -CREATE OR REPLACE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) +CREATE FUNCTION pgp_pub_decrypt(bytea, bytea, text, text) RETURNS text AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_text' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) +CREATE FUNCTION pgp_pub_decrypt_bytea(bytea, bytea, text, text) RETURNS bytea AS 'MODULE_PATHNAME', 'pgp_pub_decrypt_bytea' LANGUAGE C IMMUTABLE STRICT; @@ -180,7 +180,7 @@ LANGUAGE C IMMUTABLE STRICT; -- -- PGP key ID -- -CREATE OR REPLACE FUNCTION pgp_key_id(bytea) +CREATE FUNCTION pgp_key_id(bytea) RETURNS text AS 'MODULE_PATHNAME', 'pgp_key_id_w' LANGUAGE C IMMUTABLE STRICT; @@ -188,12 +188,12 @@ LANGUAGE C IMMUTABLE STRICT; -- -- pgp armor -- -CREATE OR REPLACE FUNCTION armor(bytea) +CREATE FUNCTION armor(bytea) RETURNS text AS 'MODULE_PATHNAME', 'pg_armor' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION dearmor(text) +CREATE FUNCTION dearmor(text) RETURNS bytea AS 'MODULE_PATHNAME', 'pg_dearmor' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/pgrowlocks/pgrowlocks--1.0.sql b/contrib/pgrowlocks/pgrowlocks--1.0.sql index 8b5fc9a1c8..0b60fdcd07 100644 --- a/contrib/pgrowlocks/pgrowlocks--1.0.sql +++ b/contrib/pgrowlocks/pgrowlocks--1.0.sql @@ -1,6 +1,6 @@ /* contrib/pgrowlocks/pgrowlocks--1.0.sql */ -CREATE OR REPLACE FUNCTION pgrowlocks(IN relname text, +CREATE FUNCTION pgrowlocks(IN relname text, OUT locked_row TID, -- row TID OUT lock_type TEXT, -- lock type OUT locker XID, -- locking XID diff --git a/contrib/pgstattuple/pgstattuple--1.0.sql b/contrib/pgstattuple/pgstattuple--1.0.sql index 84b91dda0a..83445ec4ae 100644 --- a/contrib/pgstattuple/pgstattuple--1.0.sql +++ b/contrib/pgstattuple/pgstattuple--1.0.sql @@ -1,6 +1,6 @@ /* contrib/pgstattuple/pgstattuple--1.0.sql */ -CREATE OR REPLACE FUNCTION pgstattuple(IN relname text, +CREATE FUNCTION pgstattuple(IN relname text, OUT table_len BIGINT, -- physical table length in bytes OUT tuple_count BIGINT, -- number of live tuples OUT tuple_len BIGINT, -- total tuples length in bytes @@ -13,7 +13,7 @@ CREATE OR REPLACE FUNCTION pgstattuple(IN relname text, AS 'MODULE_PATHNAME', 'pgstattuple' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgstattuple(IN reloid oid, +CREATE FUNCTION pgstattuple(IN reloid oid, OUT table_len BIGINT, -- physical table length in bytes OUT tuple_count BIGINT, -- number of live tuples OUT tuple_len BIGINT, -- total tuples length in bytes @@ -26,7 +26,7 @@ CREATE OR REPLACE FUNCTION pgstattuple(IN reloid oid, AS 'MODULE_PATHNAME', 'pgstattuplebyid' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pgstatindex(IN relname text, +CREATE FUNCTION pgstatindex(IN relname text, OUT version INT, OUT tree_level INT, OUT index_size BIGINT, @@ -40,7 +40,7 @@ CREATE OR REPLACE FUNCTION pgstatindex(IN relname text, AS 'MODULE_PATHNAME', 'pgstatindex' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION pg_relpages(IN relname text) +CREATE FUNCTION pg_relpages(IN relname text) RETURNS BIGINT AS 'MODULE_PATHNAME', 'pg_relpages' LANGUAGE C STRICT; diff --git a/contrib/seg/seg--1.0.sql b/contrib/seg/seg--1.0.sql index 02d8ffadb0..563411da6a 100644 --- a/contrib/seg/seg--1.0.sql +++ b/contrib/seg/seg--1.0.sql @@ -2,12 +2,12 @@ -- Create the user-defined type for 1-D floating point intervals (seg) -CREATE OR REPLACE FUNCTION seg_in(cstring) +CREATE FUNCTION seg_in(cstring) RETURNS seg AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION seg_out(seg) +CREATE FUNCTION seg_out(seg) RETURNS cstring AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -27,7 +27,7 @@ COMMENT ON TYPE seg IS -- Left/Right methods -CREATE OR REPLACE FUNCTION seg_over_left(seg, seg) +CREATE FUNCTION seg_over_left(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -35,7 +35,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_over_left(seg, seg) IS 'overlaps or is left of'; -CREATE OR REPLACE FUNCTION seg_over_right(seg, seg) +CREATE FUNCTION seg_over_right(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -43,7 +43,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_over_right(seg, seg) IS 'overlaps or is right of'; -CREATE OR REPLACE FUNCTION seg_left(seg, seg) +CREATE FUNCTION seg_left(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -51,7 +51,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_left(seg, seg) IS 'is left of'; -CREATE OR REPLACE FUNCTION seg_right(seg, seg) +CREATE FUNCTION seg_right(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -62,7 +62,7 @@ COMMENT ON FUNCTION seg_right(seg, seg) IS -- Scalar comparison methods -CREATE OR REPLACE FUNCTION seg_lt(seg, seg) +CREATE FUNCTION seg_lt(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -70,7 +70,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_lt(seg, seg) IS 'less than'; -CREATE OR REPLACE FUNCTION seg_le(seg, seg) +CREATE FUNCTION seg_le(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -78,7 +78,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_le(seg, seg) IS 'less than or equal'; -CREATE OR REPLACE FUNCTION seg_gt(seg, seg) +CREATE FUNCTION seg_gt(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -86,7 +86,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_gt(seg, seg) IS 'greater than'; -CREATE OR REPLACE FUNCTION seg_ge(seg, seg) +CREATE FUNCTION seg_ge(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -94,7 +94,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_ge(seg, seg) IS 'greater than or equal'; -CREATE OR REPLACE FUNCTION seg_contains(seg, seg) +CREATE FUNCTION seg_contains(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -102,7 +102,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_contains(seg, seg) IS 'contains'; -CREATE OR REPLACE FUNCTION seg_contained(seg, seg) +CREATE FUNCTION seg_contained(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -110,7 +110,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_contained(seg, seg) IS 'contained in'; -CREATE OR REPLACE FUNCTION seg_overlap(seg, seg) +CREATE FUNCTION seg_overlap(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -118,7 +118,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_overlap(seg, seg) IS 'overlaps'; -CREATE OR REPLACE FUNCTION seg_same(seg, seg) +CREATE FUNCTION seg_same(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -126,7 +126,7 @@ LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_same(seg, seg) IS 'same as'; -CREATE OR REPLACE FUNCTION seg_different(seg, seg) +CREATE FUNCTION seg_different(seg, seg) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -136,41 +136,41 @@ COMMENT ON FUNCTION seg_different(seg, seg) IS -- support routines for indexing -CREATE OR REPLACE FUNCTION seg_cmp(seg, seg) +CREATE FUNCTION seg_cmp(seg, seg) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; COMMENT ON FUNCTION seg_cmp(seg, seg) IS 'btree comparison function'; -CREATE OR REPLACE FUNCTION seg_union(seg, seg) +CREATE FUNCTION seg_union(seg, seg) RETURNS seg AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION seg_inter(seg, seg) +CREATE FUNCTION seg_inter(seg, seg) RETURNS seg AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION seg_size(seg) +CREATE FUNCTION seg_size(seg) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -- miscellaneous -CREATE OR REPLACE FUNCTION seg_center(seg) +CREATE FUNCTION seg_center(seg) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION seg_upper(seg) +CREATE FUNCTION seg_upper(seg) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION seg_lower(seg) +CREATE FUNCTION seg_lower(seg) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; @@ -323,37 +323,37 @@ CREATE OPERATOR ~ ( -- define the GiST support methods -CREATE OR REPLACE FUNCTION gseg_consistent(internal,seg,int,oid,internal) +CREATE FUNCTION gseg_consistent(internal,seg,int,oid,internal) RETURNS bool AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_compress(internal) +CREATE FUNCTION gseg_compress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_decompress(internal) +CREATE FUNCTION gseg_decompress(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_penalty(internal,internal,internal) +CREATE FUNCTION gseg_penalty(internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_picksplit(internal, internal) +CREATE FUNCTION gseg_picksplit(internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_union(internal, internal) +CREATE FUNCTION gseg_union(internal, internal) RETURNS seg AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; -CREATE OR REPLACE FUNCTION gseg_same(seg, seg, internal) +CREATE FUNCTION gseg_same(seg, seg, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/spi/autoinc--1.0.sql b/contrib/spi/autoinc--1.0.sql index bf5ecab08b..9c9df9ce0b 100644 --- a/contrib/spi/autoinc--1.0.sql +++ b/contrib/spi/autoinc--1.0.sql @@ -1,6 +1,6 @@ /* contrib/spi/autoinc--1.0.sql */ -CREATE OR REPLACE FUNCTION autoinc() +CREATE FUNCTION autoinc() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; diff --git a/contrib/spi/insert_username--1.0.sql b/contrib/spi/insert_username--1.0.sql index 3867c57a2c..bd854587e0 100644 --- a/contrib/spi/insert_username--1.0.sql +++ b/contrib/spi/insert_username--1.0.sql @@ -1,6 +1,6 @@ /* contrib/spi/insert_username--1.0.sql */ -CREATE OR REPLACE FUNCTION insert_username() +CREATE FUNCTION insert_username() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; diff --git a/contrib/spi/moddatetime--1.0.sql b/contrib/spi/moddatetime--1.0.sql index 00971c9fe1..97cc63289f 100644 --- a/contrib/spi/moddatetime--1.0.sql +++ b/contrib/spi/moddatetime--1.0.sql @@ -1,6 +1,6 @@ /* contrib/spi/moddatetime--1.0.sql */ -CREATE OR REPLACE FUNCTION moddatetime() +CREATE FUNCTION moddatetime() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; diff --git a/contrib/spi/refint--1.0.sql b/contrib/spi/refint--1.0.sql index 5a50226c43..9e5d931df5 100644 --- a/contrib/spi/refint--1.0.sql +++ b/contrib/spi/refint--1.0.sql @@ -1,11 +1,11 @@ /* contrib/spi/refint--1.0.sql */ -CREATE OR REPLACE FUNCTION check_primary_key() +CREATE FUNCTION check_primary_key() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; -CREATE OR REPLACE FUNCTION check_foreign_key() +CREATE FUNCTION check_foreign_key() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; diff --git a/contrib/spi/timetravel--1.0.sql b/contrib/spi/timetravel--1.0.sql index c9f786218f..b68cf2f247 100644 --- a/contrib/spi/timetravel--1.0.sql +++ b/contrib/spi/timetravel--1.0.sql @@ -1,16 +1,16 @@ /* contrib/spi/timetravel--1.0.sql */ -CREATE OR REPLACE FUNCTION timetravel() +CREATE FUNCTION timetravel() RETURNS trigger AS 'MODULE_PATHNAME' LANGUAGE C; -CREATE OR REPLACE FUNCTION set_timetravel(name, int4) +CREATE FUNCTION set_timetravel(name, int4) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C RETURNS NULL ON NULL INPUT; -CREATE OR REPLACE FUNCTION get_timetravel(name) +CREATE FUNCTION get_timetravel(name) RETURNS int4 AS 'MODULE_PATHNAME' LANGUAGE C RETURNS NULL ON NULL INPUT; diff --git a/contrib/sslinfo/sslinfo--1.0.sql b/contrib/sslinfo/sslinfo--1.0.sql index 37007e59f7..ef745a0a2e 100644 --- a/contrib/sslinfo/sslinfo--1.0.sql +++ b/contrib/sslinfo/sslinfo--1.0.sql @@ -1,37 +1,37 @@ /* contrib/sslinfo/sslinfo--1.0.sql */ -CREATE OR REPLACE FUNCTION ssl_client_serial() RETURNS numeric +CREATE FUNCTION ssl_client_serial() RETURNS numeric AS 'MODULE_PATHNAME', 'ssl_client_serial' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_is_used() RETURNS boolean +CREATE FUNCTION ssl_is_used() RETURNS boolean AS 'MODULE_PATHNAME', 'ssl_is_used' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_version() RETURNS text +CREATE FUNCTION ssl_version() RETURNS text AS 'MODULE_PATHNAME', 'ssl_version' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_cipher() RETURNS text +CREATE FUNCTION ssl_cipher() RETURNS text AS 'MODULE_PATHNAME', 'ssl_cipher' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_client_cert_present() RETURNS boolean +CREATE FUNCTION ssl_client_cert_present() RETURNS boolean AS 'MODULE_PATHNAME', 'ssl_client_cert_present' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_client_dn_field(text) RETURNS text +CREATE FUNCTION ssl_client_dn_field(text) RETURNS text AS 'MODULE_PATHNAME', 'ssl_client_dn_field' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_issuer_field(text) RETURNS text +CREATE FUNCTION ssl_issuer_field(text) RETURNS text AS 'MODULE_PATHNAME', 'ssl_issuer_field' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_client_dn() RETURNS text +CREATE FUNCTION ssl_client_dn() RETURNS text AS 'MODULE_PATHNAME', 'ssl_client_dn' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION ssl_issuer_dn() RETURNS text +CREATE FUNCTION ssl_issuer_dn() RETURNS text AS 'MODULE_PATHNAME', 'ssl_issuer_dn' LANGUAGE C STRICT; diff --git a/contrib/tablefunc/tablefunc--1.0.sql b/contrib/tablefunc/tablefunc--1.0.sql index 63dd8c4634..7bf117cb5c 100644 --- a/contrib/tablefunc/tablefunc--1.0.sql +++ b/contrib/tablefunc/tablefunc--1.0.sql @@ -1,12 +1,12 @@ /* contrib/tablefunc/tablefunc--1.0.sql */ -CREATE OR REPLACE FUNCTION normal_rand(int4, float8, float8) +CREATE FUNCTION normal_rand(int4, float8, float8) RETURNS setof float8 AS 'MODULE_PATHNAME','normal_rand' LANGUAGE C VOLATILE STRICT; -- the generic crosstab function: -CREATE OR REPLACE FUNCTION crosstab(text) +CREATE FUNCTION crosstab(text) RETURNS setof record AS 'MODULE_PATHNAME','crosstab' LANGUAGE C STABLE STRICT; @@ -36,50 +36,50 @@ CREATE TYPE tablefunc_crosstab_4 AS category_4 TEXT ); -CREATE OR REPLACE FUNCTION crosstab2(text) +CREATE FUNCTION crosstab2(text) RETURNS setof tablefunc_crosstab_2 AS 'MODULE_PATHNAME','crosstab' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION crosstab3(text) +CREATE FUNCTION crosstab3(text) RETURNS setof tablefunc_crosstab_3 AS 'MODULE_PATHNAME','crosstab' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION crosstab4(text) +CREATE FUNCTION crosstab4(text) RETURNS setof tablefunc_crosstab_4 AS 'MODULE_PATHNAME','crosstab' LANGUAGE C STABLE STRICT; -- obsolete: -CREATE OR REPLACE FUNCTION crosstab(text,int) +CREATE FUNCTION crosstab(text,int) RETURNS setof record AS 'MODULE_PATHNAME','crosstab' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION crosstab(text,text) +CREATE FUNCTION crosstab(text,text) RETURNS setof record AS 'MODULE_PATHNAME','crosstab_hash' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION connectby(text,text,text,text,int,text) +CREATE FUNCTION connectby(text,text,text,text,int,text) RETURNS setof record AS 'MODULE_PATHNAME','connectby_text' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION connectby(text,text,text,text,int) +CREATE FUNCTION connectby(text,text,text,text,int) RETURNS setof record AS 'MODULE_PATHNAME','connectby_text' LANGUAGE C STABLE STRICT; -- These 2 take the name of a field to ORDER BY as 4th arg (for sorting siblings) -CREATE OR REPLACE FUNCTION connectby(text,text,text,text,text,int,text) +CREATE FUNCTION connectby(text,text,text,text,text,int,text) RETURNS setof record AS 'MODULE_PATHNAME','connectby_text_serial' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION connectby(text,text,text,text,text,int) +CREATE FUNCTION connectby(text,text,text,text,text,int) RETURNS setof record AS 'MODULE_PATHNAME','connectby_text_serial' LANGUAGE C STABLE STRICT; diff --git a/contrib/test_parser/test_parser--1.0.sql b/contrib/test_parser/test_parser--1.0.sql index fb785a1c4a..5b8b04bb05 100644 --- a/contrib/test_parser/test_parser--1.0.sql +++ b/contrib/test_parser/test_parser--1.0.sql @@ -1,21 +1,21 @@ /* contrib/test_parser/test_parser--1.0.sql */ -CREATE OR REPLACE FUNCTION testprs_start(internal, int4) +CREATE FUNCTION testprs_start(internal, int4) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION testprs_getlexeme(internal, internal, internal) +CREATE FUNCTION testprs_getlexeme(internal, internal, internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION testprs_end(internal) +CREATE FUNCTION testprs_end(internal) RETURNS void AS 'MODULE_PATHNAME' LANGUAGE C STRICT; -CREATE OR REPLACE FUNCTION testprs_lextype(internal) +CREATE FUNCTION testprs_lextype(internal) RETURNS internal AS 'MODULE_PATHNAME' LANGUAGE C STRICT; diff --git a/contrib/tsearch2/tsearch2--1.0.sql b/contrib/tsearch2/tsearch2--1.0.sql index 40386a4c2a..369507e8f5 100644 --- a/contrib/tsearch2/tsearch2--1.0.sql +++ b/contrib/tsearch2/tsearch2--1.0.sql @@ -435,7 +435,7 @@ create type tsdebug as ( "tsvector" tsvector ); -CREATE or replace FUNCTION _get_parser_from_curcfg() +CREATE FUNCTION _get_parser_from_curcfg() RETURNS text as $$select prsname::text from pg_catalog.pg_ts_parser p join pg_ts_config c on cfgparser = p.oid where c.oid = show_curcfg();$$ LANGUAGE SQL RETURNS NULL ON NULL INPUT IMMUTABLE; @@ -461,25 +461,25 @@ where t.tokid = p.tokid $$ LANGUAGE SQL RETURNS NULL ON NULL INPUT; -CREATE OR REPLACE FUNCTION numnode(tsquery) +CREATE FUNCTION numnode(tsquery) RETURNS int4 as 'tsquery_numnode' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION tsquery_and(tsquery,tsquery) +CREATE FUNCTION tsquery_and(tsquery,tsquery) RETURNS tsquery as 'tsquery_and' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION tsquery_or(tsquery,tsquery) +CREATE FUNCTION tsquery_or(tsquery,tsquery) RETURNS tsquery as 'tsquery_or' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION tsquery_not(tsquery) +CREATE FUNCTION tsquery_not(tsquery) RETURNS tsquery as 'tsquery_not' LANGUAGE INTERNAL @@ -487,24 +487,24 @@ CREATE OR REPLACE FUNCTION tsquery_not(tsquery) --------------rewrite subsystem -CREATE OR REPLACE FUNCTION rewrite(tsquery, text) +CREATE FUNCTION rewrite(tsquery, text) RETURNS tsquery as 'tsquery_rewrite_query' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION rewrite(tsquery, tsquery, tsquery) +CREATE FUNCTION rewrite(tsquery, tsquery, tsquery) RETURNS tsquery as 'tsquery_rewrite' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION rewrite_accum(tsquery,tsquery[]) +CREATE FUNCTION rewrite_accum(tsquery,tsquery[]) RETURNS tsquery AS 'MODULE_PATHNAME', 'tsa_rewrite_accum' LANGUAGE C; -CREATE OR REPLACE FUNCTION rewrite_finish(tsquery) +CREATE FUNCTION rewrite_finish(tsquery) RETURNS tsquery as 'MODULE_PATHNAME', 'tsa_rewrite_finish' LANGUAGE C; @@ -516,13 +516,13 @@ CREATE AGGREGATE rewrite ( FINALFUNC = rewrite_finish ); -CREATE OR REPLACE FUNCTION tsq_mcontains(tsquery, tsquery) +CREATE FUNCTION tsq_mcontains(tsquery, tsquery) RETURNS bool as 'tsq_mcontains' LANGUAGE INTERNAL RETURNS NULL ON NULL INPUT IMMUTABLE; -CREATE OR REPLACE FUNCTION tsq_mcontained(tsquery, tsquery) +CREATE FUNCTION tsq_mcontained(tsquery, tsquery) RETURNS bool as 'tsq_mcontained' LANGUAGE INTERNAL diff --git a/contrib/unaccent/unaccent--1.0.sql b/contrib/unaccent/unaccent--1.0.sql index 4dc9c3d9c6..b5909e0b55 100644 --- a/contrib/unaccent/unaccent--1.0.sql +++ b/contrib/unaccent/unaccent--1.0.sql @@ -1,21 +1,21 @@ /* contrib/unaccent/unaccent--1.0.sql */ -CREATE OR REPLACE FUNCTION unaccent(regdictionary, text) +CREATE FUNCTION unaccent(regdictionary, text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION unaccent(text) +CREATE FUNCTION unaccent(text) RETURNS text AS 'MODULE_PATHNAME', 'unaccent_dict' LANGUAGE C STABLE STRICT; -CREATE OR REPLACE FUNCTION unaccent_init(internal) +CREATE FUNCTION unaccent_init(internal) RETURNS internal AS 'MODULE_PATHNAME', 'unaccent_init' LANGUAGE C; -CREATE OR REPLACE FUNCTION unaccent_lexize(internal,internal,internal,internal) +CREATE FUNCTION unaccent_lexize(internal,internal,internal,internal) RETURNS internal AS 'MODULE_PATHNAME', 'unaccent_lexize' LANGUAGE C; diff --git a/contrib/uuid-ossp/uuid-ossp--1.0.sql b/contrib/uuid-ossp/uuid-ossp--1.0.sql index 34b32de77e..43ae0b38a0 100644 --- a/contrib/uuid-ossp/uuid-ossp--1.0.sql +++ b/contrib/uuid-ossp/uuid-ossp--1.0.sql @@ -1,51 +1,51 @@ /* contrib/uuid-ossp/uuid-ossp--1.0.sql */ -CREATE OR REPLACE FUNCTION uuid_nil() +CREATE FUNCTION uuid_nil() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_nil' IMMUTABLE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_ns_dns() +CREATE FUNCTION uuid_ns_dns() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_ns_dns' IMMUTABLE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_ns_url() +CREATE FUNCTION uuid_ns_url() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_ns_url' IMMUTABLE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_ns_oid() +CREATE FUNCTION uuid_ns_oid() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_ns_oid' IMMUTABLE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_ns_x500() +CREATE FUNCTION uuid_ns_x500() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_ns_x500' IMMUTABLE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_generate_v1() +CREATE FUNCTION uuid_generate_v1() RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_generate_v1' VOLATILE STRICT LANGUAGE C; -CREATE OR REPLACE FUNCTION uuid_generate_v1mc() +CREATE 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) +CREATE 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() +CREATE 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) +CREATE FUNCTION uuid_generate_v5(namespace uuid, name text) RETURNS uuid AS 'MODULE_PATHNAME', 'uuid_generate_v5' IMMUTABLE STRICT LANGUAGE C; diff --git a/contrib/xml2/xml2--1.0.sql b/contrib/xml2/xml2--1.0.sql index 100f57291f..bc27dc89ca 100644 --- a/contrib/xml2/xml2--1.0.sql +++ b/contrib/xml2/xml2--1.0.sql @@ -3,68 +3,68 @@ --SQL for XML parser -- deprecated old name for xml_is_well_formed -CREATE OR REPLACE FUNCTION xml_valid(text) RETURNS bool +CREATE FUNCTION xml_valid(text) RETURNS bool AS 'xml_is_well_formed' LANGUAGE INTERNAL STRICT STABLE; -CREATE OR REPLACE FUNCTION xml_encode_special_chars(text) RETURNS text +CREATE FUNCTION xml_encode_special_chars(text) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION xpath_string(text,text) RETURNS text +CREATE FUNCTION xpath_string(text,text) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text +CREATE FUNCTION xpath_nodeset(text,text,text,text) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION xpath_number(text,text) RETURNS float4 +CREATE FUNCTION xpath_number(text,text) RETURNS float4 AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION xpath_bool(text,text) RETURNS boolean +CREATE FUNCTION xpath_bool(text,text) RETURNS boolean AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -- List function -CREATE OR REPLACE FUNCTION xpath_list(text,text,text) RETURNS text +CREATE FUNCTION xpath_list(text,text,text) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -CREATE OR REPLACE FUNCTION xpath_list(text,text) RETURNS text +CREATE 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) +CREATE 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) +CREATE 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) +CREATE FUNCTION xpath_table(text,text,text,text,text) RETURNS setof record AS 'MODULE_PATHNAME' LANGUAGE C STRICT STABLE; -- XSLT functions -CREATE OR REPLACE FUNCTION xslt_process(text,text,text) +CREATE 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) +CREATE FUNCTION xslt_process(text,text) RETURNS text AS 'MODULE_PATHNAME' LANGUAGE C STRICT IMMUTABLE; -- 2.40.0