Changeset: 3a023e63648c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3a023e63648c
Modified Files:
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.32bit
sql/test/emptydb/Tests/check.stable.out.int128
Branch: Aug2024
Log Message:
Approve emptydb check outputs
diffs (264 lines):
diff --git a/sql/test/emptydb/Tests/check.stable.out
b/sql/test/emptydb/Tests/check.stable.out
--- a/sql/test/emptydb/Tests/check.stable.out
+++ b/sql/test/emptydb/Tests/check.stable.out
@@ -446,14 +446,14 @@ select 'null in fkeys.delete_action', de
% varchar, varchar, varchar, varchar, varchar,
boolean, varchar, varchar, varchar # type
% 11, 18, 34, 6812, 5, 5, 8, 8, 0 # length
[ "sys._tables", "information_schema", "character_sets", "create
view information_schema.character_sets as select cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast('UTF-8' as varchar(16)) as character_set_name, cast('ISO/IEC 10646:2021'
as varchar(20)) as character_repertoire, cast('UTF-8' as varchar(16)) as
form_of_use, cast(null as varchar(1)) as default_collate_catalog, cast(null as
varchar(1)) as default_collate_schema, cast(null as varchar(1)) as
default_collate_name;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
-[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, cast(null as varchar(1024)) as constraint_schema, cast(null
as varchar(1024)) as constraint_name, cast(null as varchar(1024)) as
check_clause where 1=0;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
+[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, sys.check_constraint(s.\"name\", k.\"name\") as check_clause,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name,
k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from
sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\",
tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k
inner join (select st.\"id\", st.\"schema_id\", st.\"name\" from
sys.\"_tables\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\"
from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join
sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "columns", "create view
information_schema.columns as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, c.\"name\" as
column_name, cast(1 + c.\"number\" as int) as ordinal_position, c.\"default\"
as column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3))
as is_nullable, cast(sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\",
c.\"type_scale\", true, true) as varchar(1024)) as data_type,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml')
and c.\"type_digits\" > 0, c.\"type_digits\", null) as int) as
character_maximum_length, cast(sys.ifthenelse(c.\"type\" in
('varchar','clob','char','json','url','xml') and c.\"type_digits\" > 0, 4 *
cast(c.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"
type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(c.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(c.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(c.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\", c.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case c.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(c.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\", 3), 0)) else null end
as int) as interval_precision, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(null as varchar(1)) as domain_catalog,
cast(null as varchar(1)) as domain_schema, cast(null as varchar(1)) as
domain_name, cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1))
as udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1))
as scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast('NO' as varchar(3)) as
is_self_referencing, cast(sys.i
fthenelse(seq.\"name\" is null or c.\"null\", 'NO', 'YES') as varchar(3)) as
is_identity, seq.\"name\" as identity_generation, seq.\"start\" as
identity_start, seq.\"increment\" as identity_increment, seq.\"maxvalue\" as
identity_maximum, seq.\"minvalue\" as identity_minimum,
cast(sys.ifthenelse(seq.\"name\" is null, null, sys.ifthenelse(seq.\"cycle\",
'YES', 'NO')) as varchar(3)) as identity_cycle,
cast(sys.ifthenelse(seq.\"name\" is null, 'NO', 'YES') as varchar(3)) as
is_generated, cast(sys.ifthenelse(seq.\"name\" is null, null, c.\"default\") as
varchar(1024)) as generation_expression, cast('NO' as varchar(3)) as
is_system_time_period_start, cast('NO' as varchar(3)) as
is_system_time_period_end, cast('NO' as varchar(3)) as
system_time_period_timestamp_generation, cast(sys.ifthenelse(t.\"type\" in
(0,3,7,20,30), 'YES', 'NO') as varchar(3)) as is_updatable, cast(null as
varchar(1)) as declared_data_type, cast(null as int) as
declared_numeric_precision, cast(null as int) as declare
d_numeric_scale, t.\"schema_id\" as schema_id, c.\"table_id\" as table_id,
c.\"id\" as column_id, seq.\"id\" as sequence_id, t.\"system\" as is_system,
cm.\"remark\" as comments from sys.\"columns\" c inner join sys.\"tables\" t on
c.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s on t.\"schema_id\" =
s.\"id\" left outer join sys.\"comments\" cm on c.\"id\" = cm.\"id\" left outer
join sys.\"sequences\" seq on ((seq.\"name\"||'\"') = substring(c.\"default\",
3 + sys.\"locate\"('\".\"seq_',c.\"default\",14))) order by s.\"name\",
t.\"name\", c.\"number\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "parameters", "create view
information_schema.parameters as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(sys.ifthenelse((a.\"inout\" = 0 or f.\"type\" = 2), 1 + a.\"number\",
sys.ifthenelse(f.\"type\" = 1, a.\"number\", (1 + a.\"number\" -
f.count_out_cols))) as int) as ordinal_position,
cast(sys.ifthenelse(a.\"inout\" = 0, 'OUT', sys.ifthenelse(a.\"inout\" = 1,
'IN', 'INOUT')) as varchar(5)) as parameter_mode,
cast(sys.ifthenelse(a.\"inout\" = 0, 'YES', 'NO') as varchar(3)) as is_result,
cast(null as varchar(1)) as as_locator, a.\"name\" as parameter_name, cast(null
as varchar(1)) as from_sql_specific_catalog, cast(null as varchar(1)) as
from_sql_specific_schema, cast(null as varchar(1)) as from_sql_specific_name,
cast(null as varchar(1)) as to_sql_specific_catalog, cast(null as varchar(1))
as to_sql_specific_schema, cast(null as
varchar(1)) as to_sql_specific_name, cast(sys.\"sql_datatype\"(a.\"type\",
a.\"type_digits\", a.\"type_scale\", true, true) as varchar(1024)) as
data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", null) as int) as character_maximum_length,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml')
and a.\"type_digits\" > 0, 4 * cast(a.\"type_digits\" as bigint), null) as
bigint) as character_octet_length, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decima
l','numeric','oid'), a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digi
ts\" in (7, 10, 12, 13), sys.ifthenelse(a.\"type_scale\" > 0,
a.\"type_scale\", 3), 0)) else null end as int) as interval_precision,
cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1)) as
udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1)) as
scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
parameter_default, f.\"schema_id\" as schema_id, f.\"id\" as function_id,
a.\"id\" as arg_id, f.\"name\" as function_name, f.\"type\" as function_type,
f.\"system\" as is_system from sys.\"args\" a inner join (select fun.*, (select
count(*) from sys.args a0 where a0.inout = 0 and a0.func_id = fun.id) as
count_out_cols from sys.\"functions\" fun where fun.\"type\
" in (1, 2, 5, 7)) f on f.\"id\" = a.\"func_id\" inner join sys.\"schemas\" s
on s.\"id\" = f.\"schema_id\" order by s.\"name\", f.\"name\", f.\"id\",
a.\"inout\" desc, a.\"number\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "referential_constraints",
"create view information_schema.referential_constraints as select cast(null as
varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, fk.\"name\"
as constraint_name, cast(null as varchar(1)) as unique_constraint_catalog,
uks.\"name\" as unique_constraint_schema, uk.\"name\" as
unique_constraint_name, cast('FULL' as varchar(7)) as match_option,
fk.\"update_action\" as update_rule, fk.\"delete_action\" as delete_rule,
t.\"schema_id\" as fk_schema_id, t.\"id\" as fk_table_id, t.\"name\" as
fk_table_name, fk.\"id\" as fk_key_id, ukt.\"schema_id\" as uc_schema_id,
uk.\"table_id\" as uc_table_id, ukt.\"name\" as uc_table_name, uk.\"id\" as
uc_key_id from sys.\"fkeys\" fk inner join sys.\"tables\" t on t.\"id\" =
fk.\"table_id\" inner join sys.\"schemas\" s on s.\"id\" = t.\"schema_id\" left
outer join sys.\"keys\" uk on uk.\"id\" = fk.\"rkey\" left outer join
sys.\"tables\" ukt on ukt.\"id\" = uk.\"table_id\" l
eft outer join sys.\"schemas\" uks on uks.\"id\" = ukt.\"schema_id\" order by
s.\"name\", t.\"name\", fk.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "routines", "create view
information_schema.routines as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(null as varchar(1)) as routine_catalog, s.\"name\" as routine_schema,
f.\"name\" as routine_name, ft.\"function_type_keyword\" as routine_type,
cast(null as varchar(1)) as module_catalog, cast(null as varchar(1)) as
module_schema, cast(f.\"mod\" as varchar(128)) as module_name, cast(null as
varchar(1)) as udt_catalog, cast(null as varchar(1)) as udt_schema, cast(null
as varchar(1)) as udt_name, cast(case f.\"type\" when 1 then
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true) when 2 then null when 5 then 'TABLE' when 7 then 'TABLE' else null end as
varchar(1024)) as data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", n
ull) as int) as character_maximum_length, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0, 4 *
cast(a.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(null as varchar(1)) as character_set_catalog, cast(null as varchar(1)) as
character_set_schema, 'UTF-8' as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real
','double','decimal','numeric','oid'), a.\"type_scale\", null) as int) as
numeric_scale, cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'), a.\"type_scale\" -1, null)
as int) as datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\", 3), 0)) else null end as
int) as interval_precision, cast(null as varchar(1)) as type_udt_catalog,
cast(null as varchar(1)) as type_udt_schema, cast(null as varchar(1)) as
type_udt_name, cast(null as varchar(1)) as scope_catalog, cast(null as
varchar(1)) as scope_schema, cast(null as varchar(1)) as scope_name, cast(null
as int) as maximum_cardi
nality, cast(null as int) as dtd_identifier,
cast(sys.\"ifthenelse\"(sys.\"locate\"('begin',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", sys.\"locate\"('begin',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\")))-1), sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\"))), null) as varchar(8196)) as routine_body,
f.\"func\" as routine_definition,
cast(sys.\"ifthenelse\"(sys.\"locate\"('external name',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external name',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external
name',f.\"func\")))-1), sys.\"substring\"(f.\"func\", 14 +
sys.\"locate\"('external name',f.\"func\"))), null) as varchar(1024)) as
external_name, fl.\"language_keyword\" as external_language, 'GENERAL' as
parameter_style, 'YES' as is_deterministic, cast(sys.if
thenelse(f.\"side_effect\", 'MODIFIES', 'READ') as varchar(10)) as
sql_data_access, cast(case f.\"type\" when 2 then null else 'NO' end as
varchar(3)) as is_null_call, cast(null as varchar(1)) as sql_path, cast(null as
varchar(1)) as schema_level_routine, cast(null as int) as
max_dynamic_result_sets, cast(null as varchar(1)) as is_user_defined_cast,
cast(null as varchar(1)) as is_implicitly_invocable, cast(null as varchar(1))
as security_type, cast(null as varchar(1)) as to_sql_specific_catalog,
cast(null as varchar(1)) as to_sql_specific_schema, cast(null as varchar(1)) as
to_sql_specific_name, cast(null as varchar(1)) as as_locator, cast(null as
timestamp) as created, cast(null as timestamp) as last_altered, cast(null as
varchar(1)) as new_savepoint_level, cast(null as varchar(1)) as
is_udt_dependent, cast(null as varchar(1)) as result_cast_from_data_type,
cast(null as varchar(1)) as result_cast_as_locator, cast(null as int) as
result_cast_char_max_length, cast(null as int) as res
ult_cast_char_octet_length, cast(null as varchar(1)) as
result_cast_char_set_catalog, cast(null as varchar(1)) as
result_cast_char_set_schema, cast(null as varchar(1)) as
result_cast_character_set_name, cast(null as varchar(1)) as
result_cast_collation_catalog, cast(null as varchar(1)) as
result_cast_collation_schema, cast(null as varchar(1)) as
result_cast_collation_name, cast(null as int) as result_cast_numeric_precision,
cast(null as int) as result_cast_numeric_radix, cast(null as int) as
result_cast_numeric_scale, cast(null as int) as result_cast_datetime_precision,
cast(null as varchar(1)) as result_cast_interval_type, cast(null as int) as
result_cast_interval_precision, cast(null as varchar(1)) as
result_cast_type_udt_catalog, cast(null as varchar(1)) as
result_cast_type_udt_schema, cast(null as varchar(1)) as
result_cast_type_udt_name, cast(null as varchar(1)) as
result_cast_scope_catalog, cast(null as varchar(1)) as
result_cast_scope_schema, cast(null as varchar(1)) as resul
t_cast_scope_name, cast(null as int) as result_cast_max_cardinality, cast(null
as varchar(1)) as result_cast_dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
result_cast_from_declared_data_type, cast(null as int) as
result_cast_declared_numeric_precision, cast(null as int) as
result_cast_declared_numeric_scale, f.\"schema_id\" as schema_id, f.\"id\" as
function_id, f.\"type\" as function_type, f.\"language\" as function_language,
f.\"system\" as is_system, cm.\"remark\" as comments from sys.\"functions\" f
inner join sys.\"schemas\" s on s.\"id\" = f.\"schema_id\" inner join
sys.\"function_types\" ft on ft.\"function_type_id\" = f.\"type\" inner join
sys.\"function_languages\" fl on fl.\"language_id\" = f.\"language\" left outer
join sys.\"args\" a on a.\"func_id\" = f.\"id\" and a.\"inout\" = 0 and
a.\"number\" = 0 left outer join sys.\"comments\"
cm on cm.\"id\" = f.\"id\" where f.\"type\" in (1, 2, 5, 7) order by
s.\"name\", f.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "schemata", "create view
information_schema.schemata as select cast(null as varchar(1)) as catalog_name,
s.\"name\" as schema_name, a.\"name\" as schema_owner, cast(null as varchar(1))
as default_character_set_catalog, cast(null as varchar(1)) as
default_character_set_schema, cast('UTF-8' as varchar(16)) as
default_character_set_name, cast(null as varchar(1)) as sql_path, s.\"id\" as
schema_id, s.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"schemas\" s inner join sys.\"auths\" a on s.\"owner\" = a.\"id\" left
outer join sys.\"comments\" cm on s.\"id\" = cm.\"id\" order by s.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "sequences", "create view
information_schema.sequences as select cast(null as varchar(1)) as
sequence_catalog, s.\"name\" as sequence_schema, sq.\"name\" as sequence_name,
cast('BIGINT' as varchar(16)) as data_type, cast(64 as smallint) as
numeric_precision, cast(2 as smallint) as numeric_precision_radix, cast(0 as
smallint) as numeric_scale, sq.\"start\" as start_value, sq.\"minvalue\" as
minimum_value, sq.\"maxvalue\" as maximum_value, sq.\"increment\" as increment,
cast(sys.ifthenelse(sq.\"cycle\", 'YES', 'NO') as varchar(3)) as cycle_option,
cast(null as varchar(16)) as declared_data_type, cast(null as smallint) as
declared_numeric_precision, cast(null as smallint) as declared_numeric_scale,
sq.\"schema_id\" as schema_id, sq.\"id\" as sequence_id,
get_value_for(s.\"name\", sq.\"name\") as current_value, sq.\"cacheinc\" as
cacheinc, cm.\"remark\" as comments from sys.\"sequences\" sq inner join
sys.\"schemas\" s on sq.\"schema_id\" = s.\"id\
" left outer join sys.\"comments\" cm on sq.\"id\" = cm.\"id\" order by
s.\"name\", sq.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
-[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' else null end as
varchar(16)) as constraint_type, cast('NO' as varchar(3)) as is_deferrable,
cast('NO' as varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as
enforced, t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as
key_id, k.\"type\" as key_type, t.\"system\" as is_system from (select
sk.\"id\", sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union
all select tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from
tmp.\"keys\" tk) k inner join (select st.\"id\", st.\"schema_id\", st.\"name\",
st.\"system\" from sys.\"_tabl
es\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\",
tt.\"system\" from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner
join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
+[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' when 3 then
'UNIQUE NULLS NOT DISTINCT' when 4 then 'CHECK' else null end as varchar(26))
as constraint_type, cast('NO' as varchar(3)) as is_deferrable, cast('NO' as
varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as enforced,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as key_id,
k.\"type\" as key_type, t.\"system\" as is_system from (select sk.\"id\",
sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union all select
tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from tmp.\"keys\" tk) k
inner join (select st.\"id\", s
t.\"schema_id\", st.\"name\", st.\"system\" from sys.\"_tables\" st union all
select tt.\"id\", tt.\"schema_id\", tt.\"name\", tt.\"system\" from
tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s
on t.\"schema_id\" = s.\"id\" order by s.\"name\", t.\"name\", k.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "tables", "create view
information_schema.tables as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, tt.\"table_type_name\" as
table_type, cast(null as varchar(1)) as self_referencing_column_name, cast(null
as varchar(1)) as reference_generation, cast(null as varchar(1)) as
user_defined_type_catalog, cast(null as varchar(1)) as
user_defined_type_schema, cast(null as varchar(1)) as user_defined_type_name,
cast(sys.ifthenelse((t.\"type\" in (0, 3, 7, 20, 30) and t.\"access\" in (0,
2)), 'YES', 'NO') as varchar(3)) as is_insertable_into, cast('NO' as
varchar(3)) as is_typed, cast((case t.\"commit_action\" when 1 then 'DELETE'
when 2 then 'PRESERVE' when 3 then 'DROP' else null end) as varchar(10)) as
commit_action, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"type\"
as table_type_id, st.\"count\" as row_count, t.\"system\" as is_system,
sys.ifthenelse(t.\"type\" in (1, 11), true, fa
lse) as is_view, t.\"query\" as query_def, cm.\"remark\" as comments from
sys.\"tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
inner join sys.\"table_types\" tt on t.\"type\" = tt.\"table_type_id\" left
outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" left outer join (select
distinct \"schema\", \"table\", \"count\" from sys.\"statistics\"()) st on
(s.\"name\" = st.\"schema\" and t.\"name\" = st.\"table\") order by s.\"name\",
t.\"name\";", "VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "views", "create view
information_schema.views as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, t.\"query\" as
view_definition, cast('NONE' as varchar(10)) as check_option, cast('NO' as
varchar(3)) as is_updatable, cast('NO' as varchar(3)) as insertable_into,
cast('NO' as varchar(3)) as is_trigger_updatable, cast('NO' as varchar(3)) as
is_trigger_deletable, cast('NO' as varchar(3)) as is_trigger_insertable_into,
t.\"schema_id\" as schema_id, t.\"id\" as table_id,
cast(sys.ifthenelse(t.\"system\", t.\"type\" + 10 , t.\"type\") as smallint) as
table_type_id, t.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"_tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
left outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" where t.\"type\" =
1 order by s.\"name\", t.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "logging", "compinfo", "create view
logging.compinfo as select * from logging.compinfo();", "VIEW", true,
"COMMIT", "WRITABLE", NULL ]
@@ -603,7 +603,11 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "check_constraints",
"constraint_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_schema", "varchar", 1024, 0, NULL, true, 1,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_name", "varchar", 1024, 0, NULL, true, 2,
NULL, NULL ]
-[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 1024, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 0, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"schema_id", "int", 31, 0, NULL, true, 4, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_id", "int", 31, 0, NULL, true, 5, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 6, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"key_id", "int", 31, 0, NULL, true, 7, NULL, NULL
]
[ "sys._columns", "information_schema", "columns",
"table_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_schema",
"varchar", 1024, 0, NULL, true, 1, NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_name",
"varchar", 1024, 0, NULL, true, 2, NULL, NULL ]
@@ -854,7 +858,7 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "table_constraints",
"table_catalog", "varchar", 1, 0, NULL, true, 3,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_schema", "varchar", 1024, 0, NULL, true, 4, NULL,
NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 5, NULL,
NULL ]
-[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 16, 0, NULL, true, 6,
NULL, NULL ]
+[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 26, 0, NULL, true, 6,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"is_deferrable", "varchar", 3, 0, NULL, true, 7,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"initially_deferred", "varchar", 3, 0, NULL, true, 8,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"enforced", "varchar", 3, 0, NULL, true, 9, NULL,
NULL ]
@@ -3078,6 +3082,7 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 21, 7, 37, 18, 26, 4 # length
+[ "function used by view", "sys", "check_constraint",
"information_schema", "check_constraints", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"columns", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"parameters", "VIEW" ]
[ "function used by view", "sys", "endswith", "information_schema",
"routines", "VIEW" ]
@@ -3166,6 +3171,11 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 18, 3, 27, 18, 34, 4 # length
+[ "table used by view", "sys", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "keys", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "schemas", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "keys", "information_schema",
"check_constraints", "VIEW" ]
[ "table used by view", "sys", "columns", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "comments", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "schemas", "information_schema",
"columns", "VIEW" ]
@@ -3429,6 +3439,25 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar, varchar # type
% 19, 3, 27, 21, 18, 34, 4 # length
+[ "column used by view", "sys", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "authorization",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "owner",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "system",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
[ "column used by view", "sys", "columns", "default",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "id",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "name",
"information_schema", "columns", "VIEW" ]
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
@@ -446,14 +446,14 @@ select 'null in fkeys.delete_action', de
% varchar, varchar, varchar, varchar, varchar,
boolean, varchar, varchar, varchar # type
% 11, 18, 34, 6812, 5, 5, 8, 8, 0 # length
[ "sys._tables", "information_schema", "character_sets", "create
view information_schema.character_sets as select cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast('UTF-8' as varchar(16)) as character_set_name, cast('ISO/IEC 10646:2021'
as varchar(20)) as character_repertoire, cast('UTF-8' as varchar(16)) as
form_of_use, cast(null as varchar(1)) as default_collate_catalog, cast(null as
varchar(1)) as default_collate_schema, cast(null as varchar(1)) as
default_collate_name;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
-[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, cast(null as varchar(1024)) as constraint_schema, cast(null
as varchar(1024)) as constraint_name, cast(null as varchar(1024)) as
check_clause where 1=0;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
+[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, sys.check_constraint(s.\"name\", k.\"name\") as check_clause,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name,
k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from
sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\",
tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k
inner join (select st.\"id\", st.\"schema_id\", st.\"name\" from
sys.\"_tables\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\"
from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join
sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "columns", "create view
information_schema.columns as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, c.\"name\" as
column_name, cast(1 + c.\"number\" as int) as ordinal_position, c.\"default\"
as column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3))
as is_nullable, cast(sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\",
c.\"type_scale\", true, true) as varchar(1024)) as data_type,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml')
and c.\"type_digits\" > 0, c.\"type_digits\", null) as int) as
character_maximum_length, cast(sys.ifthenelse(c.\"type\" in
('varchar','clob','char','json','url','xml') and c.\"type_digits\" > 0, 4 *
cast(c.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"
type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(c.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(c.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(c.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\", c.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case c.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(c.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\", 3), 0)) else null end
as int) as interval_precision, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(null as varchar(1)) as domain_catalog,
cast(null as varchar(1)) as domain_schema, cast(null as varchar(1)) as
domain_name, cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1))
as udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1))
as scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast('NO' as varchar(3)) as
is_self_referencing, cast(sys.i
fthenelse(seq.\"name\" is null or c.\"null\", 'NO', 'YES') as varchar(3)) as
is_identity, seq.\"name\" as identity_generation, seq.\"start\" as
identity_start, seq.\"increment\" as identity_increment, seq.\"maxvalue\" as
identity_maximum, seq.\"minvalue\" as identity_minimum,
cast(sys.ifthenelse(seq.\"name\" is null, null, sys.ifthenelse(seq.\"cycle\",
'YES', 'NO')) as varchar(3)) as identity_cycle,
cast(sys.ifthenelse(seq.\"name\" is null, 'NO', 'YES') as varchar(3)) as
is_generated, cast(sys.ifthenelse(seq.\"name\" is null, null, c.\"default\") as
varchar(1024)) as generation_expression, cast('NO' as varchar(3)) as
is_system_time_period_start, cast('NO' as varchar(3)) as
is_system_time_period_end, cast('NO' as varchar(3)) as
system_time_period_timestamp_generation, cast(sys.ifthenelse(t.\"type\" in
(0,3,7,20,30), 'YES', 'NO') as varchar(3)) as is_updatable, cast(null as
varchar(1)) as declared_data_type, cast(null as int) as
declared_numeric_precision, cast(null as int) as declare
d_numeric_scale, t.\"schema_id\" as schema_id, c.\"table_id\" as table_id,
c.\"id\" as column_id, seq.\"id\" as sequence_id, t.\"system\" as is_system,
cm.\"remark\" as comments from sys.\"columns\" c inner join sys.\"tables\" t on
c.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s on t.\"schema_id\" =
s.\"id\" left outer join sys.\"comments\" cm on c.\"id\" = cm.\"id\" left outer
join sys.\"sequences\" seq on ((seq.\"name\"||'\"') = substring(c.\"default\",
3 + sys.\"locate\"('\".\"seq_',c.\"default\",14))) order by s.\"name\",
t.\"name\", c.\"number\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "parameters", "create view
information_schema.parameters as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(sys.ifthenelse((a.\"inout\" = 0 or f.\"type\" = 2), 1 + a.\"number\",
sys.ifthenelse(f.\"type\" = 1, a.\"number\", (1 + a.\"number\" -
f.count_out_cols))) as int) as ordinal_position,
cast(sys.ifthenelse(a.\"inout\" = 0, 'OUT', sys.ifthenelse(a.\"inout\" = 1,
'IN', 'INOUT')) as varchar(5)) as parameter_mode,
cast(sys.ifthenelse(a.\"inout\" = 0, 'YES', 'NO') as varchar(3)) as is_result,
cast(null as varchar(1)) as as_locator, a.\"name\" as parameter_name, cast(null
as varchar(1)) as from_sql_specific_catalog, cast(null as varchar(1)) as
from_sql_specific_schema, cast(null as varchar(1)) as from_sql_specific_name,
cast(null as varchar(1)) as to_sql_specific_catalog, cast(null as varchar(1))
as to_sql_specific_schema, cast(null as
varchar(1)) as to_sql_specific_name, cast(sys.\"sql_datatype\"(a.\"type\",
a.\"type_digits\", a.\"type_scale\", true, true) as varchar(1024)) as
data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", null) as int) as character_maximum_length,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml')
and a.\"type_digits\" > 0, 4 * cast(a.\"type_digits\" as bigint), null) as
bigint) as character_octet_length, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decima
l','numeric','oid'), a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digi
ts\" in (7, 10, 12, 13), sys.ifthenelse(a.\"type_scale\" > 0,
a.\"type_scale\", 3), 0)) else null end as int) as interval_precision,
cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1)) as
udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1)) as
scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
parameter_default, f.\"schema_id\" as schema_id, f.\"id\" as function_id,
a.\"id\" as arg_id, f.\"name\" as function_name, f.\"type\" as function_type,
f.\"system\" as is_system from sys.\"args\" a inner join (select fun.*, (select
count(*) from sys.args a0 where a0.inout = 0 and a0.func_id = fun.id) as
count_out_cols from sys.\"functions\" fun where fun.\"type\
" in (1, 2, 5, 7)) f on f.\"id\" = a.\"func_id\" inner join sys.\"schemas\" s
on s.\"id\" = f.\"schema_id\" order by s.\"name\", f.\"name\", f.\"id\",
a.\"inout\" desc, a.\"number\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "referential_constraints",
"create view information_schema.referential_constraints as select cast(null as
varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, fk.\"name\"
as constraint_name, cast(null as varchar(1)) as unique_constraint_catalog,
uks.\"name\" as unique_constraint_schema, uk.\"name\" as
unique_constraint_name, cast('FULL' as varchar(7)) as match_option,
fk.\"update_action\" as update_rule, fk.\"delete_action\" as delete_rule,
t.\"schema_id\" as fk_schema_id, t.\"id\" as fk_table_id, t.\"name\" as
fk_table_name, fk.\"id\" as fk_key_id, ukt.\"schema_id\" as uc_schema_id,
uk.\"table_id\" as uc_table_id, ukt.\"name\" as uc_table_name, uk.\"id\" as
uc_key_id from sys.\"fkeys\" fk inner join sys.\"tables\" t on t.\"id\" =
fk.\"table_id\" inner join sys.\"schemas\" s on s.\"id\" = t.\"schema_id\" left
outer join sys.\"keys\" uk on uk.\"id\" = fk.\"rkey\" left outer join
sys.\"tables\" ukt on ukt.\"id\" = uk.\"table_id\" l
eft outer join sys.\"schemas\" uks on uks.\"id\" = ukt.\"schema_id\" order by
s.\"name\", t.\"name\", fk.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "routines", "create view
information_schema.routines as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(null as varchar(1)) as routine_catalog, s.\"name\" as routine_schema,
f.\"name\" as routine_name, ft.\"function_type_keyword\" as routine_type,
cast(null as varchar(1)) as module_catalog, cast(null as varchar(1)) as
module_schema, cast(f.\"mod\" as varchar(128)) as module_name, cast(null as
varchar(1)) as udt_catalog, cast(null as varchar(1)) as udt_schema, cast(null
as varchar(1)) as udt_name, cast(case f.\"type\" when 1 then
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true) when 2 then null when 5 then 'TABLE' when 7 then 'TABLE' else null end as
varchar(1024)) as data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", n
ull) as int) as character_maximum_length, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0, 4 *
cast(a.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(null as varchar(1)) as character_set_catalog, cast(null as varchar(1)) as
character_set_schema, 'UTF-8' as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real
','double','decimal','numeric','oid'), a.\"type_scale\", null) as int) as
numeric_scale, cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'), a.\"type_scale\" -1, null)
as int) as datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\", 3), 0)) else null end as
int) as interval_precision, cast(null as varchar(1)) as type_udt_catalog,
cast(null as varchar(1)) as type_udt_schema, cast(null as varchar(1)) as
type_udt_name, cast(null as varchar(1)) as scope_catalog, cast(null as
varchar(1)) as scope_schema, cast(null as varchar(1)) as scope_name, cast(null
as int) as maximum_cardi
nality, cast(null as int) as dtd_identifier,
cast(sys.\"ifthenelse\"(sys.\"locate\"('begin',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", sys.\"locate\"('begin',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\")))-1), sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\"))), null) as varchar(8196)) as routine_body,
f.\"func\" as routine_definition,
cast(sys.\"ifthenelse\"(sys.\"locate\"('external name',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external name',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external
name',f.\"func\")))-1), sys.\"substring\"(f.\"func\", 14 +
sys.\"locate\"('external name',f.\"func\"))), null) as varchar(1024)) as
external_name, fl.\"language_keyword\" as external_language, 'GENERAL' as
parameter_style, 'YES' as is_deterministic, cast(sys.if
thenelse(f.\"side_effect\", 'MODIFIES', 'READ') as varchar(10)) as
sql_data_access, cast(case f.\"type\" when 2 then null else 'NO' end as
varchar(3)) as is_null_call, cast(null as varchar(1)) as sql_path, cast(null as
varchar(1)) as schema_level_routine, cast(null as int) as
max_dynamic_result_sets, cast(null as varchar(1)) as is_user_defined_cast,
cast(null as varchar(1)) as is_implicitly_invocable, cast(null as varchar(1))
as security_type, cast(null as varchar(1)) as to_sql_specific_catalog,
cast(null as varchar(1)) as to_sql_specific_schema, cast(null as varchar(1)) as
to_sql_specific_name, cast(null as varchar(1)) as as_locator, cast(null as
timestamp) as created, cast(null as timestamp) as last_altered, cast(null as
varchar(1)) as new_savepoint_level, cast(null as varchar(1)) as
is_udt_dependent, cast(null as varchar(1)) as result_cast_from_data_type,
cast(null as varchar(1)) as result_cast_as_locator, cast(null as int) as
result_cast_char_max_length, cast(null as int) as res
ult_cast_char_octet_length, cast(null as varchar(1)) as
result_cast_char_set_catalog, cast(null as varchar(1)) as
result_cast_char_set_schema, cast(null as varchar(1)) as
result_cast_character_set_name, cast(null as varchar(1)) as
result_cast_collation_catalog, cast(null as varchar(1)) as
result_cast_collation_schema, cast(null as varchar(1)) as
result_cast_collation_name, cast(null as int) as result_cast_numeric_precision,
cast(null as int) as result_cast_numeric_radix, cast(null as int) as
result_cast_numeric_scale, cast(null as int) as result_cast_datetime_precision,
cast(null as varchar(1)) as result_cast_interval_type, cast(null as int) as
result_cast_interval_precision, cast(null as varchar(1)) as
result_cast_type_udt_catalog, cast(null as varchar(1)) as
result_cast_type_udt_schema, cast(null as varchar(1)) as
result_cast_type_udt_name, cast(null as varchar(1)) as
result_cast_scope_catalog, cast(null as varchar(1)) as
result_cast_scope_schema, cast(null as varchar(1)) as resul
t_cast_scope_name, cast(null as int) as result_cast_max_cardinality, cast(null
as varchar(1)) as result_cast_dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
result_cast_from_declared_data_type, cast(null as int) as
result_cast_declared_numeric_precision, cast(null as int) as
result_cast_declared_numeric_scale, f.\"schema_id\" as schema_id, f.\"id\" as
function_id, f.\"type\" as function_type, f.\"language\" as function_language,
f.\"system\" as is_system, cm.\"remark\" as comments from sys.\"functions\" f
inner join sys.\"schemas\" s on s.\"id\" = f.\"schema_id\" inner join
sys.\"function_types\" ft on ft.\"function_type_id\" = f.\"type\" inner join
sys.\"function_languages\" fl on fl.\"language_id\" = f.\"language\" left outer
join sys.\"args\" a on a.\"func_id\" = f.\"id\" and a.\"inout\" = 0 and
a.\"number\" = 0 left outer join sys.\"comments\"
cm on cm.\"id\" = f.\"id\" where f.\"type\" in (1, 2, 5, 7) order by
s.\"name\", f.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "schemata", "create view
information_schema.schemata as select cast(null as varchar(1)) as catalog_name,
s.\"name\" as schema_name, a.\"name\" as schema_owner, cast(null as varchar(1))
as default_character_set_catalog, cast(null as varchar(1)) as
default_character_set_schema, cast('UTF-8' as varchar(16)) as
default_character_set_name, cast(null as varchar(1)) as sql_path, s.\"id\" as
schema_id, s.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"schemas\" s inner join sys.\"auths\" a on s.\"owner\" = a.\"id\" left
outer join sys.\"comments\" cm on s.\"id\" = cm.\"id\" order by s.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "sequences", "create view
information_schema.sequences as select cast(null as varchar(1)) as
sequence_catalog, s.\"name\" as sequence_schema, sq.\"name\" as sequence_name,
cast('BIGINT' as varchar(16)) as data_type, cast(64 as smallint) as
numeric_precision, cast(2 as smallint) as numeric_precision_radix, cast(0 as
smallint) as numeric_scale, sq.\"start\" as start_value, sq.\"minvalue\" as
minimum_value, sq.\"maxvalue\" as maximum_value, sq.\"increment\" as increment,
cast(sys.ifthenelse(sq.\"cycle\", 'YES', 'NO') as varchar(3)) as cycle_option,
cast(null as varchar(16)) as declared_data_type, cast(null as smallint) as
declared_numeric_precision, cast(null as smallint) as declared_numeric_scale,
sq.\"schema_id\" as schema_id, sq.\"id\" as sequence_id,
get_value_for(s.\"name\", sq.\"name\") as current_value, sq.\"cacheinc\" as
cacheinc, cm.\"remark\" as comments from sys.\"sequences\" sq inner join
sys.\"schemas\" s on sq.\"schema_id\" = s.\"id\
" left outer join sys.\"comments\" cm on sq.\"id\" = cm.\"id\" order by
s.\"name\", sq.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
-[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' else null end as
varchar(16)) as constraint_type, cast('NO' as varchar(3)) as is_deferrable,
cast('NO' as varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as
enforced, t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as
key_id, k.\"type\" as key_type, t.\"system\" as is_system from (select
sk.\"id\", sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union
all select tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from
tmp.\"keys\" tk) k inner join (select st.\"id\", st.\"schema_id\", st.\"name\",
st.\"system\" from sys.\"_tabl
es\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\",
tt.\"system\" from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner
join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
+[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' when 3 then
'UNIQUE NULLS NOT DISTINCT' when 4 then 'CHECK' else null end as varchar(26))
as constraint_type, cast('NO' as varchar(3)) as is_deferrable, cast('NO' as
varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as enforced,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as key_id,
k.\"type\" as key_type, t.\"system\" as is_system from (select sk.\"id\",
sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union all select
tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from tmp.\"keys\" tk) k
inner join (select st.\"id\", s
t.\"schema_id\", st.\"name\", st.\"system\" from sys.\"_tables\" st union all
select tt.\"id\", tt.\"schema_id\", tt.\"name\", tt.\"system\" from
tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s
on t.\"schema_id\" = s.\"id\" order by s.\"name\", t.\"name\", k.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "tables", "create view
information_schema.tables as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, tt.\"table_type_name\" as
table_type, cast(null as varchar(1)) as self_referencing_column_name, cast(null
as varchar(1)) as reference_generation, cast(null as varchar(1)) as
user_defined_type_catalog, cast(null as varchar(1)) as
user_defined_type_schema, cast(null as varchar(1)) as user_defined_type_name,
cast(sys.ifthenelse((t.\"type\" in (0, 3, 7, 20, 30) and t.\"access\" in (0,
2)), 'YES', 'NO') as varchar(3)) as is_insertable_into, cast('NO' as
varchar(3)) as is_typed, cast((case t.\"commit_action\" when 1 then 'DELETE'
when 2 then 'PRESERVE' when 3 then 'DROP' else null end) as varchar(10)) as
commit_action, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"type\"
as table_type_id, st.\"count\" as row_count, t.\"system\" as is_system,
sys.ifthenelse(t.\"type\" in (1, 11), true, fa
lse) as is_view, t.\"query\" as query_def, cm.\"remark\" as comments from
sys.\"tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
inner join sys.\"table_types\" tt on t.\"type\" = tt.\"table_type_id\" left
outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" left outer join (select
distinct \"schema\", \"table\", \"count\" from sys.\"statistics\"()) st on
(s.\"name\" = st.\"schema\" and t.\"name\" = st.\"table\") order by s.\"name\",
t.\"name\";", "VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "views", "create view
information_schema.views as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, t.\"query\" as
view_definition, cast('NONE' as varchar(10)) as check_option, cast('NO' as
varchar(3)) as is_updatable, cast('NO' as varchar(3)) as insertable_into,
cast('NO' as varchar(3)) as is_trigger_updatable, cast('NO' as varchar(3)) as
is_trigger_deletable, cast('NO' as varchar(3)) as is_trigger_insertable_into,
t.\"schema_id\" as schema_id, t.\"id\" as table_id,
cast(sys.ifthenelse(t.\"system\", t.\"type\" + 10 , t.\"type\") as smallint) as
table_type_id, t.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"_tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
left outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" where t.\"type\" =
1 order by s.\"name\", t.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "logging", "compinfo", "create view
logging.compinfo as select * from logging.compinfo();", "VIEW", true,
"COMMIT", "WRITABLE", NULL ]
@@ -603,7 +603,11 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "check_constraints",
"constraint_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_schema", "varchar", 1024, 0, NULL, true, 1,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_name", "varchar", 1024, 0, NULL, true, 2,
NULL, NULL ]
-[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 1024, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 0, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"schema_id", "int", 31, 0, NULL, true, 4, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_id", "int", 31, 0, NULL, true, 5, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 6, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"key_id", "int", 31, 0, NULL, true, 7, NULL, NULL
]
[ "sys._columns", "information_schema", "columns",
"table_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_schema",
"varchar", 1024, 0, NULL, true, 1, NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_name",
"varchar", 1024, 0, NULL, true, 2, NULL, NULL ]
@@ -854,7 +858,7 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "table_constraints",
"table_catalog", "varchar", 1, 0, NULL, true, 3,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_schema", "varchar", 1024, 0, NULL, true, 4, NULL,
NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 5, NULL,
NULL ]
-[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 16, 0, NULL, true, 6,
NULL, NULL ]
+[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 26, 0, NULL, true, 6,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"is_deferrable", "varchar", 3, 0, NULL, true, 7,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"initially_deferred", "varchar", 3, 0, NULL, true, 8,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"enforced", "varchar", 3, 0, NULL, true, 9, NULL,
NULL ]
@@ -3078,6 +3082,7 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 21, 7, 37, 18, 26, 4 # length
+[ "function used by view", "sys", "check_constraint",
"information_schema", "check_constraints", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"columns", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"parameters", "VIEW" ]
[ "function used by view", "sys", "endswith", "information_schema",
"routines", "VIEW" ]
@@ -3166,6 +3171,11 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 18, 3, 27, 18, 34, 4 # length
+[ "table used by view", "sys", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "keys", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "schemas", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "keys", "information_schema",
"check_constraints", "VIEW" ]
[ "table used by view", "sys", "columns", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "comments", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "schemas", "information_schema",
"columns", "VIEW" ]
@@ -3429,6 +3439,25 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar, varchar # type
% 19, 3, 27, 21, 18, 34, 4 # length
+[ "column used by view", "sys", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "authorization",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "owner",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "system",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
[ "column used by view", "sys", "columns", "default",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "id",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "name",
"information_schema", "columns", "VIEW" ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.int128
b/sql/test/emptydb/Tests/check.stable.out.int128
--- a/sql/test/emptydb/Tests/check.stable.out.int128
+++ b/sql/test/emptydb/Tests/check.stable.out.int128
@@ -446,14 +446,14 @@ select 'null in fkeys.delete_action', de
% varchar, varchar, varchar, varchar, varchar,
boolean, varchar, varchar, varchar # type
% 11, 18, 34, 6812, 5, 5, 8, 8, 0 # length
[ "sys._tables", "information_schema", "character_sets", "create
view information_schema.character_sets as select cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast('UTF-8' as varchar(16)) as character_set_name, cast('ISO/IEC 10646:2021'
as varchar(20)) as character_repertoire, cast('UTF-8' as varchar(16)) as
form_of_use, cast(null as varchar(1)) as default_collate_catalog, cast(null as
varchar(1)) as default_collate_schema, cast(null as varchar(1)) as
default_collate_name;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
-[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, cast(null as varchar(1024)) as constraint_schema, cast(null
as varchar(1024)) as constraint_name, cast(null as varchar(1024)) as
check_clause where 1=0;", "VIEW", true, "COMMIT", "WRITABLE", NULL
]
+[ "sys._tables", "information_schema", "check_constraints", "create
view information_schema.check_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, sys.check_constraint(s.\"name\", k.\"name\") as check_clause,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"name\" as table_name,
k.\"id\" as key_id from (select sk.\"id\", sk.\"table_id\", sk.\"name\" from
sys.\"keys\" sk where sk.\"type\" = 4 union all select tk.\"id\",
tk.\"table_id\", tk.\"name\" from tmp.\"keys\" tk where tk.\"type\" = 4) k
inner join (select st.\"id\", st.\"schema_id\", st.\"name\" from
sys.\"_tables\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\"
from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join
sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "columns", "create view
information_schema.columns as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, c.\"name\" as
column_name, cast(1 + c.\"number\" as int) as ordinal_position, c.\"default\"
as column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3))
as is_nullable, cast(sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\",
c.\"type_scale\", true, true) as varchar(1024)) as data_type,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml')
and c.\"type_digits\" > 0, c.\"type_digits\", null) as int) as
character_maximum_length, cast(sys.ifthenelse(c.\"type\" in
('varchar','clob','char','json','url','xml') and c.\"type_digits\" > 0, 4 *
cast(c.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"
type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(c.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(c.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
c.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(c.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(c.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(c.\"type\", c.\"type_digits\", c.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case c.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(c.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(c.\"type_scale\" > 0, c.\"type_scale\", 3), 0)) else null end
as int) as interval_precision, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(c.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(null as varchar(1)) as domain_catalog,
cast(null as varchar(1)) as domain_schema, cast(null as varchar(1)) as
domain_name, cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1))
as udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1))
as scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast('NO' as varchar(3)) as
is_self_referencing, cast(sys.i
fthenelse(seq.\"name\" is null or c.\"null\", 'NO', 'YES') as varchar(3)) as
is_identity, seq.\"name\" as identity_generation, seq.\"start\" as
identity_start, seq.\"increment\" as identity_increment, seq.\"maxvalue\" as
identity_maximum, seq.\"minvalue\" as identity_minimum,
cast(sys.ifthenelse(seq.\"name\" is null, null, sys.ifthenelse(seq.\"cycle\",
'YES', 'NO')) as varchar(3)) as identity_cycle,
cast(sys.ifthenelse(seq.\"name\" is null, 'NO', 'YES') as varchar(3)) as
is_generated, cast(sys.ifthenelse(seq.\"name\" is null, null, c.\"default\") as
varchar(1024)) as generation_expression, cast('NO' as varchar(3)) as
is_system_time_period_start, cast('NO' as varchar(3)) as
is_system_time_period_end, cast('NO' as varchar(3)) as
system_time_period_timestamp_generation, cast(sys.ifthenelse(t.\"type\" in
(0,3,7,20,30), 'YES', 'NO') as varchar(3)) as is_updatable, cast(null as
varchar(1)) as declared_data_type, cast(null as int) as
declared_numeric_precision, cast(null as int) as declare
d_numeric_scale, t.\"schema_id\" as schema_id, c.\"table_id\" as table_id,
c.\"id\" as column_id, seq.\"id\" as sequence_id, t.\"system\" as is_system,
cm.\"remark\" as comments from sys.\"columns\" c inner join sys.\"tables\" t on
c.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s on t.\"schema_id\" =
s.\"id\" left outer join sys.\"comments\" cm on c.\"id\" = cm.\"id\" left outer
join sys.\"sequences\" seq on ((seq.\"name\"||'\"') = substring(c.\"default\",
3 + sys.\"locate\"('\".\"seq_',c.\"default\",14))) order by s.\"name\",
t.\"name\", c.\"number\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "parameters", "create view
information_schema.parameters as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(sys.ifthenelse((a.\"inout\" = 0 or f.\"type\" = 2), 1 + a.\"number\",
sys.ifthenelse(f.\"type\" = 1, a.\"number\", (1 + a.\"number\" -
f.count_out_cols))) as int) as ordinal_position,
cast(sys.ifthenelse(a.\"inout\" = 0, 'OUT', sys.ifthenelse(a.\"inout\" = 1,
'IN', 'INOUT')) as varchar(5)) as parameter_mode,
cast(sys.ifthenelse(a.\"inout\" = 0, 'YES', 'NO') as varchar(3)) as is_result,
cast(null as varchar(1)) as as_locator, a.\"name\" as parameter_name, cast(null
as varchar(1)) as from_sql_specific_catalog, cast(null as varchar(1)) as
from_sql_specific_schema, cast(null as varchar(1)) as from_sql_specific_name,
cast(null as varchar(1)) as to_sql_specific_catalog, cast(null as varchar(1))
as to_sql_specific_schema, cast(null as
varchar(1)) as to_sql_specific_name, cast(sys.\"sql_datatype\"(a.\"type\",
a.\"type_digits\", a.\"type_scale\", true, true) as varchar(1024)) as
data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", null) as int) as character_maximum_length,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml')
and a.\"type_digits\" > 0, 4 * cast(a.\"type_digits\" as bigint), null) as
bigint) as character_octet_length, cast(null as varchar(1)) as
character_set_catalog, cast(null as varchar(1)) as character_set_schema,
cast(sys.ifthenelse(a.\"type\" in ('varchar','clob','char','json','url','xml'),
'UTF-8', null) as varchar(16)) as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decima
l','numeric','oid'), a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_scale\", null) as int) as numeric_scale,
cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\" -1, 0), null) as int) as
datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digi
ts\" in (7, 10, 12, 13), sys.ifthenelse(a.\"type_scale\" > 0,
a.\"type_scale\", 3), 0)) else null end as int) as interval_precision,
cast(null as varchar(1)) as udt_catalog, cast(null as varchar(1)) as
udt_schema, cast(null as varchar(1)) as udt_name, cast(null as varchar(1)) as
scope_catalog, cast(null as varchar(1)) as scope_schema, cast(null as
varchar(1)) as scope_name, cast(null as int) as maximum_cardinality, cast(null
as varchar(1)) as dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
parameter_default, f.\"schema_id\" as schema_id, f.\"id\" as function_id,
a.\"id\" as arg_id, f.\"name\" as function_name, f.\"type\" as function_type,
f.\"system\" as is_system from sys.\"args\" a inner join (select fun.*, (select
count(*) from sys.args a0 where a0.inout = 0 and a0.func_id = fun.id) as
count_out_cols from sys.\"functions\" fun where fun.\"type\
" in (1, 2, 5, 7)) f on f.\"id\" = a.\"func_id\" inner join sys.\"schemas\" s
on s.\"id\" = f.\"schema_id\" order by s.\"name\", f.\"name\", f.\"id\",
a.\"inout\" desc, a.\"number\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "referential_constraints",
"create view information_schema.referential_constraints as select cast(null as
varchar(1)) as constraint_catalog, s.\"name\" as constraint_schema, fk.\"name\"
as constraint_name, cast(null as varchar(1)) as unique_constraint_catalog,
uks.\"name\" as unique_constraint_schema, uk.\"name\" as
unique_constraint_name, cast('FULL' as varchar(7)) as match_option,
fk.\"update_action\" as update_rule, fk.\"delete_action\" as delete_rule,
t.\"schema_id\" as fk_schema_id, t.\"id\" as fk_table_id, t.\"name\" as
fk_table_name, fk.\"id\" as fk_key_id, ukt.\"schema_id\" as uc_schema_id,
uk.\"table_id\" as uc_table_id, ukt.\"name\" as uc_table_name, uk.\"id\" as
uc_key_id from sys.\"fkeys\" fk inner join sys.\"tables\" t on t.\"id\" =
fk.\"table_id\" inner join sys.\"schemas\" s on s.\"id\" = t.\"schema_id\" left
outer join sys.\"keys\" uk on uk.\"id\" = fk.\"rkey\" left outer join
sys.\"tables\" ukt on ukt.\"id\" = uk.\"table_id\" l
eft outer join sys.\"schemas\" uks on uks.\"id\" = ukt.\"schema_id\" order by
s.\"name\", t.\"name\", fk.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "information_schema", "routines", "create view
information_schema.routines as select cast(null as varchar(1)) as
specific_catalog, s.\"name\" as specific_schema,
cast(f.\"name\"||'('||f.\"id\"||')' as varchar(270)) as specific_name,
cast(null as varchar(1)) as routine_catalog, s.\"name\" as routine_schema,
f.\"name\" as routine_name, ft.\"function_type_keyword\" as routine_type,
cast(null as varchar(1)) as module_catalog, cast(null as varchar(1)) as
module_schema, cast(f.\"mod\" as varchar(128)) as module_name, cast(null as
varchar(1)) as udt_catalog, cast(null as varchar(1)) as udt_schema, cast(null
as varchar(1)) as udt_name, cast(case f.\"type\" when 1 then
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true) when 2 then null when 5 then 'TABLE' when 7 then 'TABLE' else null end as
varchar(1024)) as data_type, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0,
a.\"type_digits\", n
ull) as int) as character_maximum_length, cast(sys.ifthenelse(a.\"type\" in
('varchar','clob','char','json','url','xml') and a.\"type_digits\" > 0, 4 *
cast(a.\"type_digits\" as bigint), null) as bigint) as character_octet_length,
cast(null as varchar(1)) as character_set_catalog, cast(null as varchar(1)) as
character_set_schema, 'UTF-8' as character_set_name, cast(null as varchar(1))
as collation_catalog, cast(null as varchar(1)) as collation_schema, cast(null
as varchar(1)) as collation_name, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','decimal','numeric','oid'),
a.\"type_digits\", null) as int) as numeric_precision,
cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real','double','oid'),
2, sys.ifthenelse(a.\"type\" in ('decimal','numeric'), 10, null)) as int) as
numeric_precision_radix, cast(sys.ifthenelse(a.\"type\" in
('int','smallint','tinyint','bigint','hugeint','float','real
','double','decimal','numeric','oid'), a.\"type_scale\", null) as int) as
numeric_scale, cast(sys.ifthenelse(a.\"type\" in
('date','timestamp','timestamptz','time','timetz'), a.\"type_scale\" -1, null)
as int) as datetime_precision, cast(sys.ifthenelse(a.\"type\" in
('day_interval','month_interval','sec_interval'),
sys.\"sql_datatype\"(a.\"type\", a.\"type_digits\", a.\"type_scale\", true,
true), null) as varchar(40)) as interval_type, cast(case a.\"type\" when
'day_interval' then 0 when 'month_interval' then 0 when 'sec_interval' then
(sys.ifthenelse(a.\"type_digits\" in (7, 10, 12, 13),
sys.ifthenelse(a.\"type_scale\" > 0, a.\"type_scale\", 3), 0)) else null end as
int) as interval_precision, cast(null as varchar(1)) as type_udt_catalog,
cast(null as varchar(1)) as type_udt_schema, cast(null as varchar(1)) as
type_udt_name, cast(null as varchar(1)) as scope_catalog, cast(null as
varchar(1)) as scope_schema, cast(null as varchar(1)) as scope_name, cast(null
as int) as maximum_cardi
nality, cast(null as int) as dtd_identifier,
cast(sys.\"ifthenelse\"(sys.\"locate\"('begin',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", sys.\"locate\"('begin',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\")))-1), sys.\"substring\"(f.\"func\",
sys.\"locate\"('begin',f.\"func\"))), null) as varchar(8196)) as routine_body,
f.\"func\" as routine_definition,
cast(sys.\"ifthenelse\"(sys.\"locate\"('external name',f.\"func\") > 0,
sys.\"ifthenelse\"(sys.\"endswith\"(f.\"func\",';'),
sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external name',f.\"func\"),
sys.\"length\"(sys.\"substring\"(f.\"func\", 14 + sys.\"locate\"('external
name',f.\"func\")))-1), sys.\"substring\"(f.\"func\", 14 +
sys.\"locate\"('external name',f.\"func\"))), null) as varchar(1024)) as
external_name, fl.\"language_keyword\" as external_language, 'GENERAL' as
parameter_style, 'YES' as is_deterministic, cast(sys.if
thenelse(f.\"side_effect\", 'MODIFIES', 'READ') as varchar(10)) as
sql_data_access, cast(case f.\"type\" when 2 then null else 'NO' end as
varchar(3)) as is_null_call, cast(null as varchar(1)) as sql_path, cast(null as
varchar(1)) as schema_level_routine, cast(null as int) as
max_dynamic_result_sets, cast(null as varchar(1)) as is_user_defined_cast,
cast(null as varchar(1)) as is_implicitly_invocable, cast(null as varchar(1))
as security_type, cast(null as varchar(1)) as to_sql_specific_catalog,
cast(null as varchar(1)) as to_sql_specific_schema, cast(null as varchar(1)) as
to_sql_specific_name, cast(null as varchar(1)) as as_locator, cast(null as
timestamp) as created, cast(null as timestamp) as last_altered, cast(null as
varchar(1)) as new_savepoint_level, cast(null as varchar(1)) as
is_udt_dependent, cast(null as varchar(1)) as result_cast_from_data_type,
cast(null as varchar(1)) as result_cast_as_locator, cast(null as int) as
result_cast_char_max_length, cast(null as int) as res
ult_cast_char_octet_length, cast(null as varchar(1)) as
result_cast_char_set_catalog, cast(null as varchar(1)) as
result_cast_char_set_schema, cast(null as varchar(1)) as
result_cast_character_set_name, cast(null as varchar(1)) as
result_cast_collation_catalog, cast(null as varchar(1)) as
result_cast_collation_schema, cast(null as varchar(1)) as
result_cast_collation_name, cast(null as int) as result_cast_numeric_precision,
cast(null as int) as result_cast_numeric_radix, cast(null as int) as
result_cast_numeric_scale, cast(null as int) as result_cast_datetime_precision,
cast(null as varchar(1)) as result_cast_interval_type, cast(null as int) as
result_cast_interval_precision, cast(null as varchar(1)) as
result_cast_type_udt_catalog, cast(null as varchar(1)) as
result_cast_type_udt_schema, cast(null as varchar(1)) as
result_cast_type_udt_name, cast(null as varchar(1)) as
result_cast_scope_catalog, cast(null as varchar(1)) as
result_cast_scope_schema, cast(null as varchar(1)) as resul
t_cast_scope_name, cast(null as int) as result_cast_max_cardinality, cast(null
as varchar(1)) as result_cast_dtd_identifier, cast(null as varchar(1)) as
declared_data_type, cast(null as int) as declared_numeric_precision, cast(null
as int) as declared_numeric_scale, cast(null as varchar(1)) as
result_cast_from_declared_data_type, cast(null as int) as
result_cast_declared_numeric_precision, cast(null as int) as
result_cast_declared_numeric_scale, f.\"schema_id\" as schema_id, f.\"id\" as
function_id, f.\"type\" as function_type, f.\"language\" as function_language,
f.\"system\" as is_system, cm.\"remark\" as comments from sys.\"functions\" f
inner join sys.\"schemas\" s on s.\"id\" = f.\"schema_id\" inner join
sys.\"function_types\" ft on ft.\"function_type_id\" = f.\"type\" inner join
sys.\"function_languages\" fl on fl.\"language_id\" = f.\"language\" left outer
join sys.\"args\" a on a.\"func_id\" = f.\"id\" and a.\"inout\" = 0 and
a.\"number\" = 0 left outer join sys.\"comments\"
cm on cm.\"id\" = f.\"id\" where f.\"type\" in (1, 2, 5, 7) order by
s.\"name\", f.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
[ "sys._tables", "information_schema", "schemata", "create view
information_schema.schemata as select cast(null as varchar(1)) as catalog_name,
s.\"name\" as schema_name, a.\"name\" as schema_owner, cast(null as varchar(1))
as default_character_set_catalog, cast(null as varchar(1)) as
default_character_set_schema, cast('UTF-8' as varchar(16)) as
default_character_set_name, cast(null as varchar(1)) as sql_path, s.\"id\" as
schema_id, s.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"schemas\" s inner join sys.\"auths\" a on s.\"owner\" = a.\"id\" left
outer join sys.\"comments\" cm on s.\"id\" = cm.\"id\" order by s.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "sequences", "create view
information_schema.sequences as select cast(null as varchar(1)) as
sequence_catalog, s.\"name\" as sequence_schema, sq.\"name\" as sequence_name,
cast('BIGINT' as varchar(16)) as data_type, cast(64 as smallint) as
numeric_precision, cast(2 as smallint) as numeric_precision_radix, cast(0 as
smallint) as numeric_scale, sq.\"start\" as start_value, sq.\"minvalue\" as
minimum_value, sq.\"maxvalue\" as maximum_value, sq.\"increment\" as increment,
cast(sys.ifthenelse(sq.\"cycle\", 'YES', 'NO') as varchar(3)) as cycle_option,
cast(null as varchar(16)) as declared_data_type, cast(null as smallint) as
declared_numeric_precision, cast(null as smallint) as declared_numeric_scale,
sq.\"schema_id\" as schema_id, sq.\"id\" as sequence_id,
get_value_for(s.\"name\", sq.\"name\") as current_value, sq.\"cacheinc\" as
cacheinc, cm.\"remark\" as comments from sys.\"sequences\" sq inner join
sys.\"schemas\" s on sq.\"schema_id\" = s.\"id\
" left outer join sys.\"comments\" cm on sq.\"id\" = cm.\"id\" order by
s.\"name\", sq.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
-[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' else null end as
varchar(16)) as constraint_type, cast('NO' as varchar(3)) as is_deferrable,
cast('NO' as varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as
enforced, t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as
key_id, k.\"type\" as key_type, t.\"system\" as is_system from (select
sk.\"id\", sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union
all select tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from
tmp.\"keys\" tk) k inner join (select st.\"id\", st.\"schema_id\", st.\"name\",
st.\"system\" from sys.\"_tabl
es\" st union all select tt.\"id\", tt.\"schema_id\", tt.\"name\",
tt.\"system\" from tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner
join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\" order by s.\"name\",
t.\"name\", k.\"name\";", "VIEW", true, "COMMIT", "WRITABLE",
NULL ]
+[ "sys._tables", "information_schema", "table_constraints", "create
view information_schema.table_constraints as select cast(null as varchar(1)) as
constraint_catalog, s.\"name\" as constraint_schema, k.\"name\" as
constraint_name, cast(null as varchar(1)) as table_catalog, s.\"name\" as
table_schema, t.\"name\" as table_name, cast(case k.\"type\" when 0 then
'PRIMARY KEY' when 1 then 'UNIQUE' when 2 then 'FOREIGN KEY' when 3 then
'UNIQUE NULLS NOT DISTINCT' when 4 then 'CHECK' else null end as varchar(26))
as constraint_type, cast('NO' as varchar(3)) as is_deferrable, cast('NO' as
varchar(3)) as initially_deferred, cast('YES' as varchar(3)) as enforced,
t.\"schema_id\" as schema_id, t.\"id\" as table_id, k.\"id\" as key_id,
k.\"type\" as key_type, t.\"system\" as is_system from (select sk.\"id\",
sk.\"table_id\", sk.\"name\", sk.\"type\" from sys.\"keys\" sk union all select
tk.\"id\", tk.\"table_id\", tk.\"name\", tk.\"type\" from tmp.\"keys\" tk) k
inner join (select st.\"id\", s
t.\"schema_id\", st.\"name\", st.\"system\" from sys.\"_tables\" st union all
select tt.\"id\", tt.\"schema_id\", tt.\"name\", tt.\"system\" from
tmp.\"_tables\" tt) t on k.\"table_id\" = t.\"id\" inner join sys.\"schemas\" s
on t.\"schema_id\" = s.\"id\" order by s.\"name\", t.\"name\", k.\"name\";",
"VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "tables", "create view
information_schema.tables as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, tt.\"table_type_name\" as
table_type, cast(null as varchar(1)) as self_referencing_column_name, cast(null
as varchar(1)) as reference_generation, cast(null as varchar(1)) as
user_defined_type_catalog, cast(null as varchar(1)) as
user_defined_type_schema, cast(null as varchar(1)) as user_defined_type_name,
cast(sys.ifthenelse((t.\"type\" in (0, 3, 7, 20, 30) and t.\"access\" in (0,
2)), 'YES', 'NO') as varchar(3)) as is_insertable_into, cast('NO' as
varchar(3)) as is_typed, cast((case t.\"commit_action\" when 1 then 'DELETE'
when 2 then 'PRESERVE' when 3 then 'DROP' else null end) as varchar(10)) as
commit_action, t.\"schema_id\" as schema_id, t.\"id\" as table_id, t.\"type\"
as table_type_id, st.\"count\" as row_count, t.\"system\" as is_system,
sys.ifthenelse(t.\"type\" in (1, 11), true, fa
lse) as is_view, t.\"query\" as query_def, cm.\"remark\" as comments from
sys.\"tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
inner join sys.\"table_types\" tt on t.\"type\" = tt.\"table_type_id\" left
outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" left outer join (select
distinct \"schema\", \"table\", \"count\" from sys.\"statistics\"()) st on
(s.\"name\" = st.\"schema\" and t.\"name\" = st.\"table\") order by s.\"name\",
t.\"name\";", "VIEW", true, "COMMIT", "WRITABLE", NULL ]
[ "sys._tables", "information_schema", "views", "create view
information_schema.views as select cast(null as varchar(1)) as table_catalog,
s.\"name\" as table_schema, t.\"name\" as table_name, t.\"query\" as
view_definition, cast('NONE' as varchar(10)) as check_option, cast('NO' as
varchar(3)) as is_updatable, cast('NO' as varchar(3)) as insertable_into,
cast('NO' as varchar(3)) as is_trigger_updatable, cast('NO' as varchar(3)) as
is_trigger_deletable, cast('NO' as varchar(3)) as is_trigger_insertable_into,
t.\"schema_id\" as schema_id, t.\"id\" as table_id,
cast(sys.ifthenelse(t.\"system\", t.\"type\" + 10 , t.\"type\") as smallint) as
table_type_id, t.\"system\" as is_system, cm.\"remark\" as comments from
sys.\"_tables\" t inner join sys.\"schemas\" s on t.\"schema_id\" = s.\"id\"
left outer join sys.\"comments\" cm on t.\"id\" = cm.\"id\" where t.\"type\" =
1 order by s.\"name\", t.\"name\";", "VIEW", true, "COMMIT",
"WRITABLE", NULL ]
[ "sys._tables", "logging", "compinfo", "create view
logging.compinfo as select * from logging.compinfo();", "VIEW", true,
"COMMIT", "WRITABLE", NULL ]
@@ -603,7 +603,11 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "check_constraints",
"constraint_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_schema", "varchar", 1024, 0, NULL, true, 1,
NULL, NULL ]
[ "sys._columns", "information_schema", "check_constraints",
"constraint_name", "varchar", 1024, 0, NULL, true, 2,
NULL, NULL ]
-[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 1024, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"check_clause", "varchar", 0, 0, NULL, true, 3, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"schema_id", "int", 31, 0, NULL, true, 4, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_id", "int", 31, 0, NULL, true, 5, NULL, NULL
]
+[ "sys._columns", "information_schema", "check_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 6, NULL,
NULL ]
+[ "sys._columns", "information_schema", "check_constraints",
"key_id", "int", 31, 0, NULL, true, 7, NULL, NULL
]
[ "sys._columns", "information_schema", "columns",
"table_catalog", "varchar", 1, 0, NULL, true, 0,
NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_schema",
"varchar", 1024, 0, NULL, true, 1, NULL, NULL ]
[ "sys._columns", "information_schema", "columns", "table_name",
"varchar", 1024, 0, NULL, true, 2, NULL, NULL ]
@@ -854,7 +858,7 @@ select 'null in fkeys.delete_action', de
[ "sys._columns", "information_schema", "table_constraints",
"table_catalog", "varchar", 1, 0, NULL, true, 3,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_schema", "varchar", 1024, 0, NULL, true, 4, NULL,
NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"table_name", "varchar", 1024, 0, NULL, true, 5, NULL,
NULL ]
-[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 16, 0, NULL, true, 6,
NULL, NULL ]
+[ "sys._columns", "information_schema", "table_constraints",
"constraint_type", "varchar", 26, 0, NULL, true, 6,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"is_deferrable", "varchar", 3, 0, NULL, true, 7,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"initially_deferred", "varchar", 3, 0, NULL, true, 8,
NULL, NULL ]
[ "sys._columns", "information_schema", "table_constraints",
"enforced", "varchar", 3, 0, NULL, true, 9, NULL,
NULL ]
@@ -3193,6 +3197,7 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 21, 7, 37, 18, 26, 4 # length
+[ "function used by view", "sys", "check_constraint",
"information_schema", "check_constraints", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"columns", "VIEW" ]
[ "function used by view", "sys", "sql_datatype", "information_schema",
"parameters", "VIEW" ]
[ "function used by view", "sys", "endswith", "information_schema",
"routines", "VIEW" ]
@@ -3281,6 +3286,11 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar # type
% 18, 3, 27, 18, 34, 4 # length
+[ "table used by view", "sys", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "keys", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "sys", "schemas", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "_tables", "information_schema",
"check_constraints", "VIEW" ]
+[ "table used by view", "tmp", "keys", "information_schema",
"check_constraints", "VIEW" ]
[ "table used by view", "sys", "columns", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "comments", "information_schema",
"columns", "VIEW" ]
[ "table used by view", "sys", "schemas", "information_schema",
"columns", "VIEW" ]
@@ -3544,6 +3554,25 @@ select 'null in fkeys.delete_action', de
% %1, name, name, name, name, name, dependency_type_name # name
% varchar, varchar, varchar, varchar, varchar,
varchar, varchar # type
% 19, 3, 27, 21, 18, 34, 4 # length
+[ "column used by view", "sys", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "authorization",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "owner",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "sys", "schemas", "system",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "name",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "_tables", "schema_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "id", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "name", "information_schema",
"check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "table_id",
"information_schema", "check_constraints", "VIEW" ]
+[ "column used by view", "tmp", "keys", "type", "information_schema",
"check_constraints", "VIEW" ]
[ "column used by view", "sys", "columns", "default",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "id",
"information_schema", "columns", "VIEW" ]
[ "column used by view", "sys", "columns", "name",
"information_schema", "columns", "VIEW" ]
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]