Last active
March 29, 2022 14:05
-
-
Save vadv/101e1576156268c501a8 to your computer and use it in GitHub Desktop.
1c init db: dropdb test; createdb test; psql test -f 1c.sql -v ON_ERROR_STOP=1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET SESSION default_with_oids = on; | |
SET client_min_messages=error; | |
SET lc_messages to 'en_US.UTF-8'; | |
SET enable_mergejoin = off; | |
show standard_conforming_strings; | |
SET escape_string_warning = off; | |
select pg_backend_pid(); | |
set client_encoding = 'utf8'; | |
select spcname from pg_tablespace where spcname = 'v81c_index' or spcname = 'v81c_data'; | |
SET SESSION default_with_oids = on; | |
SET client_min_messages=error; | |
SET lc_messages to 'en_US.UTF-8'; | |
SET enable_mergejoin = off; | |
show standard_conforming_strings; | |
SET escape_string_warning = off; | |
select pg_backend_pid(); | |
set client_encoding = 'utf8'; | |
select spcname from pg_tablespace where spcname = 'v81c_index' or spcname = 'v81c_data'; | |
SET SESSION default_with_oids = on; SET client_min_messages=error; | |
SET lc_messages to 'en_US.UTF-8'; | |
SET enable_mergejoin = off; | |
show standard_conforming_strings; | |
SET escape_string_warning = off; | |
select pg_backend_pid(); | |
set client_encoding = 'utf8'; | |
SET SESSION default_with_oids = on; | |
SET client_min_messages=error; | |
SET lc_messages to 'en_US.UTF-8'; | |
SET enable_mergejoin = off; | |
show standard_conforming_strings; | |
SET escape_string_warning = off; | |
select pg_backend_pid(); | |
set client_encoding = 'utf8'; | |
CREATE OR REPLACE FUNCTION plpgsql_call_handler() RETURNS language_handler AS '$libdir/plpgsql' LANGUAGE C; | |
SHOW SERVER_VERSION; | |
CREATE OR REPLACE FUNCTION public.datediff(varchar, timestamp, timestamp) | |
RETURNS int4 AS | |
' | |
DECLARE | |
arg_mode alias for $1; | |
arg_d2 alias for $2; | |
arg_d1 alias for $3; | |
BEGIN | |
if arg_mode = \'SECOND\' then | |
return date_part(\'epoch\',arg_d1) - date_part(\'epoch\',arg_d2) ; | |
elsif arg_mode = \'MINUTE\' then | |
return floor((date_part(\'epoch\',arg_d1) - date_part(\'epoch\',arg_d2)) / 60); | |
elsif arg_mode = \'HOUR\' then | |
return floor((date_part(\'epoch\',arg_d1) - date_part(\'epoch\',arg_d2)) /3600); | |
elsif arg_mode = \'DAY\' then | |
return cast(arg_d1 as date) - cast(arg_d2 as date); | |
elsif arg_mode = \'WEEK\' then | |
return floor( ( cast(arg_d1 as date) - cast(arg_d2 as date) ) / 7.0); | |
elsif arg_mode = \'MONTH\' then | |
return 12 * (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2)) | |
+ date_part(\'month\',arg_d1) - date_part(\'month\',arg_d2); | |
elsif arg_mode = \'QUARTER\' then | |
return 4 * (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2)) | |
+ date_part(\'quarter\',arg_d1) - date_part(\'quarter\',arg_d2); | |
elsif arg_mode = \'YEAR\' then | |
return (date_part(\'year\',arg_d1) - date_part(\'year\',arg_d2)); | |
end if; | |
END | |
' | |
LANGUAGE 'plpgsql' VOLATILE; | |
create or replace function state_max_bytea(st bytea, inp bytea) RETURNS bytea as ' | |
BEGIN | |
if st is null | |
then | |
return inp; | |
elseif st<inp then | |
return inp; | |
else | |
return st; | |
end if; | |
END;' LANGUAGE plpgsql; | |
create or replace function state_min_bytea(st bytea, inp bytea) RETURNS bytea as ' | |
BEGIN | |
if st is null | |
then | |
return inp; | |
elseif st>inp then | |
return inp; | |
else | |
return st; | |
end if; | |
END;' LANGUAGE plpgsql; | |
create or replace function state_max_bool(st bool, inp bool) RETURNS bool as '\n BEGIN | |
if st is null or not st | |
then | |
return inp; | |
else | |
return true; | |
end if; | |
END;' LANGUAGE plpgsql; | |
create or replace function state_min_bool(st bool, inp bool) RETURNS bool as ' | |
BEGIN | |
if st is null or st | |
then | |
return inp; | |
else | |
return false; | |
end if; | |
END;' LANGUAGE plpgsql; | |
CREATE OR REPLACE FUNCTION btrim(bdata bytea, blen int) RETURNS bytea AS $BODY$ | |
DECLARE | |
ln int; | |
res bytea; | |
BEGIN | |
ln := length(bdata); | |
if ln < blen then | |
res := bdata; | |
for i in ln .. blen - 1 | |
loop | |
res := res || '\\000'; | |
end loop; | |
return res; | |
elsif ln > blen then | |
return substring(bdata from 1 for blen); | |
else | |
return bdata; | |
end if; | |
END;$BODY$ LANGUAGE 'plpgsql'; | |
CREATE OR REPLACE FUNCTION BINROWVER(P1 INT4) RETURNS BYTEA AS $BODY$ | |
DECLARE | |
bytearea BYTEA; | |
BEGIN | |
bytearea := SET_BYTE('\\000\\000\\000\\000\\000\\000\\000\\000'::bytea, 4, MOD(P1 / 16777216, 256)); | |
bytearea := SET_BYTE(bytearea, 5, MOD(P1 / 65536, 256)); | |
bytearea := SET_BYTE(bytearea, 6, MOD(P1 / 256, 256)); | |
bytearea := SET_BYTE(bytearea, 7, MOD(P1, 256)); | |
RETURN bytearea; | |
END;$BODY$ LANGUAGE 'plpgsql'; | |
CREATE FUNCTION mchartypmod_in(cstring[]) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchartypmod_out(int4) | |
RETURNS cstring | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_in(cstring) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_out(mchar) | |
RETURNS cstring | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_send(mchar) | |
RETURNS bytea | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_recv(internal) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE TYPE mchar ( | |
INTERNALLENGTH = -1, | |
INPUT = mchar_in, | |
OUTPUT = mchar_out, | |
TYPMOD_IN = mchartypmod_in, | |
TYPMOD_OUT = mchartypmod_out, | |
RECEIVE = mchar_recv, | |
SEND = mchar_send, | |
STORAGE = extended | |
); | |
CREATE FUNCTION mchar(mchar, integer, boolean) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE CAST (mchar as mchar) | |
WITH FUNCTION mchar(mchar, integer, boolean) as IMPLICIT; | |
CREATE FUNCTION mvarchar_in(cstring) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_out(mvarchar) | |
RETURNS cstring | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_send(mvarchar) | |
RETURNS bytea | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_recv(internal) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE TYPE mvarchar ( | |
INTERNALLENGTH = -1, | |
INPUT = mvarchar_in, | |
OUTPUT = mvarchar_out, | |
TYPMOD_IN = mchartypmod_in, | |
TYPMOD_OUT = mchartypmod_out, | |
RECEIVE = mvarchar_recv, | |
SEND = mvarchar_send, | |
STORAGE = extended | |
); | |
CREATE FUNCTION mvarchar(mvarchar, integer, boolean) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE CAST (mvarchar as mvarchar) | |
WITH FUNCTION mvarchar(mvarchar, integer, boolean) as IMPLICIT; | |
CREATE FUNCTION length(mchar) | |
RETURNS int4 | |
AS '$libdir/mchar', 'mchar_length' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION upper(mchar) | |
RETURNS mchar | |
AS '$libdir/mchar', 'mchar_upper' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION lower(mchar) | |
RETURNS mchar | |
AS '$libdir/mchar', 'mchar_lower' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_hash(mchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_concat(mchar, mchar) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR || ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_concat | |
); | |
CREATE FUNCTION mchar_like(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_notlike(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR ~~ ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mchar_like, | |
RESTRICT = likesel, | |
JOIN = likejoinsel, | |
NEGATOR = '!~~' | |
); | |
CREATE OPERATOR !~~ ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mchar_notlike, | |
RESTRICT = nlikesel, | |
JOIN = nlikejoinsel, | |
NEGATOR = '~~' | |
); | |
CREATE FUNCTION mchar_regexeq(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_regexne(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR ~ ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_regexeq, | |
RESTRICT = regexeqsel, | |
JOIN = regexeqjoinsel, | |
NEGATOR = '!~' | |
); | |
CREATE OPERATOR !~ ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_regexne, | |
RESTRICT = regexnesel, | |
JOIN = regexnejoinsel, | |
NEGATOR = '~' | |
); | |
CREATE FUNCTION similar_escape(mchar, mchar) | |
RETURNS mchar | |
AS '$libdir/mchar', 'mchar_similar_escape' | |
LANGUAGE C IMMUTABLE; | |
CREATE FUNCTION length(mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar', 'mvarchar_length' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION upper(mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_upper' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION lower(mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_lower' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_hash(mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_concat(mvarchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR || ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_concat | |
); | |
CREATE FUNCTION mvarchar_like(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION like_escape(mvarchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_like_escape' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_notlike(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR ~~ ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_like, | |
RESTRICT = likesel, | |
JOIN = likejoinsel, | |
NEGATOR = '!~~' | |
); | |
CREATE OPERATOR !~~ ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_notlike, | |
RESTRICT = nlikesel, | |
JOIN = nlikejoinsel, | |
NEGATOR = '~~' | |
); | |
CREATE FUNCTION mvarchar_regexeq(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_regexne(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR ~ ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_regexeq, | |
RESTRICT = regexeqsel, | |
JOIN = regexeqjoinsel, | |
NEGATOR = '!~' | |
); | |
CREATE OPERATOR !~ ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_regexne, | |
RESTRICT = regexnesel, | |
JOIN = regexnejoinsel, | |
NEGATOR = '~' | |
); | |
CREATE FUNCTION similar_escape(mvarchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_similar_escape' | |
LANGUAGE C IMMUTABLE; | |
CREATE FUNCTION substr (mchar, int4) | |
RETURNS mchar | |
AS '$libdir/mchar', 'mchar_substring_no_len' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION substr (mchar, int4, int4) | |
RETURNS mchar | |
AS '$libdir/mchar', 'mchar_substring' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION substr (mvarchar, int4) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_substring_no_len' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION substr (mvarchar, int4, int4) | |
RETURNS mvarchar | |
AS '$libdir/mchar', 'mvarchar_substring' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_cmp(mchar, mchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_eq(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_ne(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_lt(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_le(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_gt(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_icase_ge(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR < ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_lt, | |
COMMUTATOR = '>', | |
NEGATOR = '>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR > ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_gt, | |
COMMUTATOR = '<', | |
NEGATOR = '<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR <= ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_le, | |
COMMUTATOR = '>=', | |
NEGATOR = '>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR >= ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_ge, | |
COMMUTATOR = '<=', | |
NEGATOR = '<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR = ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_eq, | |
COMMUTATOR = '=', | |
NEGATOR = '<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '<', | |
SORT2 = '<', | |
HASHES); | |
CREATE OPERATOR <> ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_icase_ne, | |
COMMUTATOR = '<>', | |
NEGATOR = '=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mchar_case_cmp(mchar, mchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_eq(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_ne(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_lt(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_le(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_gt(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_case_ge(mchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR &< ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_lt, | |
COMMUTATOR = '&>', | |
NEGATOR = '&>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &> ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_gt, | |
COMMUTATOR = '&<', | |
NEGATOR = '&<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &<= ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_le, | |
COMMUTATOR = '&>=', | |
NEGATOR = '&>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &>= ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_ge, | |
COMMUTATOR = '&<=', | |
NEGATOR = '&<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &= ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_eq, | |
COMMUTATOR = '&=', | |
NEGATOR = '&<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '&<', | |
SORT2 = '&<' | |
); | |
CREATE OPERATOR &<> ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mchar_case_ne, | |
COMMUTATOR = '&<>', | |
NEGATOR = '&=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mvarchar_icase_cmp(mvarchar, mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_eq(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_ne(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_lt(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_le(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_gt(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_icase_ge(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR < ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_lt, | |
COMMUTATOR = '>', | |
NEGATOR = '>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR > ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_gt, | |
COMMUTATOR = '<', | |
NEGATOR = '<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR <= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_le, | |
COMMUTATOR = '>=', | |
NEGATOR = '>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR >= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_ge, | |
COMMUTATOR = '<=', | |
NEGATOR = '<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR = ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_eq, | |
COMMUTATOR = '=', | |
NEGATOR = '<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '<', | |
SORT2 = '<', | |
HASHES); | |
CREATE OPERATOR <> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_icase_ne, | |
COMMUTATOR = '<>', | |
NEGATOR = '=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mvarchar_case_cmp(mvarchar, mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_eq(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_ne(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_lt(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_le(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_gt(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mvarchar_case_ge(mvarchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR &< ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_lt, | |
COMMUTATOR = '&>', | |
NEGATOR = '&>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_gt, | |
COMMUTATOR = '&<', | |
NEGATOR = '&<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &<= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_le, | |
COMMUTATOR = '&>=', | |
NEGATOR = '&>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &>= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_ge, | |
COMMUTATOR = '&<=', | |
NEGATOR = '&<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_eq, | |
COMMUTATOR = '&=', | |
NEGATOR = '&<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '&<', | |
SORT2 = '&<' | |
); | |
CREATE OPERATOR &<> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mvarchar_case_ne, | |
COMMUTATOR = '&<>', | |
NEGATOR = '&=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mc_mv_icase_cmp(mchar, mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_eq(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_ne(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_lt(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_le(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_gt(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_icase_ge(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR < ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_lt, | |
COMMUTATOR = '>', | |
NEGATOR = '>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR > ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_gt, | |
COMMUTATOR = '<', | |
NEGATOR = '<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR <= ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_le, | |
COMMUTATOR = '>=', | |
NEGATOR = '>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR >= ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_ge, | |
COMMUTATOR = '<=', | |
NEGATOR = '<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR = ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_eq, | |
COMMUTATOR = '=', | |
NEGATOR = '<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '<', | |
SORT2 = '<' | |
); | |
CREATE OPERATOR <> ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_icase_ne, | |
COMMUTATOR = '<>', | |
NEGATOR = '=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mc_mv_case_cmp(mchar, mvarchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_eq(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_ne(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_lt(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_le(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_gt(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mc_mv_case_ge(mchar, mvarchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR &< ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_lt, | |
COMMUTATOR = '&>', | |
NEGATOR = '&>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &> ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_gt, | |
COMMUTATOR = '&<', | |
NEGATOR = '&<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &<= ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_le, | |
COMMUTATOR = '&>=', | |
NEGATOR = '&>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &>= ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_ge, | |
COMMUTATOR = '&<=', | |
NEGATOR = '&<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &= ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_eq, | |
COMMUTATOR = '&=', | |
NEGATOR = '&<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '&<', | |
SORT2 = '&<' | |
); | |
CREATE OPERATOR &<> ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mc_mv_case_ne, | |
COMMUTATOR = '&<>', | |
NEGATOR = '&=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mv_mc_icase_cmp(mvarchar, mchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_eq(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_ne(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_lt(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_le(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_gt(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_icase_ge(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR < ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_lt, | |
COMMUTATOR = '>', | |
NEGATOR = '>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR > ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_gt, | |
COMMUTATOR = '<', | |
NEGATOR = '<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR <= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_le, | |
COMMUTATOR = '>=', | |
NEGATOR = '>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR >= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_ge, | |
COMMUTATOR = '<=', | |
NEGATOR = '<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR = ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_eq, | |
COMMUTATOR = '=', | |
NEGATOR = '<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '<', | |
SORT2 = '<' | |
); | |
CREATE OPERATOR <> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_icase_ne, | |
COMMUTATOR = '<>', | |
NEGATOR = '=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mv_mc_case_cmp(mvarchar, mchar) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_eq(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_ne(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_lt(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_le(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_gt(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mv_mc_case_ge(mvarchar, mchar) | |
RETURNS bool | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR &< ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_lt, | |
COMMUTATOR = '&>', | |
NEGATOR = '&>=', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_gt, | |
COMMUTATOR = '&<', | |
NEGATOR = '&<=', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &<= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_le, | |
COMMUTATOR = '&>=', | |
NEGATOR = '&>', | |
RESTRICT = scalarltsel, | |
JOIN = scalarltjoinsel | |
); | |
CREATE OPERATOR &>= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_ge, | |
COMMUTATOR = '&<=', | |
NEGATOR = '&<', | |
RESTRICT = scalargtsel, | |
JOIN = scalargtjoinsel | |
); | |
CREATE OPERATOR &= ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_eq, | |
COMMUTATOR = '&=', | |
NEGATOR = '&<>', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
SORT1 = '&<', | |
SORT2 = '&<' | |
); | |
CREATE OPERATOR &<> ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mv_mc_case_ne, | |
COMMUTATOR = '&<>', | |
NEGATOR = '&=', | |
RESTRICT = neqsel, | |
JOIN = neqjoinsel | |
); | |
CREATE FUNCTION mchar_mvarchar_concat(mchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR || ( | |
LEFTARG = mchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = mchar_mvarchar_concat | |
); | |
CREATE FUNCTION mvarchar_mchar_concat(mvarchar, mchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OPERATOR || ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mchar, | |
PROCEDURE = mvarchar_mchar_concat | |
); | |
CREATE FUNCTION mvarchar_mchar(mvarchar, integer, boolean) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE CAST (mvarchar as mchar) | |
WITH FUNCTION mvarchar_mchar(mvarchar, integer, boolean) as IMPLICIT; | |
CREATE FUNCTION mchar_mvarchar(mchar, integer, boolean) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE CAST (mchar as mvarchar) | |
WITH FUNCTION mchar_mvarchar(mchar, integer, boolean) as IMPLICIT; | |
CREATE FUNCTION mchar_larger(mchar, mchar) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE AGGREGATE max ( | |
BASETYPE = mchar, | |
SFUNC = mchar_larger, | |
STYPE = mchar, | |
SORTOP = '>' | |
); | |
CREATE FUNCTION mchar_smaller(mchar, mchar) | |
RETURNS mchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE AGGREGATE min ( | |
BASETYPE = mchar, | |
SFUNC = mchar_smaller, | |
STYPE = mchar, | |
SORTOP = '<' | |
); | |
CREATE FUNCTION mvarchar_larger(mvarchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE AGGREGATE max ( | |
BASETYPE = mvarchar, | |
SFUNC = mvarchar_larger, | |
STYPE = mvarchar, | |
SORTOP = '>' | |
); | |
CREATE FUNCTION mvarchar_smaller(mvarchar, mvarchar) | |
RETURNS mvarchar | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE AGGREGATE min ( | |
BASETYPE = mvarchar, | |
SFUNC = mvarchar_smaller, | |
STYPE = mvarchar, | |
SORTOP = '<' | |
); | |
CREATE OPERATOR FAMILY icase_ops USING btree; | |
CREATE OPERATOR FAMILY case_ops USING btree; | |
CREATE OPERATOR CLASS mchar_icase_ops | |
DEFAULT FOR TYPE mchar USING btree FAMILY icase_ops AS | |
OPERATOR 1 < , | |
OPERATOR 2 <= , | |
OPERATOR 3 = , | |
OPERATOR 4 >= , | |
OPERATOR 5 > , | |
FUNCTION 1 mchar_icase_cmp(mchar, mchar), | |
OPERATOR 1 < (mchar, mvarchar), | |
OPERATOR 2 <= (mchar, mvarchar), | |
OPERATOR 3 = (mchar, mvarchar), | |
OPERATOR 4 >= (mchar, mvarchar), | |
OPERATOR 5 > (mchar, mvarchar), | |
FUNCTION 1 mc_mv_icase_cmp(mchar, mvarchar); | |
CREATE OPERATOR CLASS mchar_case_ops | |
FOR TYPE mchar USING btree FAMILY case_ops AS | |
OPERATOR 1 &< , | |
OPERATOR 2 &<= , | |
OPERATOR 3 &= , | |
OPERATOR 4 &>= , | |
OPERATOR 5 &> , | |
FUNCTION 1 mchar_case_cmp(mchar, mchar), | |
OPERATOR 1 &< (mchar, mvarchar), | |
OPERATOR 2 &<= (mchar, mvarchar), | |
OPERATOR 3 &= (mchar, mvarchar), | |
OPERATOR 4 &>= (mchar, mvarchar), | |
OPERATOR 5 &> (mchar, mvarchar), | |
FUNCTION 1 mc_mv_case_cmp(mchar, mvarchar); | |
CREATE OPERATOR CLASS mchar_icase_ops | |
DEFAULT FOR TYPE mchar USING hash AS | |
OPERATOR 1 = , | |
FUNCTION 1 mchar_hash(mchar); | |
CREATE OPERATOR CLASS mvarchar_icase_ops | |
DEFAULT FOR TYPE mvarchar USING btree FAMILY icase_ops AS | |
OPERATOR 1 < , | |
OPERATOR 2 <= , | |
OPERATOR 3 = , | |
OPERATOR 4 >= , | |
OPERATOR 5 > , | |
FUNCTION 1 mvarchar_icase_cmp(mvarchar, mvarchar), | |
OPERATOR 1 < (mvarchar, mchar), | |
OPERATOR 2 <= (mvarchar, mchar), | |
OPERATOR 3 = (mvarchar, mchar), | |
OPERATOR 4 >= (mvarchar, mchar), | |
OPERATOR 5 > (mvarchar, mchar), | |
FUNCTION 1 mv_mc_icase_cmp(mvarchar, mchar); | |
CREATE OPERATOR CLASS mvarchar_case_ops | |
FOR TYPE mvarchar USING btree FAMILY case_ops AS | |
OPERATOR 1 &< , | |
OPERATOR 2 &<= , | |
OPERATOR 3 &= , | |
OPERATOR 4 &>= , | |
OPERATOR 5 &> , | |
FUNCTION 1 mvarchar_case_cmp(mvarchar, mvarchar), | |
OPERATOR 1 &< (mvarchar, mchar), | |
OPERATOR 2 &<= (mvarchar, mchar), | |
OPERATOR 3 &= (mvarchar, mchar), | |
OPERATOR 4 &>= (mvarchar, mchar), | |
OPERATOR 5 &> (mvarchar, mchar), | |
FUNCTION 1 mv_mc_case_cmp(mvarchar, mchar); | |
CREATE OPERATOR CLASS mvarchar_icase_ops | |
DEFAULT FOR TYPE mvarchar USING hash AS | |
OPERATOR 1 = , | |
FUNCTION 1 mvarchar_hash(mvarchar); | |
CREATE FUNCTION mchar_pattern_fixed_prefix(internal, internal, internal, internal) | |
RETURNS int4 | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE FUNCTION mchar_greaterstring(internal) | |
RETURNS internal | |
AS '$libdir/mchar' | |
LANGUAGE C IMMUTABLE RETURNS NULL ON NULL INPUT; | |
CREATE OR REPLACE FUNCTION isfulleq_bool(bool, bool) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_bool(bool) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = bool, | |
RIGHTARG = bool, | |
PROCEDURE = isfulleq_bool, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS bool_fill_ops | |
FOR TYPE bool USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_bool(bool); | |
CREATE OR REPLACE FUNCTION isfulleq_bytea(bytea, bytea) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_bytea(bytea) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = bytea, | |
RIGHTARG = bytea, | |
PROCEDURE = isfulleq_bytea, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS bytea_fill_ops | |
FOR TYPE bytea USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_bytea(bytea); | |
CREATE OR REPLACE FUNCTION isfulleq_char(char, char) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_char(char) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = char, | |
RIGHTARG = char, | |
PROCEDURE = isfulleq_char, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS char_fill_ops | |
FOR TYPE char USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_char(char); | |
CREATE OR REPLACE FUNCTION isfulleq_name(name, name) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_name(name) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = name, | |
RIGHTARG = name, | |
PROCEDURE = isfulleq_name, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS name_fill_ops | |
FOR TYPE name USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_name(name); | |
CREATE OR REPLACE FUNCTION isfulleq_int8(int8, int8) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_int8(int8) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = int8, | |
RIGHTARG = int8, | |
PROCEDURE = isfulleq_int8, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS int8_fill_ops | |
FOR TYPE int8 USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_int8(int8); | |
CREATE OR REPLACE FUNCTION isfulleq_int2(int2, int2) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_int2(int2) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = int2, | |
RIGHTARG = int2, | |
PROCEDURE = isfulleq_int2, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS int2_fill_ops | |
FOR TYPE int2 USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_int2(int2); | |
CREATE OR REPLACE FUNCTION isfulleq_int2vector(int2vector, int2vector) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_int2vector(int2vector) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = int2vector, | |
RIGHTARG = int2vector, | |
PROCEDURE = isfulleq_int2vector, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS int2vector_fill_ops | |
FOR TYPE int2vector USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_int2vector(int2vector); | |
CREATE OR REPLACE FUNCTION isfulleq_int4(int4, int4) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_int4(int4) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = int4, | |
RIGHTARG = int4, | |
PROCEDURE = isfulleq_int4, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS int4_fill_ops | |
FOR TYPE int4 USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_int4(int4); | |
CREATE OR REPLACE FUNCTION isfulleq_text(text, text) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_text(text) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = text, | |
RIGHTARG = text, | |
PROCEDURE = isfulleq_text, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS text_fill_ops | |
FOR TYPE text USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_text(text); | |
CREATE OR REPLACE FUNCTION isfulleq_oid(oid, oid) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_oid(oid) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = oid, | |
RIGHTARG = oid, | |
PROCEDURE = isfulleq_oid, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS oid_fill_ops | |
FOR TYPE oid USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_oid(oid); | |
CREATE OR REPLACE FUNCTION isfulleq_xid(xid, xid) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_xid(xid) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = xid, | |
RIGHTARG = xid, | |
PROCEDURE = isfulleq_xid, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS xid_fill_ops | |
FOR TYPE xid USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_xid(xid); | |
CREATE OR REPLACE FUNCTION isfulleq_cid(cid, cid) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_cid(cid) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = cid, | |
RIGHTARG = cid, | |
PROCEDURE = isfulleq_cid, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS cid_fill_ops | |
FOR TYPE cid USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_cid(cid); | |
CREATE OR REPLACE FUNCTION isfulleq_oidvector(oidvector, oidvector) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_oidvector(oidvector) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = oidvector, | |
RIGHTARG = oidvector, | |
PROCEDURE = isfulleq_oidvector, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS oidvector_fill_ops | |
FOR TYPE oidvector USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_oidvector(oidvector); | |
CREATE OR REPLACE FUNCTION isfulleq_float4(float4, float4) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_float4(float4) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = float4, | |
RIGHTARG = float4, | |
PROCEDURE = isfulleq_float4, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS float4_fill_ops | |
FOR TYPE float4 USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_float4(float4); | |
CREATE OR REPLACE FUNCTION isfulleq_float8(float8, float8) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_float8(float8) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = float8, | |
RIGHTARG = float8, | |
PROCEDURE = isfulleq_float8, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS float8_fill_ops | |
FOR TYPE float8 USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_float8(float8); | |
CREATE OR REPLACE FUNCTION isfulleq_abstime(abstime, abstime) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_abstime(abstime) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = abstime, | |
RIGHTARG = abstime, | |
PROCEDURE = isfulleq_abstime, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS abstime_fill_ops | |
FOR TYPE abstime USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_abstime(abstime); | |
CREATE OR REPLACE FUNCTION isfulleq_reltime(reltime, reltime) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_reltime(reltime) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = reltime, | |
RIGHTARG = reltime, | |
PROCEDURE = isfulleq_reltime, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS reltime_fill_ops | |
FOR TYPE reltime USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_reltime(reltime); | |
CREATE OR REPLACE FUNCTION isfulleq_macaddr(macaddr, macaddr) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_macaddr(macaddr) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = macaddr, | |
RIGHTARG = macaddr, | |
PROCEDURE = isfulleq_macaddr, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS macaddr_fill_ops | |
FOR TYPE macaddr USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_macaddr(macaddr); | |
CREATE OR REPLACE FUNCTION isfulleq_inet(inet, inet) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_inet(inet) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = inet, | |
RIGHTARG = inet, | |
PROCEDURE = isfulleq_inet, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS inet_fill_ops | |
FOR TYPE inet USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_inet(inet); | |
CREATE OR REPLACE FUNCTION isfulleq_cidr(cidr, cidr) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_cidr(cidr) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = cidr, | |
RIGHTARG = cidr, | |
PROCEDURE = isfulleq_cidr, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS cidr_fill_ops | |
FOR TYPE cidr USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_cidr(cidr); | |
CREATE OR REPLACE FUNCTION isfulleq_varchar(varchar, varchar) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_varchar(varchar) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = varchar, | |
RIGHTARG = varchar, | |
PROCEDURE = isfulleq_varchar, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS varchar_fill_ops | |
FOR TYPE varchar USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_varchar(varchar); | |
CREATE OR REPLACE FUNCTION isfulleq_date(date, date) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_date(date) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = date, | |
RIGHTARG = date, | |
PROCEDURE = isfulleq_date, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS date_fill_ops | |
FOR TYPE date USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_date(date); | |
CREATE OR REPLACE FUNCTION isfulleq_time(time, time) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_time(time) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = time, | |
RIGHTARG = time, | |
PROCEDURE = isfulleq_time, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS time_fill_ops | |
FOR TYPE time USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_time(time); | |
CREATE OR REPLACE FUNCTION isfulleq_timestamp(timestamp, timestamp) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_timestamp(timestamp) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = timestamp, | |
RIGHTARG = timestamp, | |
PROCEDURE = isfulleq_timestamp, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS timestamp_fill_ops | |
FOR TYPE timestamp USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_timestamp(timestamp); | |
CREATE OR REPLACE FUNCTION isfulleq_timestamptz(timestamptz, timestamptz) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_timestamptz(timestamptz) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = timestamptz, | |
RIGHTARG = timestamptz, | |
PROCEDURE = isfulleq_timestamptz, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS timestamptz_fill_ops | |
FOR TYPE timestamptz USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_timestamptz(timestamptz); | |
CREATE OR REPLACE FUNCTION isfulleq_interval(interval, interval) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_interval(interval) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = interval, | |
RIGHTARG = interval, | |
PROCEDURE = isfulleq_interval, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS interval_fill_ops | |
FOR TYPE interval USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_interval(interval); | |
CREATE OR REPLACE FUNCTION isfulleq_timetz(timetz, timetz) | |
RETURNS bool AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_timetz(timetz) | |
RETURNS int4 AS '$libdir/fulleq' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = timetz, | |
RIGHTARG = timetz, | |
PROCEDURE = isfulleq_timetz, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS timetz_fill_ops | |
FOR TYPE timetz USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_timetz(timetz); | |
CREATE OR REPLACE FUNCTION isfulleq_mchar(mchar, mchar) | |
RETURNS bool AS '$libdir/mchar' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_mchar(mchar) | |
RETURNS int4 AS '$libdir/mchar' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = mchar, | |
RIGHTARG = mchar, | |
PROCEDURE = isfulleq_mchar, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS mchar_fill_ops | |
FOR TYPE mchar USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_mchar(mchar); | |
CREATE OR REPLACE FUNCTION isfulleq_mvarchar(mvarchar, mvarchar) | |
RETURNS bool AS '$libdir/mchar' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OR REPLACE FUNCTION fullhash_mvarchar(mvarchar) | |
RETURNS int4 AS '$libdir/mchar' | |
LANGUAGE C CALLED ON NULL INPUT IMMUTABLE; | |
CREATE OPERATOR == ( | |
LEFTARG = mvarchar, | |
RIGHTARG = mvarchar, | |
PROCEDURE = isfulleq_mvarchar, | |
COMMUTATOR = '==', | |
RESTRICT = eqsel, | |
JOIN = eqjoinsel, | |
HASHES); | |
CREATE OPERATOR CLASS mvarchar_fill_ops | |
FOR TYPE mvarchar USING hash AS | |
OPERATOR 1 ==, | |
FUNCTION 1 fullhash_mvarchar(mvarchar); | |
CREATE OR REPLACE FUNCTION fasttruncate(text) | |
RETURNS void AS '$libdir/fasttrun' | |
LANGUAGE C RETURNS NULL ON NULL INPUT VOLATILE; | |
create aggregate max( | |
basetype=bool, | |
sfunc=state_max_bool, | |
stype=bool); | |
create aggregate min( | |
basetype=bool, | |
sfunc=state_min_bool, | |
stype=bool); | |
create aggregate max( | |
basetype=bytea, | |
sfunc=state_max_bytea, | |
stype=bytea); | |
create aggregate min( | |
basetype=bytea, | |
sfunc=state_min_bytea, | |
stype=bytea); | |
select 1 from pg_proc where proname = 'VASSN'; | |
CREATE OR REPLACE FUNCTION public.VASSN(boolean) RETURNS int4 AS | |
' | |
DECLARE bexpr alias for $1; | |
BEGIN | |
if bexpr | |
then return 0; | |
else return 2000000000; | |
end if; | |
END | |
' LANGUAGE 'plpgsql' VOLATILE; | |
BEGIN TRANSACTION; | |
lock table pg_class in application share mode; | |
COMMIT; | |
select count(*) from pg_tables where tablename IN ('config', 'configsave', 'params', 'files'); | |
select count(*) from pg_tables where tablename IN ('dbschema', 'dbschemaog'); | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='ibversion' LIMIT 1; | |
create table IBVersion (IBVersion int not null, PlatformVersionReq int not null); | |
UPDATE IBVersion SET IBVersion = '2', PlatformVersionReq = '80306'; | |
INSERT INTO IBVersion (IBVersion, PlatformVersionReq)VALUES ('2', '80306'); | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='ibversion' LIMIT 1; | |
UPDATE IBVersion SET IBVersion = '2', PlatformVersionReq = '80306'; | |
create table Config (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
create table ConfigSave (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
create table Params (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
create table Files (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
create table ConfigCAS (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
create table ConfigCASSave (FileName mvarchar(128) not null, Creation timestamp not null, Modified timestamp not null, Attributes int not null, DataSize int8 not null, BinaryData bytea not null, PartNo int not null, PRIMARY KEY (FileName, PartNo)); | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_yearoffset' LIMIT 1; | |
create table _YearOffset (Ofset int not null); | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
create table DBSchema (SerializedData bytea not null); | |
select 1::int8 from DBSchema limit 1; | |
BEGIN TRANSACTION; | |
lock table pg_class in application share mode; | |
COMMIT; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='v8users' LIMIT 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Params WHERE FileName = 'users.usr' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
show lc_collate; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'locale.inf' ORDER BY PartNo; | |
Select 1::int8 from Params where FileName='locale.inf' limit 1; | |
BEGIN TRANSACTION; | |
DELETE FROM Params WHERE FileName = 'locale.inf' AND PartNo <> 0; | |
COMMIT; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'log.inf' ORDER BY PartNo; | |
Select 1::int8 from Params where FileName='log.inf' limit 1; | |
BEGIN TRANSACTION; | |
DELETE FROM Params WHERE FileName = 'log.inf' AND PartNo <> 0; | |
COMMIT; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'evlogparams.inf' ORDER BY PartNo; | |
Select 1::int8 from Params where FileName='evlogparams.inf' limit 1; | |
BEGIN TRANSACTION; | |
DELETE FROM Params WHERE FileName = 'evlogparams.inf' AND PartNo <> 0; | |
COMMIT; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Params WHERE FileName = 'users.usr' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'ibparams.inf' ORDER BY PartNo; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbchanges' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT * FROM DBSchema; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschemaog' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='updatedbcfgschema' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='updatedbcfgchanges' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='clearaggregates' LIMIT 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Params WHERE FileName = 'users.usr' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNames' ORDER BY PartNo; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_odatasettings' LIMIT 1; | |
create table _ODataSettings (_MetadataObjectUUID bytea not null) WITHOUT OIDS ; | |
ALTER TABLE _ODataSettings ALTER COLUMN _MetadataObjectUUID SET STORAGE PLAIN; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_systemsettings' LIMIT 1; | |
create table _SystemSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _SystemSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _systemsett_bykey_sss on _systemsettings (_UserId, _ObjectKey, _SettingsKey); alter table _systemsettings cluster on _systemsett_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_commonsettings' LIMIT 1; | |
create table _CommonSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _CommonSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _commonsett_bykey_sss on _commonsettings (_UserId, _ObjectKey, _SettingsKey); alter table _commonsettings cluster on _commonsett_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_repsettings' LIMIT 1; | |
create table _RepSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _RepSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _repsetting_bykey_sss on _repsettings (_UserId, _ObjectKey, _SettingsKey); alter table _repsettings cluster on _repsetting_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_repvarsettings' LIMIT 1; | |
create table _RepVarSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _RepVarSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _repvarsett_bykey_sss on _repvarsettings (_UserId, _ObjectKey, _SettingsKey); alter table _repvarsettings cluster on _repvarsett_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_frmdtsettings' LIMIT 1; | |
create table _FrmDtSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _FrmDtSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _frmdtsetti_bykey_sss on _frmdtsettings (_UserId, _ObjectKey, _SettingsKey); alter table _frmdtsettings cluster on _frmdtsetti_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_dynlistsettings' LIMIT 1; | |
create table _DynListSettings (_UserId mvarchar(64) not null,_ObjectKey mvarchar(256) not null,_SettingsKey mvarchar(256) not null,_Version bytea not null,_SettingsPresentation mvarchar(256),_SettingsData bytea) WITHOUT OIDS; | |
ALTER TABLE _DynListSettings ALTER COLUMN _Version SET STORAGE PLAIN; | |
create index _dynlistset_bykey_sss on _dynlistsettings (_UserId, _ObjectKey, _SettingsKey); alter table _dynlistsettings cluster on _dynlistset_bykey_sss; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_extensionsinfo' LIMIT 1; | |
create table _ExtensionsInfo (_IDRRef bytea not null primary key,_ConfigVersion bytea not null,_ExtensionOrder numeric(9,0) not null,_ExtName mvarchar(255) not null,_ExtSynonym mvarchar not null,_ExtVersion mvarchar(255) not null,_SafeMode boolean not null,_SecurityProfileName mvarchar(255) not null,_UpdateTime timestamp not null,_Version int4 default 0 not null) WITHOUT OIDS; | |
ALTER TABLE _ExtensionsInfo ALTER COLUMN _IDRRef SET STORAGE PLAIN; | |
ALTER TABLE _ExtensionsInfo ALTER COLUMN _ConfigVersion SET STORAGE PLAIN; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='_usersworkhistory' LIMIT 1; | |
create table _UsersWorkHistory (_ID bytea not null,_UserID bytea not null,_URL mvarchar not null,_Date timestamp not null,_URLHash numeric(10,0) not null) WITHOUT OIDS; | |
ALTER TABLE _UsersWorkHistory ALTER COLUMN _ID SET STORAGE PLAIN; | |
ALTER TABLE _UsersWorkHistory ALTER COLUMN _UserID SET STORAGE PLAIN; | |
create unique index _usersworkh_byid_b on _usersworkhistory (_ID); | |
create index _usersworkh_byuserdate_bt on _usersworkhistory (_UserID, _Date); | |
create index _usersworkh_byuserurlhash_bnt on _usersworkhistory (_UserID, _URLHash, _Date); alter table _usersworkhistory cluster on _usersworkh_byuserurlhash_bnt; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNames.New' ORDER BY PartNo; | |
Select 1::int8 from Params where FileName='DBNames.New' limit 1; | |
BEGIN TRANSACTION; | |
DELETE FROM Params WHERE FileName = 'DBNames.New' AND PartNo <> 0; | |
COMMIT; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNamesVersion' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNamesVersion' ORDER BY PartNo; | |
Select 1::int8 from Params where FileName='DBNamesVersion' limit 1; | |
BEGIN TRANSACTION; | |
DELETE FROM Params WHERE FileName = 'DBNamesVersion' AND PartNo <> 0; | |
COMMIT; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNamesVersion' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNames' ORDER BY PartNo; | |
DELETE FROM Params WHERE FileName = 'DBNames' AND EXISTS (SELECT 1 FROM Params WHERE FileName = 'DBNames.New'); | |
UPDATE Params SET FileName = 'DBNames' WHERE FileName = 'DBNames.New'; | |
DELETE FROM Params WHERE FileName = 'DBNamesVersion' AND PartNo <> 0; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='v8users' LIMIT 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Params WHERE FileName = 'users.usr' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='v8users' LIMIT 1; | |
create table v8users (ID bytea not null primary key,Name mvarchar(64) not null,Descr mvarchar(128) not null,OSName mvarchar(128),Changed timestamp not null,RolesID numeric(10,0) not null,Show boolean not null,Data bytea not null,EAuth boolean,AdmRole boolean,UsSprH numeric(10,0)) WITHOUT OIDS; | |
ALTER TABLE v8users ALTER COLUMN ID SET STORAGE PLAIN; | |
create unique index byname on v8users (Name); | |
create index bydescr on v8users (Descr); | |
create index byosname on v8users (OSName); | |
create index byrolesid on v8users (RolesID); | |
create index byshow on v8users (Show); | |
create index byeauth on v8users (AdmRole, EAuth); | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='updatedbcfgdata' LIMIT 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Files WHERE FileName = 'SprScndInfo' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Params WHERE FileName = 'DynamicallyUpdated' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = '1a621f0f-5568-4183-bd9f-f6ef670e7090.si' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Config WHERE FileName = 'DynamicallyUpdated' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Config WHERE FileName = 'versions' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Config WHERE FileName = 'version' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Config WHERE FileName LIKE '%' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Config WHERE FileName = 'root' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'DBNames' ORDER BY PartNo; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Config WHERE FileName = 'convertPhase' ORDER BY PartNo; | |
SELECT FileName, Creation, Modified, Attributes, DataSize FROM Config WHERE FileName = 'commit' AND PartNo = 0; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = '2203278d-ef4f-4f68-98f1-feb257d53ecc.si' ORDER BY PartNo; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbchanges' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT * FROM DBSchema; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschemaog' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='updatedbcfgschema' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='updatedbcfgchanges' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='clearaggregates' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='v8users' LIMIT 1; | |
SELECT ID, Name, Descr, OSName, Changed, RolesID, Show, Data, EAuth, AdmRole, UsSprH | |
FROM v8users | |
WHERE EAuth IS NULL OR AdmRole IS NULL OR UsSprH IS NULL | |
LIMIT 1; | |
SELECT Creation,Modified,Attributes,DataSize,BinaryData FROM Params WHERE FileName = 'users.usr' ORDER BY PartNo; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbchanges' LIMIT 1; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschema' LIMIT 1; | |
select 1::int8 from DBSchema limit 1; | |
SELECT * FROM DBSchema; | |
SELECT 1::INT8 FROM PG_CLASS WHERE pg_catalog.pg_table_is_visible(OID) AND RELKIND='r' AND RELNAME='dbschemaog' LIMIT 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment