Changeset: 1665370e7e1a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1665370e7e1a
Modified Files:
sql/test/emptydb/Tests/check.stable.out.32bit
Branch: default
Log Message:
Fix 32 bit output.
diffs (truncated from 377 to 300 lines):
diff --git a/sql/test/emptydb/Tests/check.stable.out.32bit
b/sql/test/emptydb/Tests/check.stable.out.32bit
--- a/sql/test/emptydb/Tests/check.stable.out.32bit
+++ b/sql/test/emptydb/Tests/check.stable.out.32bit
@@ -1022,7 +1022,7 @@ create function sys.deltas ("schema" str
create function sys.describe_columns(schemaname string, tablename string)
returns table(name string, type string, digits integer, scale integer, nulls
boolean, cdefault string, number integer, sqltype string, remark string) begin
return select c.name, c."type", c.type_digits, c.type_scale, c."null",
c."default", c.number, describe_type(c."type", c.type_digits, c.type_scale),
com.remark from sys._tables t, sys.schemas s, sys._columns c left outer join
sys.comments com on c.id = com.id where c.table_id = t.id and t.name =
tablename and t.schema_id = s.id and s.name = schemaname order by c.number; end;
create function sys.describe_function(schemaname string, functionname string)
returns table(id integer, name string, type string, language string, remark
string) begin return select f.id, f.name, ft.function_type_keyword,
fl.language_keyword, c.remark from sys.functions f join sys.schemas s on
f.schema_id = s.id join sys.function_types ft on f.type = ft.function_type_id
left outer join sys.function_languages fl on f.language = fl.language_id left
outer join sys.comments c on f.id = c.id where f.name=functionname and s.name =
schemaname; end;
create function sys.describe_table(schemaname string, tablename string)
returns table(name string, query string, type string, id integer, remark
string) begin return select t.name, t.query, tt.table_type_name, t.id, c.remark
from sys.schemas s, sys.table_types tt, sys._tables t left outer join
sys.comments c on t.id = c.id where s.name = schemaname and t.schema_id = s.id
and t.name = tablename and t.type = tt.table_type_id; end;
-create function sys.describe_type(ctype string, digits integer, tscale
integer) returns string begin return case ctype when 'bigint' then 'BIGINT'
when 'blob' then case digits when 0 then 'BINARY LARGE OBJECT' else 'BINARY
LARGE OBJECT(' || cast(digits as string) || ')' end when 'boolean' then
'BOOLEAN' when 'char' then case digits when 1 then 'CHARACTER' else
'CHARACTER(' || cast(digits as string) || ')' end when 'clob' then case digits
when 0 then 'CHARACTER LARGE OBJECT' else 'CHARACTER LARGE OBJECT(' ||
cast(digits as string) || ')' end when 'date' then 'DATE' when 'day_interval'
then 'INTERVAL DAY' when 'decimal' then 'DECIMAL(' || cast(digits as string) ||
',' || cast(tscale as string) || ')' when 'double' then case when digits = 53
and tscale = 0 then 'DOUBLE' when tscale = 0 then 'FLOAT(' || cast(digits as
string) || ')' else 'FLOAT(' || cast(digits as string) || ',' || cast(tscale as
string) || ')' end when 'geometry' then case digits when 4 then
'GEOMETRY(POINT' || case ts
cale when 0 then '' else ',' || cast(tscale as string) end || ')' when 8 then
'GEOMETRY(LINESTRING' || case tscale when 0 then '' else ',' || cast(tscale as
string) end || ')' when 16 then 'GEOMETRY(POLYGON' || case tscale when 0 then
'' else ',' || cast(tscale as string) end || ')' when 20 then
'GEOMETRY(MULTIPOINT' || case tscale when 0 then '' else ',' || cast(tscale as
string) end || ')' when 24 then 'GEOMETRY(MULTILINESTRING' || case tscale when
0 then '' else ',' || cast(tscale as string) end || ')' when 28 then
'GEOMETRY(MULTIPOLYGON' || case tscale when 0 then '' else ',' || cast(tscale
as string) end || ')' when 32 then 'GEOMETRY(GEOMETRYCOLLECTION' || case tscale
when 0 then '' else ',' || cast(tscale as string) end || ')' else 'GEOMETRY'
end when 'hugeint' then 'HUGEINT' when 'int' then 'INTEGER' when
'month_interval' then case digits when 1 then 'INTERVAL YEAR' when 2 then
'INTERVAL YEAR TO MONTH' when 3 then 'INTERVAL MONTH' end when 'real' then case
when digits = 24 an
d tscale = 0 then 'REAL' when tscale = 0 then 'FLOAT(' || cast(digits as
string) || ')' else 'FLOAT(' || cast(digits as string) || ',' || cast(tscale as
string) || ')' end when 'sec_interval' then case digits when 4 then 'INTERVAL
DAY' when 5 then 'INTERVAL DAY TO HOUR' when 6 then 'INTERVAL DAY TO MINUTE'
when 7 then 'INTERVAL DAY TO SECOND' when 8 then 'INTERVAL HOUR' when 9 then
'INTERVAL HOUR TO MINUTE' when 10 then 'INTERVAL HOUR TO SECOND' when 11 then
'INTERVAL MINUTE' when 12 then 'INTERVAL MINUTE TO SECOND' when 13 then
'INTERVAL SECOND' end when 'smallint' then 'SMALLINT' when 'time' then case
digits when 1 then 'TIME' else 'TIME(' || cast(digits - 1 as string) || ')' end
when 'timestamp' then case digits when 7 then 'TIMESTAMP' else 'TIMESTAMP(' ||
cast(digits - 1 as string) || ')' end when 'timestamptz' then case digits when
7 then 'TIMESTAMP' else 'TIMESTAMP(' || cast(digits - 1 as string) || ')' end
|| ' WITH TIME ZONE' when 'timetz' then case digits when 1 then 'TIME'
else 'TIME(' || cast(digits - 1 as string) || ')' end || ' WITH TIME ZONE'
when 'tinyint' then 'TINYINT' when 'varchar' then 'CHARACTER VARYING(' ||
cast(digits as string) || ')' else case when lower(ctype) = ctype then
upper(ctype) else '"' || ctype || '"' end || case digits when 0 then '' else
'(' || cast(digits as string) || case tscale when 0 then '' else ',' ||
cast(tscale as string) end || ')' end end;
+create function sys.describe_type(ctype string, digits integer, tscale
integer) returns string begin return case ctype when 'bigint' then 'BIGINT'
when 'blob' then case digits when 0 then 'BINARY LARGE OBJECT' else 'BINARY
LARGE OBJECT(' || digits || ')' end when 'boolean' then 'BOOLEAN' when 'char'
then case digits when 1 then 'CHARACTER' else 'CHARACTER(' || digits || ')' end
when 'clob' then case digits when 0 then 'CHARACTER LARGE OBJECT' else
'CHARACTER LARGE OBJECT(' || digits || ')' end when 'date' then 'DATE' when
'day_interval' then 'INTERVAL DAY' when ctype = 'decimal' then case when
(digits = 1 and tscale = 0) or digits = 0 then 'DECIMAL' when tscale = 0 then
'DECIMAL(' || digits || ')' when digits = 39 then 'DECIMAL(' || 38 || ',' ||
tscale || ')' when digits = 19 and (select count(*) = 0 from sys.types where
sqlname = 'hugeint') then 'DECIMAL(' || 18 || ',' || tscale || ')' else
'DECIMAL(' || digits || ',' || tscale || ')' end when 'double' then case when
digits = 53 an
d tscale = 0 then 'DOUBLE' when tscale = 0 then 'FLOAT(' || digits || ')' else
'FLOAT(' || digits || ',' || tscale || ')' end when 'geometry' then case digits
when 4 then 'GEOMETRY(POINT' || case tscale when 0 then '' else ',' || tscale
end || ')' when 8 then 'GEOMETRY(LINESTRING' || case tscale when 0 then '' else
',' || tscale end || ')' when 16 then 'GEOMETRY(POLYGON' || case tscale when 0
then '' else ',' || tscale end || ')' when 20 then 'GEOMETRY(MULTIPOINT' ||
case tscale when 0 then '' else ',' || tscale end || ')' when 24 then
'GEOMETRY(MULTILINESTRING' || case tscale when 0 then '' else ',' || tscale end
|| ')' when 28 then 'GEOMETRY(MULTIPOLYGON' || case tscale when 0 then '' else
',' || tscale end || ')' when 32 then 'GEOMETRY(GEOMETRYCOLLECTION' || case
tscale when 0 then '' else ',' || tscale end || ')' else 'GEOMETRY' end when
'hugeint' then 'HUGEINT' when 'int' then 'INTEGER' when 'month_interval' then
case digits when 1 then 'INTERVAL YEAR' when 2 then 'INTERVAL YEA
R TO MONTH' when 3 then 'INTERVAL MONTH' end when 'real' then case when digits
= 24 and tscale = 0 then 'REAL' when tscale = 0 then 'FLOAT(' || digits || ')'
else 'FLOAT(' || digits || ',' || tscale || ')' end when 'sec_interval' then
case digits when 4 then 'INTERVAL DAY' when 5 then 'INTERVAL DAY TO HOUR' when
6 then 'INTERVAL DAY TO MINUTE' when 7 then 'INTERVAL DAY TO SECOND' when 8
then 'INTERVAL HOUR' when 9 then 'INTERVAL HOUR TO MINUTE' when 10 then
'INTERVAL HOUR TO SECOND' when 11 then 'INTERVAL MINUTE' when 12 then 'INTERVAL
MINUTE TO SECOND' when 13 then 'INTERVAL SECOND' end when 'smallint' then
'SMALLINT' when 'time' then case digits when 1 then 'TIME' else 'TIME(' ||
(digits - 1) || ')' end when 'timestamp' then case digits when 7 then
'TIMESTAMP' else 'TIMESTAMP(' || (digits - 1) || ')' end when 'timestamptz'
then case digits when 7 then 'TIMESTAMP' else 'TIMESTAMP(' || (digits - 1) ||
')' end || ' WITH TIME ZONE' when 'timetz' then case digits when 1 then 'TIME'
els
e 'TIME(' || (digits - 1) || ')' end || ' WITH TIME ZONE' when 'tinyint' then
'TINYINT' when 'varchar' then 'CHARACTER VARYING(' || digits || ')' else case
when lower(ctype) = ctype then upper(ctype) else '"' || ctype || '"' end ||
case digits when 0 then '' else '(' || digits || case tscale when 0 then ''
else ',' || tscale end || ')' end end;
end;
create procedure sys.droporderindex(sys string, tab string, col string)
external name sql.droporderindex;
CREATE FUNCTION env() RETURNS TABLE(name varchar(1024), value varchar(2048))
EXTERNAL NAME inspect."getEnvironment";
@@ -1451,8 +1451,6 @@ select 'sys.privilege_codes', privilege_
select 'sys.dependency_types', dependency_type_id, dependency_type_name from
sys.dependency_types order by dependency_type_id, dependency_type_name;
-- drop helper function
drop function pcre_replace(string, string, string, string);
-#create function pcre_replace(origin string, pat string, repl string, flags
string) returns string external name pcre.replace;
-#select 'sys.schemas', name, authorization, owner, system from sys.schemas
order by name;
% .%1, sys.schemas, sys.schemas, sys.schemas, sys.schemas # table_name
% %1, name, authorization, owner, system # name
% char, varchar, int, int, boolean # type
@@ -1464,7 +1462,6 @@ drop function pcre_replace(string, strin
[ "sys.schemas", "tmp", 2, 3, true ]
[ "sys.schemas", "wlc", 3, 3, true ]
[ "sys.schemas", "wlr", 3, 3, true ]
-#select 'sys._tables', s.name, t.name,
replace(replace(pcre_replace(pcre_replace(t.query, E'--.*\n*', '', ''), E'[
\t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, tt.table_type_name as type,
t.system, ca.action_name as commit_action, at.value as access from sys._tables
t left outer join sys.schemas s on t.schema_id = s.id left outer join
sys.table_types tt on t.type = tt.table_type_id left outer join (values (0,
'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 'ABORT')) as ca
(action_id, action_name) on t.commit_action = ca.action_id left outer join
(values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at (id, value)
on t.access = at.id order by s.name, t.name;
% .%25, .s, .t, ., ., .t, ., . # table_name
% %25, name, name, query, type, system, commit_action, access # name
% char, varchar, varchar, varchar, varchar,
boolean, char, char # type
@@ -1562,7 +1559,6 @@ drop function pcre_replace(string, strin
[ "sys._tables", "tmp", "keys", NULL, "TABLE", true,
"PRESERVE", "WRITABLE" ]
[ "sys._tables", "tmp", "objects", NULL, "TABLE", true,
"PRESERVE", "WRITABLE" ]
[ "sys._tables", "tmp", "triggers", NULL, "TABLE", true,
"PRESERVE", "WRITABLE" ]
-#select 'sys._columns', t.name, c.name, c.type, c.type_digits, c.type_scale,
c."default", c."null", c.number, c.storage from sys._tables t, sys._columns c
where t.id = c.table_id order by t.name, c.number;
% .%1, sys.t, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c, sys.c #
table_name
% %1, name, name, type, type_digits, type_scale, default,
null, number, storage # name
% char, varchar, varchar, varchar, int, int,
varchar, boolean, int, varchar # type
@@ -2155,31 +2151,26 @@ drop function pcre_replace(string, strin
[ "sys._columns", "value_partitions", "value", "varchar",
2048, 0, NULL, true, 2, NULL ]
[ "sys._columns", "var_values", "var_name", "char", 16, 0,
NULL, true, 0, NULL ]
[ "sys._columns", "var_values", "value", "varchar", 1024,
0, NULL, true, 1, NULL ]
-#select 'sys.table_partitions', t.name, c.name, p.expression from
sys.table_partitions p left outer join sys._tables t on p.table_id = t.id left
outer join sys._columns c on p.column_id = c.id;
% .%1, .t, .c, .p # table_name
% %1, name, name, expression # name
% char, varchar, varchar, varchar # type
% 20, 0, 0, 0 # length
-#select 'sys.range_partitions', t.name, p.expression, r.minimum, r.maximum,
r.with_nulls from sys.range_partitions r left outer join sys._tables t on t.id
= r.table_id left outer join sys.table_partitions p on r.partition_id = p.id;
% .%1, .t, .p, .r, .r, .r # table_name
% %1, name, expression, minimum, maximum, with_nulls #
name
% char, varchar, varchar, varchar, varchar,
boolean # type
% 20, 0, 0, 0, 0, 5 # length
-#select 'sys.value_partitions', t.name, p.expression, v.value from
sys.value_partitions v left outer join sys._tables t on t.id = v.table_id left
outer join sys.table_partitions p on v.partition_id = p.id;
% .%1, .t, .p, .v # table_name
% %1, name, expression, value # name
% char, varchar, varchar, varchar # type
% 20, 0, 0, 0 # length
-#with funcs as (select name, pcre_replace(func, E'--.*\n*', '', '') as func,
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name,
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'),
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where
f.func ilike '% external name %') select 'dangling external functions', * from
x where x.modfunc not in (select m.module || '.' || m."function" from
sys.malfunctions() m);
% .%10, .x, .x, .x # table_name
% %10, sname, name, modfunc # name
% char, varchar, varchar, varchar # type
% 27, 0, 0, 0 # length
-#select 'sys.functions', s.name, f.name, case f.system when true then 'SYSTEM'
else '' end as system,
replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func,
E'--.*\n', '', ''), E'[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )',
')'), 'create system ', 'create ') as query, f.mod, fl.language_name,
ft.function_type_name as func_type, f.side_effect, f.varres, f.vararg,
f.semantics, a0.name as name0, a0.type as type0, a0.type_digits as
type_digits0, a0.type_scale as type_scale0, case a0.inout when 0 then 'out'
when 1 then 'in' end as inout0, a1.name as name1, a1.type as type1,
a1.type_digits as type_digits1, a1.type_scale as type_scale1, case a1.inout
when 0 then 'out' when 1 then 'in' end as inout1, a2.name as name2, a2.type as
type2, a2.type_digits as type_digits2, a2.type_scale as type_scale2, case
a2.inout when 0 then 'out' when 1 then 'in' end as inout2, a3.name as name3,
a3.type as type3, a3.type_digits as type_digits3, a3.type_scale as type_scale3,
case a3.i
nout when 0 then 'out' when 1 then 'in' end as inout3, a4.name as name4,
a4.type as type4, a4.type_digits as type_digits4, a4.type_scale as type_scale4,
case a4.inout when 0 then 'out' when 1 then 'in' end as inout4, a5.name as
name5, a5.type as type5, a5.type_digits as type_digits5, a5.type_scale as
type_scale5, case a5.inout when 0 then 'out' when 1 then 'in' end as inout5,
a6.name as name6, a6.type as type6, a6.type_digits as type_digits6,
a6.type_scale as type_scale6, case a6.inout when 0 then 'out' when 1 then 'in'
end as inout6, a7.name as name7, a7.type as type7, a7.type_digits as
type_digits7, a7.type_scale as type_scale7, case a7.inout when 0 then 'out'
when 1 then 'in' end as inout7, a8.name as name8, a8.type as type8,
a8.type_digits as type_digits8, a8.type_scale as type_scale8, case a8.inout
when 0 then 'out' when 1 then 'in' end as inout8, a9.name as name9, a9.type as
type9, a9.type_digits as type_digits9, a9.type_scale as type_scale9, case
a9.inout when 0 then 'out' wh
en 1 then 'in' end as inout9, a10.name as name10, a10.type as type10,
a10.type_digits as type_digits10, a10.type_scale as type_scale10, case
a10.inout when 0 then 'out' when 1 then 'in' end as inout10, a11.name as
name11, a11.type as type11, a11.type_digits as type_digits11, a11.type_scale as
type_scale11, case a11.inout when 0 then 'out' when 1 then 'in' end as inout11,
a12.name as name12, a12.type as type12, a12.type_digits as type_digits12,
a12.type_scale as type_scale12, case a12.inout when 0 then 'out' when 1 then
'in' end as inout12, a13.name as name13, a13.type as type13, a13.type_digits as
type_digits13, a13.type_scale as type_scale13, case a13.inout when 0 then 'out'
when 1 then 'in' end as inout13, a14.name as name14, a14.type as type14,
a14.type_digits as type_digits14, a14.type_scale as type_scale14, case
a14.inout when 0 then 'out' when 1 then 'in' end as inout14, a15.name as
name15, a15.type as type15, a15.type_digits as type_digits15, a15.type_scale as
type_scale15, c
ase a15.inout when 0 then 'out' when 1 then 'in' end as inout15 from
sys.functions f left outer join sys.schemas s on f.schema_id = s.id left outer
join sys.function_types as ft on f.type = ft.function_type_id left outer join
sys.function_languages fl on f.language = fl.language_id left outer join
sys.args a0 on a0.func_id = f.id and a0.number = 0 left outer join sys.args a1
on a1.func_id = f.id and a1.number = 1 left outer join sys.args a2 on
a2.func_id = f.id and a2.number = 2 left outer join sys.args a3 on a3.func_id =
f.id and a3.number = 3 left outer join sys.args a4 on a4.func_id = f.id and
a4.number = 4 left outer join sys.args a5 on a5.func_id = f.id and a5.number =
5 left outer join sys.args a6 on a6.func_id = f.id and a6.number = 6 left outer
join sys.args a7 on a7.func_id = f.id and a7.number = 7 left outer join
sys.args a8 on a8.func_id = f.id and a8.number = 8 left outer join sys.args a9
on a9.func_id = f.id and a9.number = 9 left outer join sys.args a10 on
a10.func_id
= f.id and a10.number = 10 left outer join sys.args a11 on a11.func_id = f.id
and a11.number = 11 left outer join sys.args a12 on a12.func_id = f.id and
a12.number = 12 left outer join sys.args a13 on a13.func_id = f.id and
a13.number = 13 left outer join sys.args a14 on a14.func_id = f.id and
a14.number = 14 left outer join sys.args a15 on a15.func_id = f.id and
a15.number = 15 order by s.name, f.name, query, func_type, name0 nulls first,
type0 nulls first, type_digits0 nulls first, type_scale0 nulls first, inout0
nulls first, name1 nulls first, type1 nulls first, type_digits1 nulls first,
type_scale1 nulls first, inout1 nulls first, name2 nulls first, type2 nulls
first, type_digits2 nulls first, type_scale2 nulls first, inout2 nulls first,
name3 nulls first, type3 nulls first, type_digits3 nulls first, type_scale3
nulls first, inout3 nulls first, name4 nulls first, type4 nulls first,
type_digits4 nulls first, type_scale4 nulls first, inout4 nulls first, name5
nulls first, type5 nu
lls first, type_digits5 nulls first, type_scale5 nulls first, inout5 nulls
first, name6 nulls first, type6 nulls first, type_digits6 nulls first,
type_scale6 nulls first, inout6 nulls first, name7 nulls first, type7 nulls
first, type_digits7 nulls first, type_scale7 nulls first, inout7 nulls first,
name8 nulls first, type8 nulls first, type_digits8 nulls first, type_scale8
nulls first, inout8 nulls first, name9 nulls first, type9 nulls first,
type_digits9 nulls first, type_scale9 nulls first, inout9 nulls first, name10
nulls first, type10 nulls first, type_digits10 nulls first, type_scale10 nulls
first, inout10 nulls first, name11 nulls first, type11 nulls first,
type_digits11 nulls first, type_scale11 nulls first, inout11 nulls first,
name12 nulls first, type12 nulls first, type_digits12 nulls first, type_scale12
nulls first, inout12 nulls first, name13 nulls first, type13 nulls first,
type_digits13 nulls first, type_scale13 nulls first, inout13 nulls first,
name14 nulls first, typ
e14 nulls first, type_digits14 nulls first, type_scale14 nulls first, inout14
nulls first, name15 nulls first, type15 nulls first, type_digits15 nulls first,
type_scale15 nulls first, inout15 nulls first;
% .%1, .s, .f, ., ., .f, .fl, ., .f, .f,
.f, .f, ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., ., ., ., ., ., ., ., ., .,
., . # table_name
% %1, name, name, system, query, mod, language_name, func_type,
side_effect, varres, vararg, semantics, name0, type0, type_digits0,
type_scale0, inout0, name1, type1, type_digits1, type_scale1, inout1,
name2, type2, type_digits2, type_scale2, inout2, name3, type3,
type_digits3, type_scale3, inout3, name4, type4, type_digits4,
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5,
name6, type6, type_digits6, type_scale6, inout6, name7, type7,
type_digits7, type_scale7, inout7, name8, type8, type_digits8,
type_scale8, inout8, name9, type9, type_digits9, type_scale9, inout9,
name10, type10, type_digits10, type_scale10, inout10, name11, type11,
type_digits11, type_scale11, inout11, name12, type12, type_digits12,
type_scale12, inout12, name13, type13, type_digits13, type_scale13,
inout13, name14, type14, type_digits14, type_scale14, inout14,
name15, type15, type_digits15, type_scale15, inout15 # name
% char, varchar, varchar, char, varchar,
varchar, varchar, varchar, boolean, boolean,
boolean, boolean, varchar, varchar, int, int,
char, varchar, varchar, int, int, char, varchar,
varchar, int, int, char, varchar, varchar, int,
int, char, varchar, varchar, int, int, char,
varchar, varchar, int, int, char, varchar,
varchar, int, int, char, varchar, varchar, int,
int, char, varchar, varchar, int, int, char,
varchar, varchar, int, int, char, varchar,
varchar, int, int, char, varchar, varchar, int,
int, char, varchar, varchar, int, int, char,
varchar, varchar, int, int, char, varchar,
varchar, int, int, char, varchar, varchar, int,
int, char # type
-% 13, 8, 24, 6, 3408, 9, 10, 26, 5, 5,
5, 5, 11, 14, 4, 1, 3, 16, 14, 4,
1, 3, 16, 14, 4, 1, 3, 27, 12, 4,
1, 3, 9, 9, 2, 1, 3, 14, 14, 4,
1, 3, 12, 14, 2, 1, 3, 11, 7, 2,
1, 3, 11, 7, 2, 1, 3, 10, 6, 2,
1, 3, 9, 6, 2, 1, 3, 6, 7, 2,
1, 3, 8, 7, 2, 1, 3, 6, 7, 2,
1, 3, 9, 7, 1, 1, 3, 6, 7, 1,
1, 3 # length
+% 13, 8, 24, 6, 3342, 9, 10, 26, 5, 5,
5, 5, 11, 14, 4, 1, 3, 16, 14, 4,
1, 3, 16, 14, 4, 1, 3, 27, 12, 4,
1, 3, 9, 9, 2, 1, 3, 14, 14, 4,
1, 3, 12, 14, 2, 1, 3, 11, 7, 2,
1, 3, 11, 7, 2, 1, 3, 10, 6, 2,
1, 3, 9, 6, 2, 1, 3, 6, 7, 2,
1, 3, 8, 7, 2, 1, 3, 6, 7, 2,
1, 3, 9, 7, 1, 1, 3, 6, 7, 1,
1, 3 # length
[ "sys.functions", "json", "filter", "SYSTEM", "create
function json.filter(js json, name bigint) returns json external name
json.filter;", "json", "MAL", "Scalar function", false, false,
false, true, "result", "json", 0, 0, "out", "js", "json",
0, 0, "in", "name", "bigint", 64, 0, "in", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL ]
[ "sys.functions", "json", "filter", "SYSTEM", "create
function json.filter(js json, name integer) returns json external name
json.filter;", "json", "MAL", "Scalar function", false, false, false,
true, "result", "json", 0, 0, "out", "js", "json", 0,
0, "in", "name", "int", 32, 0, "in", NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL ]
[ "sys.functions", "json", "filter", "SYSTEM", "create
function json.filter(js json, name tinyint) returns json external name
json.filter;", "json", "MAL", "Scalar function", false, false, false,
true, "result", "json", 0, 0, "out", "js", "json", 0,
0, "in", "name", "tinyint", 8, 0, "in", NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL ]
@@ -2429,7 +2420,7 @@ drop function pcre_replace(string, strin
[ "sys.functions", "sys", "describe_columns", "SYSTEM", "create
function sys.describe_columns(schemaname string, tablename string) returns
table(name string, type string, digits integer, scale integer, nulls boolean,
cdefault string, number integer, sqltype string, remark string) begin return
select c.name, c.\"type\", c.type_digits, c.type_scale, c.\"null\",
c.\"default\", c.number, describe_type(c.\"type\", c.type_digits,
c.type_scale), com.remark from sys._tables t, sys.schemas s, sys._columns c
left outer join sys.comments com on c.id = com.id where c.table_id = t.id and
t.name = tablename and t.schema_id = s.id and s.name = schemaname order by
c.number; end;", "user", "SQL", "Function returning a table", false,
false, false, true, "name", "clob", 0, 0, "out", "type", "clob",
0, 0, "out", "digits", "int", 32, 0, "out",
"scale", "int", 32, 0, "out", "nulls", "boolean",
1, 0, "out", "cdefault", "clob", 0, 0, "out",
"number", "int", 32, 0, "out", "sqltype", "clob", 0,
0, "out", "re
mark", "clob", 0, 0, "out", "schemaname", "clob", 0, 0,
"in", "tablename", "clob", 0, 0, "in", NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL ]
[ "sys.functions", "sys", "describe_function", "SYSTEM", "create
function sys.describe_function(schemaname string, functionname string) returns
table(id integer, name string, type string, language string, remark string)
begin return select f.id, f.name, ft.function_type_keyword,
fl.language_keyword, c.remark from sys.functions f join sys.schemas s on
f.schema_id = s.id join sys.function_types ft on f.type = ft.function_type_id
left outer join sys.function_languages fl on f.language = fl.language_id left
outer join sys.comments c on f.id = c.id where f.name=functionname and s.name =
schemaname; end;", "user", "SQL", "Function returning a table", false,
false, false, true, "id", "int", 32, 0, "out", "name", "clob",
0, 0, "out", "type", "clob", 0, 0, "out", "language",
"clob", 0, 0, "out", "remark", "clob", 0, 0, "out",
"schemaname", "clob", 0, 0, "in", "functionname", "clob", 0,
0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NU
LL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ]
[ "sys.functions", "sys", "describe_table", "SYSTEM", "create
function sys.describe_table(schemaname string, tablename string) returns
table(name string, query string, type string, id integer, remark string) begin
return select t.name, t.query, tt.table_type_name, t.id, c.remark from
sys.schemas s, sys.table_types tt, sys._tables t left outer join sys.comments c
on t.id = c.id where s.name = schemaname and t.schema_id = s.id and t.name =
tablename and t.type = tt.table_type_id; end;", "user", "SQL", "Function
returning a table", false, false, false, true, "name", "clob", 0,
0, "out", "query", "clob", 0, 0, "out", "type", "clob",
0, 0, "out", "id", "int", 32, 0, "out", "remark",
"clob", 0, 0, "out", "schemaname", "clob", 0, 0, "in",
"tablename", "clob", 0, 0, "in", NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL ]
-[ "sys.functions", "sys", "describe_type", "SYSTEM", "create
function sys.describe_type(ctype string, digits integer, tscale integer)
returns string begin return case ctype when 'bigint' then 'BIGINT' when 'blob'
then case digits when 0 then 'BINARY LARGE OBJECT' else 'BINARY LARGE OBJECT('
|| cast(digits as string) || ')' end when 'boolean' then 'BOOLEAN' when 'char'
then case digits when 1 then 'CHARACTER' else 'CHARACTER(' || cast(digits as
string) || ')' end when 'clob' then case digits when 0 then 'CHARACTER LARGE
OBJECT' else 'CHARACTER LARGE OBJECT(' || cast(digits as string) || ')' end
when 'date' then 'DATE' when 'day_interval' then 'INTERVAL DAY' when 'decimal'
then 'DECIMAL(' || cast(digits as string) || ',' || cast(tscale as string) ||
')' when 'double' then case when digits = 53 and tscale = 0 then 'DOUBLE' when
tscale = 0 then 'FLOAT(' || cast(digits as string) || ')' else 'FLOAT(' ||
cast(digits as string) || ',' || cast(tscale as string) || ')' end when
'geometry' th
en case digits when 4 then 'GEOMETRY(POINT' || case tscale when 0 then '' else
',' || cast(tscale as string) end || ')' when 8 then 'GEOMETRY(LINESTRING' ||
case tscale when 0 then '' else ',' || cast(tscale as string) end || ')' when
16 then 'GEOMETRY(POLYGON' || case tscale when 0 then '' else ',' ||
cast(tscale as string) end || ')' when 20 then 'GEOMETRY(MULTIPOINT' || case
tscale when 0 then '' else ',' || cast(tscale as string) end || ')' when 24
then 'GEOMETRY(MULTILINESTRING' || case tscale when 0 then '' else ',' ||
cast(tscale as string) end || ')' when 28 then 'GEOMETRY(MULTIPOLYGON' || case
tscale when 0 then '' else ',' || cast(tscale as string) end || ')' when 32
then 'GEOMETRY(GEOMETRYCOLLECTION' || case tscale when 0 then '' else ',' ||
cast(tscale as string) end || ')' else 'GEOMETRY' end when 'hugeint' then
'HUGEINT' when 'int' then 'INTEGER' when 'month_interval' then case digits when
1 then 'INTERVAL YEAR' when 2 then 'INTERVAL YEAR TO MONTH' when 3 then 'INTERVA
L MONTH' end when 'real' then case when digits = 24 and tscale = 0 then 'REAL'
when tscale = 0 then 'FLOAT(' || cast(digits as string) || ')' else 'FLOAT(' ||
cast(digits as string) || ',' || cast(tscale as string) || ')' end when
'sec_interval' then case digits when 4 then 'INTERVAL DAY' when 5 then
'INTERVAL DAY TO HOUR' when 6 then 'INTERVAL DAY TO MINUTE' when 7 then
'INTERVAL DAY TO SECOND' when 8 then 'INTERVAL HOUR' when 9 then 'INTERVAL HOUR
TO MINUTE' when 10 then 'INTERVAL HOUR TO SECOND' when 11 then 'INTERVAL
MINUTE' when 12 then 'INTERVAL MINUTE TO SECOND' when 13 then 'INTERVAL SECOND'
end when 'smallint' then 'SMALLINT' when 'time' then case digits when 1 then
'TIME' else 'TIME(' || cast(digits - 1 as string) || ')' end when 'timestamp'
then case digits when 7 then 'TIMESTAMP' else 'TIMESTAMP(' || cast(digits - 1
as string) || ')' end when 'timestamptz' then case digits when 7 then
'TIMESTAMP' else 'TIMESTAMP(' || cast(digits - 1 as string) || ')' end || '
WITH TIME Z
ONE' when 'timetz' then case digits when 1 then 'TIME' else 'TIME(' ||
cast(digits - 1 as string) || ')' end || ' WITH TIME ZONE' when 'tinyint' then
'TINYINT' when 'varchar' then 'CHARACTER VARYING(' || cast(digits as string) ||
')' else case when lower(ctype) = ctype then upper(ctype) else '\"' || ctype ||
'\"' end || case digits when 0 then '' else '(' || cast(digits as string) ||
case tscale when 0 then '' else ',' || cast(tscale as string) end || ')' end
end; end;", "user", "SQL", "Scalar function", false, false, false,
true, "result", "clob", 0, 0, "out", "ctype", "clob",
0, 0, "in", "digits", "int", 32, 0, "in",
"tscale", "int", 32, 0, "in", NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL
, NULL, NULL, NULL ]
+[ "sys.functions", "sys", "describe_type", "SYSTEM", "create
function sys.describe_type(ctype string, digits integer, tscale integer)
returns string begin return case ctype when 'bigint' then 'BIGINT' when 'blob'
then case digits when 0 then 'BINARY LARGE OBJECT' else 'BINARY LARGE OBJECT('
|| digits || ')' end when 'boolean' then 'BOOLEAN' when 'char' then case digits
when 1 then 'CHARACTER' else 'CHARACTER(' || digits || ')' end when 'clob' then
case digits when 0 then 'CHARACTER LARGE OBJECT' else 'CHARACTER LARGE OBJECT('
|| digits || ')' end when 'date' then 'DATE' when 'day_interval' then 'INTERVAL
DAY' when ctype = 'decimal' then case when (digits = 1 and tscale = 0) or
digits = 0 then 'DECIMAL' when tscale = 0 then 'DECIMAL(' || digits || ')' when
digits = 39 then 'DECIMAL(' || 38 || ',' || tscale || ')' when digits = 19 and
(select count(*) = 0 from sys.types where sqlname = 'hugeint') then 'DECIMAL('
|| 18 || ',' || tscale || ')' else 'DECIMAL(' || digits || ',' || tscale
|| ')' end when 'double' then case when digits = 53 and tscale = 0 then
'DOUBLE' when tscale = 0 then 'FLOAT(' || digits || ')' else 'FLOAT(' || digits
|| ',' || tscale || ')' end when 'geometry' then case digits when 4 then
'GEOMETRY(POINT' || case tscale when 0 then '' else ',' || tscale end || ')'
when 8 then 'GEOMETRY(LINESTRING' || case tscale when 0 then '' else ',' ||
tscale end || ')' when 16 then 'GEOMETRY(POLYGON' || case tscale when 0 then ''
else ',' || tscale end || ')' when 20 then 'GEOMETRY(MULTIPOINT' || case tscale
when 0 then '' else ',' || tscale end || ')' when 24 then
'GEOMETRY(MULTILINESTRING' || case tscale when 0 then '' else ',' || tscale end
|| ')' when 28 then 'GEOMETRY(MULTIPOLYGON' || case tscale when 0 then '' else
',' || tscale end || ')' when 32 then 'GEOMETRY(GEOMETRYCOLLECTION' || case
tscale when 0 then '' else ',' || tscale end || ')' else 'GEOMETRY' end when
'hugeint' then 'HUGEINT' when 'int' then 'INTEGER' when 'month_interval' then
case digits
when 1 then 'INTERVAL YEAR' when 2 then 'INTERVAL YEAR TO MONTH' when 3 then
'INTERVAL MONTH' end when 'real' then case when digits = 24 and tscale = 0 then
'REAL' when tscale = 0 then 'FLOAT(' || digits || ')' else 'FLOAT(' || digits
|| ',' || tscale || ')' end when 'sec_interval' then case digits when 4 then
'INTERVAL DAY' when 5 then 'INTERVAL DAY TO HOUR' when 6 then 'INTERVAL DAY TO
MINUTE' when 7 then 'INTERVAL DAY TO SECOND' when 8 then 'INTERVAL HOUR' when 9
then 'INTERVAL HOUR TO MINUTE' when 10 then 'INTERVAL HOUR TO SECOND' when 11
then 'INTERVAL MINUTE' when 12 then 'INTERVAL MINUTE TO SECOND' when 13 then
'INTERVAL SECOND' end when 'smallint' then 'SMALLINT' when 'time' then case
digits when 1 then 'TIME' else 'TIME(' || (digits - 1) || ')' end when
'timestamp' then case digits when 7 then 'TIMESTAMP' else 'TIMESTAMP(' ||
(digits - 1) || ')' end when 'timestamptz' then case digits when 7 then
'TIMESTAMP' else 'TIMESTAMP(' || (digits - 1) || ')' end || ' WITH TIME ZONE'
when 'timetz' then case digits when 1 then 'TIME' else 'TIME(' || (digits -
1) || ')' end || ' WITH TIME ZONE' when 'tinyint' then 'TINYINT' when 'varchar'
then 'CHARACTER VARYING(' || digits || ')' else case when lower(ctype) = ctype
then upper(ctype) else '\"' || ctype || '\"' end || case digits when 0 then ''
else '(' || digits || case tscale when 0 then '' else ',' || tscale end || ')'
end end; end;", "user", "SQL", "Scalar function", false, false,
false, true, "result", "clob", 0, 0, "out", "ctype",
"clob", 0, 0, "in", "digits", "int", 32, 0, "in",
"tscale", "int", 32, 0, "in", NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL ]
[ "sys.functions", "sys", "diff", "SYSTEM", "diff", "sql",
"Internal C", "Analytic function", false, false, false, true,
"res_0", "boolean", 1, 0, "out", "arg_1", "any",
0, 0, "in", NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL ]
[ "sys.functions", "sys", "diff", "SYSTEM", "diff", "sql",
"Internal C", "Analytic function", false, false, false, true,
"res_0", "boolean", 1, 0, "out", "arg_1",
"boolean", 1, 0, "in", "arg_2", "any", 0, 0,
"in", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL ]
[ "sys.functions", "sys", "difference", "SYSTEM", "stringdiff",
"txtsim", "Internal C", "Scalar function", false, false, false,
true, "res_0", "int", 32, 0, "out", "arg_1", "char",
0, 0, "in", "arg_2", "char", 0, 0, "in", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL ]
@@ -3572,7 +3563,6 @@ drop function pcre_replace(string, strin
[ "sys.functions", "wlr", "replicate", "SYSTEM", "create
procedure wlr.replicate(pointintime timestamp) external name wlr.replicate;",
"wlr", "MAL", "Procedure", true, false, false, true, "pointintime",
"timestamp", 7, 0, "in", NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
]
[ "sys.functions", "wlr", "stop", "SYSTEM", "create procedure
wlr.stop() external name wlr.stop;", "wlr", "MAL", "Procedure", true,
false, false, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL ]
[ "sys.functions", "wlr", "tick", "SYSTEM", "create function
wlr.tick() returns bigint external name wlr.\"gettick\";", "wlr", "MAL",
"Scalar function", true, false, false, true, "result",
"bigint", 64, 0, "out", NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
]
-#select 'sys.auths', name, grantor from sys.auths;
% .%1, sys.auths, sys.auths # table_name
% %1, name, grantor # name
% char, varchar, int # type
@@ -3581,44 +3571,36 @@ drop function pcre_replace(string, strin
[ "sys.auths", "sysadmin", 0 ]
[ "sys.auths", "monetdb", 0 ]
[ "sys.auths", ".snapshot", 3 ]
-#select 'schema comments', s.name, c.remark from sys.comments c, sys.schemas s
where s.id = c.id order by s.name;
% .%1, sys.s, sys.c # table_name
% %1, name, remark # name
% char, varchar, varchar # type
% 15, 0, 0 # length
-#select 'table comments', s.name, t.name, c.remark from sys.schemas s,
sys._tables t, sys.comments c where s.id = t.schema_id and t.id = c.id order by
s.name, t.name;
% .%1, sys.s, sys.t, sys.c # table_name
% %1, name, name, remark # name
% char, varchar, varchar, varchar # type
% 14, 0, 0, 0 # length
-#select 'column comments', s.name, t.name, col.name, c.remark from sys.schemas
s, sys._tables t, sys._columns col, sys.comments c where s.id = t.schema_id and
t.id = col.table_id and col.id = c.id order by s.name, t.name, col.name;
% .%1, sys.s, sys.t, sys.col, sys.c # table_name
% %1, name, name, name, remark # name
% char, varchar, varchar, varchar, varchar # type
% 15, 0, 0, 0, 0 # length
-#select 'index comments', s.name, t.name, i.name, c.remark from sys.schemas s,
sys._tables t, sys.idxs i, sys.comments c where s.id = t.schema_id and t.id =
i.table_id and i.id = c.id order by s.name, t.name, i.name;
% .%1, sys.s, sys.t, sys.i, sys.c # table_name
% %1, name, name, name, remark # name
% char, varchar, varchar, varchar, varchar # type
% 14, 0, 0, 0, 0 # length
-#select 'sequence comments', s.name, q.name, c.remark from sys.schemas s,
sys.sequences q, sys.comments c where s.id = q.schema_id and q.id = c.id order
by s.name, q.name;
% .%1, sys.s, sys.q, sys.c # table_name
% %1, name, name, remark # name
% char, varchar, varchar, varchar # type
% 17, 0, 0, 0 # length
-#select 'function comments', s.name, f.name, c.remark from sys.schemas s,
sys.functions f, sys.comments c where s.id = f.schema_id and f.id = c.id order
by s.name, f.name;
% .%1, sys.s, sys.f, sys.c # table_name
% %1, name, name, remark # name
% char, varchar, varchar, varchar # type
% 17, 0, 0, 0 # length
-#select 'sys.db_user_info', u.name, u.fullname, s.name from sys.db_user_info u
left outer join sys.schemas s on u.default_schema = s.id order by u.name;
% .%1, .u, .u, .s # table_name
% %1, name, fullname, name # name
% char, varchar, varchar, varchar # type
% 16, 9, 13, 3 # length
[ "sys.db_user_info", ".snapshot", "Snapshot User", "sys" ]
[ "sys.db_user_info", "monetdb", "MonetDB Admin", "sys" ]
-#select 'function used by function', s1.name, f1.name, s2.name, f2.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys.functions
f1, sys.functions f2, sys.schemas s1, sys.schemas s2 where d.id = f1.id and
d.depend_id = f2.id and f1.schema_id = s1.id and f2.schema_id = s2.id order by
s2.name, f2.name, s1.name, f1.name;
% .%1, sys.s1, sys.f1, sys.s2, sys.f2, .dt # table_name
% %1, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar # type
@@ -3630,7 +3612,6 @@ drop function pcre_replace(string, strin
[ "function used by function", "sys", "getproj4", "sys", "st_transform",
"FUNCTION" ]
[ "function used by function", "sys", "internaltransform", "sys",
"st_transform", "FUNCTION" ]
[ "function used by function", "sys", "st_srid", "sys", "st_transform",
"FUNCTION" ]
-#select 'table used by function', s1.name, t.name, s2.name, f.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys._tables
t, sys.schemas s1, sys.functions f, sys.schemas s2 where d.id = t.id and
d.depend_id = f.id and t.schema_id = s1.id and f.schema_id = s2.id order by
s2.name, f.name, s1.name, t.name;
% .%1, sys.s1, sys.t, sys.s2, sys.f, .dt # table_name
% %1, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar # type
@@ -3648,6 +3629,7 @@ drop function pcre_replace(string, strin
[ "table used by function", "sys", "comments", "sys",
"describe_table", "FUNCTION" ]
[ "table used by function", "sys", "schemas", "sys",
"describe_table", "FUNCTION" ]
[ "table used by function", "sys", "table_types", "sys",
"describe_table", "FUNCTION" ]
+[ "table used by function", "sys", "types", "sys",
"describe_type", "FUNCTION" ]
[ "table used by function", "sys", "spatial_ref_sys", "sys",
"getproj4", "FUNCTION" ]
[ "table used by function", "sys", "columns", "sys",
"storagemodelinit", "PROCEDURE" ]
[ "table used by function", "sys", "keys", "sys", "storagemodelinit",
"PROCEDURE" ]
@@ -3656,7 +3638,6 @@ drop function pcre_replace(string, strin
[ "table used by function", "sys", "storage", "sys",
"storagemodelinit", "PROCEDURE" ]
[ "table used by function", "sys", "storagemodelinput", "sys",
"storagemodelinit", "PROCEDURE" ]
[ "table used by function", "sys", "tables", "sys",
"storagemodelinit", "PROCEDURE" ]
-#select 'column used by function', s1.name, t.name, c.name, s2.name, f.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys._columns
c, sys._tables t, sys.schemas s1, sys.functions f, sys.schemas s2 where d.id =
c.id and d.depend_id = f.id and c.table_id = t.id and t.schema_id = s1.id and
f.schema_id = s2.id order by s2.name, f.name, s1.name, t.name, c.name;
% .%1, sys.s1, sys.t, sys.c, sys.s2, sys.f, .dt # table_name
% %1, name, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar, varchar # type
@@ -3728,6 +3709,14 @@ drop function pcre_replace(string, strin
[ "column used by function", "sys", "schemas", "system", "sys",
"describe_table", "FUNCTION" ]
[ "column used by function", "sys", "table_types", "table_type_id",
"sys", "describe_table", "FUNCTION" ]
[ "column used by function", "sys", "table_types", "table_type_name",
"sys", "describe_table", "FUNCTION" ]
+[ "column used by function", "sys", "types", "digits", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "eclass", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "id", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "radix", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "scale", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "schema_id", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "sqlname", "sys",
"describe_type", "FUNCTION" ]
+[ "column used by function", "sys", "types", "systemname", "sys",
"describe_type", "FUNCTION" ]
[ "column used by function", "sys", "spatial_ref_sys", "auth_name",
"sys", "getproj4", "FUNCTION" ]
[ "column used by function", "sys", "spatial_ref_sys", "auth_srid",
"sys", "getproj4", "FUNCTION" ]
[ "column used by function", "sys", "spatial_ref_sys", "proj4text",
"sys", "getproj4", "FUNCTION" ]
@@ -3795,7 +3784,6 @@ drop function pcre_replace(string, strin
[ "column used by function", "sys", "tables", "system", "sys",
"storagemodelinit", "PROCEDURE" ]
[ "column used by function", "sys", "tables", "temporary", "sys",
"storagemodelinit", "PROCEDURE" ]
[ "column used by function", "sys", "tables", "type", "sys",
"storagemodelinit", "PROCEDURE" ]
-#select 'function used by view', s1.name, f1.name, s2.name, t2.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys.schemas
s1, sys.functions f1, sys.schemas s2, sys._tables t2 where d.id = f1.id and
f1.schema_id = s1.id and d.depend_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, s1.name, f1.name;
% .%1, sys.s1, sys.f1, sys.s2, sys.t2, .dt # table_name
% %1, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar # type
@@ -3827,7 +3815,6 @@ drop function pcre_replace(string, strin
[ "function used by view", "sys", "imprintsize", "sys",
"tablestoragemodel", "VIEW" ]
[ "function used by view", "sys", "tracelog", "sys", "tracelog",
"VIEW" ]
[ "function used by view", "sys", "db_users", "sys", "users",
"VIEW" ]
-#select 'table used by view', s1.name, t1.name, s2.name, t2.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys.schemas
s1, sys._tables t1, sys.schemas s2, sys._tables t2 where d.id = t1.id and
t1.schema_id = s1.id and d.depend_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, s1.name, t1.name;
% .%1, sys.s1, sys.t1, sys.s2, sys.t2, .dt # table_name
% %1, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar # type
@@ -3940,7 +3927,6 @@ drop function pcre_replace(string, strin
[ "table used by view", "sys", "storage", "sys", "tablestorage",
"VIEW" ]
[ "table used by view", "sys", "storagemodelinput", "sys",
"tablestoragemodel", "VIEW" ]
[ "table used by view", "sys", "db_user_info", "sys", "users",
"VIEW" ]
-#select 'column used by view', s1.name, t1.name, c1.name, s2.name, t2.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys.schemas
s1, sys._tables t1, sys._columns c1, sys.schemas s2, sys._tables t2 where d.id
= c1.id and c1.table_id = t1.id and t1.schema_id = s1.id and d.depend_id =
t2.id and t2.schema_id = s2.id order by s2.name, t2.name, s1.name, t1.name,
c1.name;
% .%1, sys.s1, sys.t1, sys.c1, sys.s2, sys.t2, .dt # table_name
% %1, name, name, name, name, name, dependency_type_name # name
% char, varchar, varchar, varchar, varchar,
varchar, varchar # type
@@ -4322,7 +4308,6 @@ drop function pcre_replace(string, strin
[ "column used by view", "sys", "db_user_info", "default_schema",
"sys", "users", "VIEW" ]
[ "column used by view", "sys", "db_user_info", "fullname", "sys",
"users", "VIEW" ]
[ "column used by view", "sys", "db_user_info", "name", "sys",
"users", "VIEW" ]
-#select 'column used by key', s1.name, t1.name, c1.name, s2.name, t2.name,
k2.name, dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys._tables
t1, sys._tables t2, sys.schemas s1, sys.schemas s2, sys._columns c1, sys.keys
k2 where d.id = c1.id and d.depend_id = k2.id and c1.table_id = t1.id and
t1.schema_id = s1.id and k2.table_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, k2.name, s1.name, t1.name, c1.name;
% .%1, sys.s1, sys.t1, sys.c1, sys.s2, sys.t2, sys.k2, .dt # table_name
% %1, name, name, name, name, name, name, dependency_type_name #
name
% char, varchar, varchar, varchar, varchar,
varchar, varchar, varchar # type
@@ -4344,7 +4329,6 @@ drop function pcre_replace(string, strin
[ "column used by key", "sys", "spatial_ref_sys", "srid", "sys",
"spatial_ref_sys", "spatial_ref_sys_srid_pkey", "KEY" ]
[ "column used by key", "sys", "table_types", "table_type_id",
"sys", "table_types", "table_types_table_type_id_pkey", "KEY" ]
[ "column used by key", "sys", "table_types", "table_type_name",
"sys", "table_types", "table_types_table_type_name_unique", "KEY" ]
-#select 'column used by index', s1.name, t1.name, c1.name, s2.name, t2.name,
i2.name, dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys._tables
t1, sys._tables t2, sys.schemas s1, sys.schemas s2, sys._columns c1, sys.idxs
i2 where d.id = c1.id and d.depend_id = i2.id and c1.table_id = t1.id and
t1.schema_id = s1.id and i2.table_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, i2.name, s1.name, t1.name, c1.name;
% .%1, sys.s1, sys.t1, sys.c1, sys.s2, sys.t2, sys.i2, .dt # table_name
% %1, name, name, name, name, name, name, dependency_type_name #
name
% char, varchar, varchar, varchar, varchar,
varchar, varchar, varchar # type
@@ -4366,7 +4350,6 @@ drop function pcre_replace(string, strin
[ "column used by index", "sys", "spatial_ref_sys", "srid", "sys",
"spatial_ref_sys", "spatial_ref_sys_srid_pkey", "INDEX" ]
[ "column used by index", "sys", "table_types", "table_type_id",
"sys", "table_types", "table_types_table_type_id_pkey", "INDEX" ]
[ "column used by index", "sys", "table_types", "table_type_name",
"sys", "table_types", "table_types_table_type_name_unique", "INDEX" ]
-#select 'type used by function', t.systemname, t.sqlname, s.name, f.name,
dt.dependency_type_name from sys.dependencies d left outer join
sys.dependency_types dt on d.depend_type = dt.dependency_type_id, sys.types t,
sys.functions f, sys.schemas s where d.id = t.id and d.depend_id = f.id and
f.schema_id = s.id order by s.name, f.name, t.systemname, t.sqlname;
% .%1, sys.t, sys.t, sys.s, sys.f, .dt # table_name
% %1, systemname, sqlname, name, name, dependency_type_name #
name
% char, varchar, varchar, varchar, varchar,
varchar # type
@@ -4414,7 +4397,6 @@ drop function pcre_replace(string, strin
[ "type used by function", "inet", "inet", "sys", "text", "TYPE" ]
[ "type used by function", "uuid", "uuid", "sys", "uuid", "TYPE" ]
[ "type used by function", "uuid", "uuid", "sys", "uuid", "TYPE" ]
-#select 'sys.idxs', t.name, i.name, it.index_type_name from sys.idxs i left
outer join sys._tables t on t.id = i.table_id left outer join sys.index_types
as it on i.type = it.index_type_id order by t.name, i.name;
% .%1, .t, .i, .it # table_name
% %1, name, name, index_type_name # name
% char, varchar, varchar, varchar # type
@@ -4436,7 +4418,6 @@ drop function pcre_replace(string, strin
[ "sys.idxs", "spatial_ref_sys", "spatial_ref_sys_srid_pkey", "Hash"
]
[ "sys.idxs", "table_types", "table_types_table_type_id_pkey", "Hash"
]
[ "sys.idxs", "table_types", "table_types_table_type_name_unique", "Hash"
]
-#select 'sys.keys', t.name, k.name, kt.key_type_name, k2.name, k.action from
sys.keys k left outer join sys.keys k2 on k.rkey = k2.id left outer join
sys._tables t on k.table_id = t.id left outer join sys.key_types kt on k.type =
kt.key_type_id order by t.name, k.name;
% .%1, .t, .k, .kt, .k2, .k # table_name
% %1, name, name, key_type_name, name, action # name
% char, varchar, varchar, varchar, varchar,
int # type
@@ -4458,7 +4439,6 @@ drop function pcre_replace(string, strin
[ "sys.keys", "spatial_ref_sys", "spatial_ref_sys_srid_pkey",
"Primary Key", NULL, -1 ]
[ "sys.keys", "table_types", "table_types_table_type_id_pkey",
"Primary Key", NULL, -1 ]
[ "sys.keys", "table_types", "table_types_table_type_name_unique", "Unique
Key", NULL, -1 ]
-#select 'sys.objects', name, nr from sys.objects order by name, nr;
% .%1, sys.objects, sys.objects # table_name
% %1, name, nr # name
% char, varchar, int # type
@@ -4497,14 +4477,12 @@ drop function pcre_replace(string, strin
[ "sys.objects", "table_type_id", 0 ]
[ "sys.objects", "table_type_name", 0 ]
[ "sys.objects", "table_type_name", 0 ]
-#select 'default schema of user', s.name, u.name from sys.schemas s, sys.users
u where s.id = u.default_schema order by s.name, u.name;
% .%1, sys.s, .u # table_name
% %1, name, name # name
% char, varchar, varchar # type
% 22, 3, 9 # length
[ "default schema of user", "sys", ".snapshot" ]
[ "default schema of user", "sys", "monetdb" ]
-#select 'grant on table', t.name, a.name, pc.privilege_code_name, g.name,
p.grantable from sys._tables t, sys.privileges p left outer join sys.auths g on
p.grantor = g.id left outer join sys.privilege_codes pc on p.privileges =
pc.privilege_code_id, sys.auths a where t.id = p.obj_id and p.auth_id = a.id
order by t.name, a.name;
% .%1, sys.t, sys.a, .pc, .g, .p # table_name
% %1, name, name, privilege_code_name, name, grantable # name
% char, varchar, varchar, varchar, varchar,
int # type
@@ -4580,12 +4558,10 @@ drop function pcre_replace(string, strin
[ "grant on table", "user_role", "public", "SELECT", NULL,
0 ]
[ "grant on table", "value_partitions", "public", "SELECT",
NULL, 0 ]
[ "grant on table", "var_values", "public", "SELECT",
"monetdb", 0 ]
-#select 'grant on column', t.name, c.name, a.name, pc.privilege_code_name,
g.name, p.grantable from sys._tables t, sys._columns c, sys.privileges p left
outer join sys.auths g on p.grantor = g.id left outer join sys.privilege_codes
pc on p.privileges = pc.privilege_code_id, sys.auths a where c.id = p.obj_id
and c.table_id = t.id and p.auth_id = a.id order by t.name, c.name, a.name;
% .%1, sys.t, sys.c, sys.a, .pc, .g, .p # table_name
% %1, name, name, name, privilege_code_name, name, grantable # name
% char, varchar, varchar, varchar, varchar,
varchar, int # type
% 15, 0, 0, 0, 0, 0, 1 # length
-#select 'grant on function', f.name, a.name, pc.privilege_code_name, g.name,
p.grantable from sys.functions f, sys.privileges p left outer join sys.auths g
on p.grantor = g.id left outer join sys.privilege_codes pc on p.privileges =
pc.privilege_code_id, sys.auths a where f.id = p.obj_id and p.auth_id = a.id
order by f.name, a.name;
% .%1, sys.f, sys.a, .pc, .g, .p # table_name
% %1, name, name, privilege_code_name, name, grantable # name
% char, varchar, varchar, varchar, varchar,
int # type
@@ -4929,31 +4905,26 @@ drop function pcre_replace(string, strin
[ "grant on function", "var_samp", "public", "EXECUTE",
"monetdb", 0 ]
[ "grant on function", "var_samp", "public", "EXECUTE",
"monetdb", 0 ]
[ "grant on function", "var_samp", "public", "EXECUTE",
"monetdb", 0 ]
-#select 'sys.sequences', s.name, q.name, q.start, q.minvalue, q.maxvalue,
q.increment, q.cacheinc, q.cycle from sys.sequences q left outer join
sys.schemas s on q.schema_id = s.id order by s.name, q.name;
% .%1, .s, .q, .q, .q, .q, .q, .q, .q # table_name
% %1, name, name, start, minvalue, maxvalue, increment,
cacheinc, cycle # name
% char, varchar, varchar, bigint, bigint, bigint, bigint,
bigint, boolean # type
% 13, 0, 0, 1, 1, 1, 1, 1, 5 # length
-#select count(*) from sys.statistics;
% .%1 # table_name
% %1 # name
% bigint # type
% 1 # length
[ 0 ]
-#select count(*) from sys.storagemodelinput;
% .%1 # table_name
% %1 # name
% bigint # type
% 1 # length
[ 0 ]
-#select 'sys.triggers', t.name, g.name, case g.time when 0 then 'BEFORE' when
1 then 'AFTER' when 2 then 'INSTEAD OF' end as time, case g.orientation when 0
then 'ROW' when 1 then 'STATEMENT' end as orientation, case g.event when 0 then
'insert' when 1 then 'DELETE' when 2 then 'UPDATE' end as event, g.old_name,
g.new_name, g.condition, g.statement from sys.triggers g left outer join
sys._tables t on g.table_id = t.id order by t.name, g.name;
% .%1, .t, .g, ., ., ., .g, .g, .g, .g #
table_name
% %1, name, name, time, orientation, event, old_name,
new_name, condition, statement # name
% char, varchar, varchar, char, char, char,
varchar, varchar, varchar, varchar # type
% 12, 7, 21, 10, 9, 6, 0, 0, 0, 110 #
length
[ "sys.triggers", "_tables", "system_update_tables", "AFTER",
"STATEMENT", "UPDATE", NULL, NULL, NULL, "create trigger
system_update_tables after update on sys._tables for each statement call
sys_update_tables();" ]
[ "sys.triggers", "schemas", "system_update_schemas",
"AFTER", "STATEMENT", "UPDATE", NULL, NULL, NULL, "create
trigger system_update_schemas after update on sys.schemas for each statement
call sys_update_schemas();" ]
-#select 'sys.types', s.name, t.systemname, t.sqlname, t.digits, t.scale,
t.radix, et.value as eclass from sys.types t left outer join sys.schemas s on
s.id = t.schema_id left outer join (values (0, 'ANY'), (1, 'TABLE'), (2,
'BIT'), (3, 'CHAR'), (4, 'STRING'), (5, 'BLOB'), (6, 'POS'), (7, 'NUM'), (8,
'MONTH'), (9, 'SEC'), (10, 'DEC'), (11, 'FLT'), (12, 'TIME'), (13, 'TIME_TZ'),
(14, 'DATE'), (15, 'TIMESTAMP'), (16, 'TIMESTAMP_TZ'), (17, 'GEOM'), (18,
'EXTERNAL')) as et (id, value) on t.eclass = et.id order by s.name,
t.systemname, t.sqlname, t.digits, t.scale, t.radix, eclass;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list