Changeset: f29975023432 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f29975023432
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: default
Log Message:

Approve new added information_schema views check_constraints, sequences and 
table_constraints.


diffs (truncated from 470 to 300 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
@@ -444,10 +444,13 @@ select 'null in fkeys.delete_action', de
 % .%25,        .s,     .t,     .,      .,      .t,     .,      .,      . # 
table_name
 % %25, name,   name,   query,  type,   system, commit_action,  access, comment 
# name
 % char,        varchar,        varchar,        clob,   varchar,        
boolean,        char,   char,   varchar # type
-% 11,  18,     34,     3752,   5,      5,      8,      10,     0 # length
+% 11,  18,     34,     4470,   5,      5,      8,      10,     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",   "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(c.\"number\" +1 as int) as ordinal_position, c.\"default\" as 
column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3)) as 
is_nullable, c.\"type\" as data_type, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\", null) as int) 
as character_maximum_length, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\" * 3, null) as 
int) 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'), c.\"type_scale\" -1, null) 
as int) as datetime_precision, cast(case c.\"type\" when 'day_interval' then 
'interval day' when 'month_interval' then 'interval month' when 'sec_interval' 
then 'interval second' else null end as varchar(40)) as interval_type, 
cast(sys.ifthenelse(c.\"type\" in 
('day_interval','month_interval','sec_interval'), c.\"type_scale\" -1, null) 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_nam
 e, 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(case when c.\"default\" 
like 'next value for %' then 'YES' else 'NO' end as varchar(3)) as is_identity, 
cast(null as varchar(10)) as identity_generation, cast(null as int) as 
identity_start, cast(null as int) as identity_increment, cast(null as int) as 
identity_maximum, cast(null as int) as identity_minimum, cast(null as 
varchar(3)) as identit
 y_cycle, cast('NO' as varchar(3)) as is_generated, cast(null as varchar(1)) 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 declared_numeric_scale, 
t.\"schema_id\" as schema_id, c.\"table_id\" as table_id, c.\"id\" as 
column_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\" order by s.\"name\", t.\"name\", 
c.\"number\";",   "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",   "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(c.\"number\" +1 as int) as ordinal_position, c.\"default\" as 
column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3)) as 
is_nullable, case c.\"type\" when 'day_interval' then 'interval day' when 
'month_interval' then 'interval month' when 'sec_interval' then 'interval 
second' else c.\"type\" end as data_type, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\", null) as int) 
as character_maximum_length, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\" * 3, null) as 
int) 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'), c.\"type_scale\" -1, null) 
as int) as datetime_precision, cast(case c.\"type\" when 'day_interval' then 
'interval day' when 'month_interval' then (case c.\"type_digits\" when 1 then 
'interval year' when 2 then 'interval year to month' when 3 then 'interval 
month' else null end) when 'sec_interval' then (case c.\"type_digits\" when 5 
then 'interval day to hour' when 6 then 'interval day to minute' when 7 then 
'interval day to second' when 8 then 'interval hour' when 9 then
  'interval hour to minute' when 10 then 'interval hour to second' when 11 then 
'interval minute' when 12 then 'interval minute to second' when 13 then 
'interval second' else null end) else null end 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, c
 ast(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(case when c.\"default\" like 'next value for %' then 
'YES' else 'NO' end as varchar(3)) as is_identity, cast(null as varchar(10)) as 
identity_generation, cast(null as int) as identity_start, cast(null as int) as 
identity_increment, cast(null as int) as identity_maximum, cast(null as int) as 
identity_minimum, cast(null as varchar(3)) as identity_cycle, cast('NO' as 
varchar(3)) as is_generated, cast(null as varchar(1)) 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_timestam
 p_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 
declared_numeric_scale, t.\"schema_id\" as schema_id, c.\"table_id\" as 
table_id, c.\"id\" as column_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\" order by s.\"name\", 
t.\"name\", c.\"number\";",        "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",   "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    ]
@@ -593,6 +596,10 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_catalog",      "varchar",      1,      0,      NULL,   true,   
5,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_schema",       "varchar",      1,      0,      NULL,   true,   
6,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_name", "varchar",      1,      0,      NULL,   true,   7,      
NULL,   NULL    ]
+[ "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",   "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    ]
@@ -600,7 +607,7 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "columns",      
"ordinal_position",     "int",  32,     0,      NULL,   true,   4,      NULL,   
NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"column_default",       "varchar",      2048,   0,      NULL,   true,   5,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      "is_nullable",  
"varchar",      3,      0,      NULL,   true,   6,      NULL,   NULL    ]
-[ "sys._columns",      "information_schema",   "columns",      "data_type",    
"varchar",      1024,   0,      NULL,   true,   7,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "columns",      "data_type",    
"char", 1024,   0,      NULL,   true,   7,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"character_maximum_length",     "int",  32,     0,      NULL,   true,   8,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"character_octet_length",       "int",  32,     0,      NULL,   true,   9,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"numeric_precision",    "int",  32,     0,      NULL,   true,   10,     NULL,   
NULL    ]
@@ -658,6 +665,41 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "schemata",     "schema_id",    
"int",  32,     0,      NULL,   true,   7,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "schemata",     "is_system",    
"boolean",      1,      0,      NULL,   true,   8,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "schemata",     "comments",     
"varchar",      65000,  0,      NULL,   true,   9,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_catalog",     "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_schema",      "varchar",      1024,   0,      NULL,   true,   1,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_name",        "varchar",      256,    0,      NULL,   true,   2,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "data_type",    
"varchar",      16,     0,      NULL,   true,   3,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_precision",    "smallint",     16,     0,      NULL,   true,   4,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_precision_radix",      "smallint",     16,     0,      NULL,   true,   
5,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_scale",        "smallint",     16,     0,      NULL,   true,   6,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "start_value",  
"bigint",       64,     0,      NULL,   true,   7,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"minimum_value",        "bigint",       64,     0,      NULL,   true,   8,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"maximum_value",        "bigint",       64,     0,      NULL,   true,   9,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "increment",    
"bigint",       64,     0,      NULL,   true,   10,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "cycle_option", 
"varchar",      3,      0,      NULL,   true,   11,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_data_type",   "varchar",      16,     0,      NULL,   true,   12,     
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_numeric_precision",   "smallint",     16,     0,      NULL,   true,   
13,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_numeric_scale",       "smallint",     16,     0,      NULL,   true,   
14,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "schema_id",    
"int",  32,     0,      NULL,   true,   15,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "sequence_id",  
"int",  32,     0,      NULL,   true,   16,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"current_value",        "bigint",       64,     0,      NULL,   true,   17,     
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "cacheinc",     
"bigint",       64,     0,      NULL,   true,   18,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "comments",     
"varchar",      65000,  0,      NULL,   true,   19,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_catalog",   "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_schema",    "varchar",      1024,   0,      NULL,   true,   1,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_name",      "varchar",      1024,   0,      NULL,   true,   2,      
NULL,   NULL    ]
+[ "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",    
"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    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"schema_id",    "int",  32,     0,      NULL,   true,   10,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"table_id",     "int",  32,     0,      NULL,   true,   11,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"key_id",       "int",  32,     0,      NULL,   true,   12,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"key_type",     "int",  32,     0,      NULL,   true,   13,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"is_system",    "boolean",      1,      0,      NULL,   true,   14,     NULL,   
NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       
"table_catalog",        "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       "table_schema", 
"varchar",      1024,   0,      NULL,   true,   1,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       "table_name",   
"varchar",      1024,   0,      NULL,   true,   2,      NULL,   NULL    ]
@@ -3065,6 +3107,14 @@ select 'null in fkeys.delete_action', de
 [ "table used by view",        "sys",  "auths",        "information_schema",   
"schemata",     "VIEW"  ]
 [ "table used by view",        "sys",  "comments",     "information_schema",   
"schemata",     "VIEW"  ]
 [ "table used by view",        "sys",  "schemas",      "information_schema",   
"schemata",     "VIEW"  ]
+[ "table used by view",        "sys",  "comments",     "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "schemas",      "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "sequences",    "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "_tables",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "sys",  "keys", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "sys",  "schemas",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "tmp",  "_tables",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "tmp",  "keys", "information_schema",   
"table_constraints",    "VIEW"  ]
 [ "table used by view",        "sys",  "comments",     "information_schema",   
"tables",       "VIEW"  ]
 [ "table used by view",        "sys",  "schemas",      "information_schema",   
"tables",       "VIEW"  ]
 [ "table used by view",        "sys",  "table_types",  "information_schema",   
"tables",       "VIEW"  ]
@@ -3325,6 +3375,40 @@ select 'null in fkeys.delete_action', de
 [ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "schemata",     "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "owner",        
"information_schema",   "schemata",     "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "system",       
"information_schema",   "schemata",     "VIEW"  ]
+[ "column used by view",       "sys",  "comments",     "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "comments",     "remark",       
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "cacheinc",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "cycle",        
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "increment",    
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "maxvalue",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "minvalue",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "name", 
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "schema_id",    
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "start",        
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "schema_id",    
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "id",   "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "name", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "table_id",     
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "type", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "authorization",        
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "owner",        
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "schema_id",    
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "id",   "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "name", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "table_id",     
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "type", "information_schema",   
"table_constraints",    "VIEW"  ]
 [ "column used by view",       "sys",  "comments",     "id",   
"information_schema",   "tables",       "VIEW"  ]
 [ "column used by view",       "sys",  "comments",     "remark",       
"information_schema",   "tables",       "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "tables",       "VIEW"  ]
@@ -4318,6 +4402,7 @@ select 'null in fkeys.delete_action', de
 [ "grant on table",    "args", "public",       "SELECT",       NULL,   0       
]
 [ "grant on table",    "auths",        "public",       "SELECT",       NULL,   
0       ]
 [ "grant on table",    "character_sets",       "public",       "SELECT",       
"monetdb",      1       ]
+[ "grant on table",    "check_constraints",    "public",       "SELECT",       
"monetdb",      1       ]
 [ "grant on table",    "columns",      "public",       "SELECT",       NULL,   
0       ]
 [ "grant on table",    "columns",      "public",       "SELECT",       
"monetdb",      1       ]
 [ "grant on table",    "comments",     "public",       "SELECT",       NULL,   
0       ]
@@ -4393,9 +4478,11 @@ select 'null in fkeys.delete_action', de
 [ "grant on table",    "roles",        "public",       "SELECT",       
"monetdb",      0       ]
 [ "grant on table",    "schemas",      "public",       "SELECT",       NULL,   
0       ]
 [ "grant on table",    "schemata",     "public",       "SELECT",       
"monetdb",      1       ]
+[ "grant on table",    "sequences",    "public",       "SELECT",       
"monetdb",      1       ]
 [ "grant on table",    "sequences",    "public",       "SELECT",       NULL,   
0       ]
 [ "grant on table",    "spatial_ref_sys",      "public",       "SELECT",       
"monetdb",      0       ]
 [ "grant on table",    "statistics",   "public",       "SELECT",       
"monetdb",      0       ]
+[ "grant on table",    "table_constraints",    "public",       "SELECT",       
"monetdb",      1       ]
 [ "grant on table",    "table_partitions",     "public",       "SELECT",       
NULL,   0       ]
 [ "grant on table",    "table_types",  "public",       "SELECT",       
"monetdb",      0       ]
 [ "grant on table",    "tables",       "public",       "SELECT",       
"monetdb",      1       ]
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
@@ -444,10 +444,13 @@ select 'null in fkeys.delete_action', de
 % .%25,        .s,     .t,     .,      .,      .t,     .,      .,      . # 
table_name
 % %25, name,   name,   query,  type,   system, commit_action,  access, comment 
# name
 % char,        varchar,        varchar,        clob,   varchar,        
boolean,        char,   char,   varchar # type
-% 11,  18,     34,     3752,   5,      5,      8,      10,     0 # length
+% 11,  18,     34,     4470,   5,      5,      8,      10,     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",   "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(c.\"number\" +1 as int) as ordinal_position, c.\"default\" as 
column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3)) as 
is_nullable, c.\"type\" as data_type, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\", null) as int) 
as character_maximum_length, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\" * 3, null) as 
int) 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'), c.\"type_scale\" -1, null) 
as int) as datetime_precision, cast(case c.\"type\" when 'day_interval' then 
'interval day' when 'month_interval' then 'interval month' when 'sec_interval' 
then 'interval second' else null end as varchar(40)) as interval_type, 
cast(sys.ifthenelse(c.\"type\" in 
('day_interval','month_interval','sec_interval'), c.\"type_scale\" -1, null) 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_nam
 e, 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(case when c.\"default\" 
like 'next value for %' then 'YES' else 'NO' end as varchar(3)) as is_identity, 
cast(null as varchar(10)) as identity_generation, cast(null as int) as 
identity_start, cast(null as int) as identity_increment, cast(null as int) as 
identity_maximum, cast(null as int) as identity_minimum, cast(null as 
varchar(3)) as identit
 y_cycle, cast('NO' as varchar(3)) as is_generated, cast(null as varchar(1)) 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 declared_numeric_scale, 
t.\"schema_id\" as schema_id, c.\"table_id\" as table_id, c.\"id\" as 
column_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\" order by s.\"name\", t.\"name\", 
c.\"number\";",   "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",   "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(c.\"number\" +1 as int) as ordinal_position, c.\"default\" as 
column_default, cast(sys.ifthenelse(c.\"null\", 'YES', 'NO') as varchar(3)) as 
is_nullable, case c.\"type\" when 'day_interval' then 'interval day' when 
'month_interval' then 'interval month' when 'sec_interval' then 'interval 
second' else c.\"type\" end as data_type, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\", null) as int) 
as character_maximum_length, cast(sys.ifthenelse(c.\"type\" in 
('varchar','clob','char','json','url','xml'), c.\"type_digits\" * 3, null) as 
int) 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'), c.\"type_scale\" -1, null) 
as int) as datetime_precision, cast(case c.\"type\" when 'day_interval' then 
'interval day' when 'month_interval' then (case c.\"type_digits\" when 1 then 
'interval year' when 2 then 'interval year to month' when 3 then 'interval 
month' else null end) when 'sec_interval' then (case c.\"type_digits\" when 5 
then 'interval day to hour' when 6 then 'interval day to minute' when 7 then 
'interval day to second' when 8 then 'interval hour' when 9 then
  'interval hour to minute' when 10 then 'interval hour to second' when 11 then 
'interval minute' when 12 then 'interval minute to second' when 13 then 
'interval second' else null end) else null end 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, c
 ast(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(case when c.\"default\" like 'next value for %' then 
'YES' else 'NO' end as varchar(3)) as is_identity, cast(null as varchar(10)) as 
identity_generation, cast(null as int) as identity_start, cast(null as int) as 
identity_increment, cast(null as int) as identity_maximum, cast(null as int) as 
identity_minimum, cast(null as varchar(3)) as identity_cycle, cast('NO' as 
varchar(3)) as is_generated, cast(null as varchar(1)) 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_timestam
 p_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 
declared_numeric_scale, t.\"schema_id\" as schema_id, c.\"table_id\" as 
table_id, c.\"id\" as column_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\" order by s.\"name\", 
t.\"name\", c.\"number\";",        "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",   "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    ]
@@ -591,6 +594,10 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_catalog",      "varchar",      1,      0,      NULL,   true,   
5,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_schema",       "varchar",      1,      0,      NULL,   true,   
6,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "character_sets",       
"default_collate_name", "varchar",      1,      0,      NULL,   true,   7,      
NULL,   NULL    ]
+[ "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",   "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    ]
@@ -598,7 +605,7 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "columns",      
"ordinal_position",     "int",  32,     0,      NULL,   true,   4,      NULL,   
NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"column_default",       "varchar",      2048,   0,      NULL,   true,   5,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      "is_nullable",  
"varchar",      3,      0,      NULL,   true,   6,      NULL,   NULL    ]
-[ "sys._columns",      "information_schema",   "columns",      "data_type",    
"varchar",      1024,   0,      NULL,   true,   7,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "columns",      "data_type",    
"char", 1024,   0,      NULL,   true,   7,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"character_maximum_length",     "int",  32,     0,      NULL,   true,   8,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"character_octet_length",       "int",  32,     0,      NULL,   true,   9,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "columns",      
"numeric_precision",    "int",  32,     0,      NULL,   true,   10,     NULL,   
NULL    ]
@@ -656,6 +663,41 @@ select 'null in fkeys.delete_action', de
 [ "sys._columns",      "information_schema",   "schemata",     "schema_id",    
"int",  32,     0,      NULL,   true,   7,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "schemata",     "is_system",    
"boolean",      1,      0,      NULL,   true,   8,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "schemata",     "comments",     
"varchar",      65000,  0,      NULL,   true,   9,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_catalog",     "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_schema",      "varchar",      1024,   0,      NULL,   true,   1,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"sequence_name",        "varchar",      256,    0,      NULL,   true,   2,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "data_type",    
"varchar",      16,     0,      NULL,   true,   3,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_precision",    "smallint",     16,     0,      NULL,   true,   4,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_precision_radix",      "smallint",     16,     0,      NULL,   true,   
5,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"numeric_scale",        "smallint",     16,     0,      NULL,   true,   6,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "start_value",  
"bigint",       64,     0,      NULL,   true,   7,      NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"minimum_value",        "bigint",       64,     0,      NULL,   true,   8,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"maximum_value",        "bigint",       64,     0,      NULL,   true,   9,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "increment",    
"bigint",       64,     0,      NULL,   true,   10,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "cycle_option", 
"varchar",      3,      0,      NULL,   true,   11,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_data_type",   "varchar",      16,     0,      NULL,   true,   12,     
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_numeric_precision",   "smallint",     16,     0,      NULL,   true,   
13,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"declared_numeric_scale",       "smallint",     16,     0,      NULL,   true,   
14,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "schema_id",    
"int",  32,     0,      NULL,   true,   15,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "sequence_id",  
"int",  32,     0,      NULL,   true,   16,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    
"current_value",        "bigint",       64,     0,      NULL,   true,   17,     
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "cacheinc",     
"bigint",       64,     0,      NULL,   true,   18,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "sequences",    "comments",     
"varchar",      65000,  0,      NULL,   true,   19,     NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_catalog",   "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_schema",    "varchar",      1024,   0,      NULL,   true,   1,      
NULL,   NULL    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"constraint_name",      "varchar",      1024,   0,      NULL,   true,   2,      
NULL,   NULL    ]
+[ "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",    
"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    ]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"schema_id",    "int",  32,     0,      NULL,   true,   10,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"table_id",     "int",  32,     0,      NULL,   true,   11,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"key_id",       "int",  32,     0,      NULL,   true,   12,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"key_type",     "int",  32,     0,      NULL,   true,   13,     NULL,   NULL    
]
+[ "sys._columns",      "information_schema",   "table_constraints",    
"is_system",    "boolean",      1,      0,      NULL,   true,   14,     NULL,   
NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       
"table_catalog",        "varchar",      1,      0,      NULL,   true,   0,      
NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       "table_schema", 
"varchar",      1024,   0,      NULL,   true,   1,      NULL,   NULL    ]
 [ "sys._columns",      "information_schema",   "tables",       "table_name",   
"varchar",      1024,   0,      NULL,   true,   2,      NULL,   NULL    ]
@@ -2877,6 +2919,14 @@ select 'null in fkeys.delete_action', de
 [ "table used by view",        "sys",  "auths",        "information_schema",   
"schemata",     "VIEW"  ]
 [ "table used by view",        "sys",  "comments",     "information_schema",   
"schemata",     "VIEW"  ]
 [ "table used by view",        "sys",  "schemas",      "information_schema",   
"schemata",     "VIEW"  ]
+[ "table used by view",        "sys",  "comments",     "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "schemas",      "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "sequences",    "information_schema",   
"sequences",    "VIEW"  ]
+[ "table used by view",        "sys",  "_tables",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "sys",  "keys", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "sys",  "schemas",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "tmp",  "_tables",      "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "table used by view",        "tmp",  "keys", "information_schema",   
"table_constraints",    "VIEW"  ]
 [ "table used by view",        "sys",  "comments",     "information_schema",   
"tables",       "VIEW"  ]
 [ "table used by view",        "sys",  "schemas",      "information_schema",   
"tables",       "VIEW"  ]
 [ "table used by view",        "sys",  "table_types",  "information_schema",   
"tables",       "VIEW"  ]
@@ -3133,6 +3183,40 @@ select 'null in fkeys.delete_action', de
 [ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "schemata",     "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "owner",        
"information_schema",   "schemata",     "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "system",       
"information_schema",   "schemata",     "VIEW"  ]
+[ "column used by view",       "sys",  "comments",     "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "comments",     "remark",       
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "cacheinc",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "cycle",        
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "id",   
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "increment",    
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "maxvalue",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "minvalue",     
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "name", 
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "schema_id",    
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "sequences",    "start",        
"information_schema",   "sequences",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "schema_id",    
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "_tables",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "id",   "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "name", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "table_id",     
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "keys", "type", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "authorization",        
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "owner",        
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "sys",  "schemas",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "id",   
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "name", 
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "schema_id",    
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "_tables",      "system",       
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "id",   "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "name", "information_schema",   
"table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "table_id",     
"information_schema",   "table_constraints",    "VIEW"  ]
+[ "column used by view",       "tmp",  "keys", "type", "information_schema",   
"table_constraints",    "VIEW"  ]
 [ "column used by view",       "sys",  "comments",     "id",   
"information_schema",   "tables",       "VIEW"  ]
 [ "column used by view",       "sys",  "comments",     "remark",       
"information_schema",   "tables",       "VIEW"  ]
 [ "column used by view",       "sys",  "schemas",      "id",   
"information_schema",   "tables",       "VIEW"  ]
@@ -4108,6 +4192,7 @@ select 'null in fkeys.delete_action', de
 [ "grant on table",    "args", "public",       "SELECT",       NULL,   0       
]
 [ "grant on table",    "auths",        "public",       "SELECT",       NULL,   
0       ]
 [ "grant on table",    "character_sets",       "public",       "SELECT",       
"monetdb",      1       ]
+[ "grant on table",    "check_constraints",    "public",       "SELECT",       
"monetdb",      1       ]
 [ "grant on table",    "columns",      "public",       "SELECT",       NULL,   
0       ]
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to