Changeset: c2a233784d34 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c2a233784d34
Added Files:
        sql/test/sys-schema/Tests/check_MaxStrLength_violations.sql
        sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.err
        sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out
        sql/test/sys-schema/Tests/netcdf_tables_checks.sql
        sql/test/sys-schema/Tests/netcdf_tables_checks.stable.err
        sql/test/sys-schema/Tests/netcdf_tables_checks.stable.out
Modified Files:
        sql/test/sys-schema/Tests/All
        sql/test/sys-schema/Tests/bam_tables_checks.sql
        sql/test/sys-schema/Tests/bam_tables_checks.stable.out
        sql/test/sys-schema/Tests/check_PrimaryKey_uniqueness.stable.out
        sql/test/sys-schema/Tests/geom_tables_checks.sql
        sql/test/sys-schema/Tests/geom_tables_checks.stable.out
Branch: default
Log Message:

Added integrity checks for violations of character strings in columns whose 
data length is larger than the specified max length. See also isse 6676.
Added integrity checks for netcdf specific files.


diffs (truncated from 1507 to 300 lines):

diff --git a/sql/test/sys-schema/Tests/All b/sql/test/sys-schema/Tests/All
--- a/sql/test/sys-schema/Tests/All
+++ b/sql/test/sys-schema/Tests/All
@@ -2,6 +2,8 @@ check_PrimaryKey_uniqueness
 check_AlternateKey_uniqueness
 check_ForeignKey_referential_integrity
 check_Not_Nullable_columns
+check_MaxStrLength_violations
 
 HAVE_GEOM?geom_tables_checks
+HAVE_NETCDF?netcdf_tables_checks
 HAVE_SAMTOOLS?bam_tables_checks
diff --git a/sql/test/sys-schema/Tests/bam_tables_checks.sql 
b/sql/test/sys-schema/Tests/bam_tables_checks.sql
--- a/sql/test/sys-schema/Tests/bam_tables_checks.sql
+++ b/sql/test/sys-schema/Tests/bam_tables_checks.sql
@@ -1,4 +1,4 @@
--- Data integrity checks on bam schema tables
+-- Data integrity checks on bam schema tables (see 
/sql/backends/monet5/vaults/bam/85_bam.sql)
 
 -- Primary Key checks
 SELECT COUNT(*) AS duplicates, "file_id" FROM "bam"."files" GROUP BY "file_id" 
HAVING COUNT(*) > 1;
@@ -45,3 +45,7 @@ SELECT "file_id", * FROM "bam"."rg" WHER
 SELECT "sn", * FROM "bam"."sq" WHERE "sn" IS NULL;
 SELECT "file_id", * FROM "bam"."sq" WHERE "file_id" IS NULL;
 
+-- Character string data max length violation checks (see 
check_MaxStrLength_violations.sql for query to generate the below queries)
+SELECT '"bam"."files"."format_version"' as full_col_nm, 7 as 
max_allowed_length, length("format_version") as data_length, t."format_version" 
as data_value FROM "bam"."files" t WHERE "format_version" IS NOT NULL AND 
length("format_version") > (select type_digits from sys._columns where name = 
'format_version' and table_id in (select id from tables where name = 'files' 
and schema_id in (select id from sys.schemas where name = 'bam')));
+SELECT '"bam"."files"."sorting_order"' as full_col_nm, 10 as 
max_allowed_length, length("sorting_order") as data_length, t."sorting_order" 
as data_value FROM "bam"."files" t WHERE "sorting_order" IS NOT NULL AND 
length("sorting_order") > (select type_digits from sys._columns where name = 
'sorting_order' and table_id in (select id from tables where name = 'files' and 
schema_id in (select id from sys.schemas where name = 'bam')));
+
diff --git a/sql/test/sys-schema/Tests/bam_tables_checks.stable.out 
b/sql/test/sys-schema/Tests/bam_tables_checks.stable.out
--- a/sql/test/sys-schema/Tests/bam_tables_checks.stable.out
+++ b/sql/test/sys-schema/Tests/bam_tables_checks.stable.out
@@ -159,6 +159,16 @@ Ready.
 % file_id,     sn,     file_id,        ln,     as,     m5,     sp,     ur # 
name
 % bigint,      clob,   bigint, int,    int,    clob,   clob,   clob # type
 % 1,   0,      1,      1,      1,      0,      0,      0 # length
+#SELECT '"bam"."files"."format_version"' as full_col_nm, 7 as 
max_allowed_length, length("format_version") as data_length, t."format_version" 
as data_value FROM "bam"."files" t WHERE "format_version" IS NOT NULL AND 
length("format_version") > (select type_digits from sys._columns where name = 
'format_version' and table_id in (select id from tables where name = 'files' 
and schema_id in (select id from sys.schemas where name = 'bam')));
+% .L111,       .L113,  bam.L115,       bam.L117 # table_name
+% full_col_nm, max_allowed_length,     data_length,    data_value # name
+% char,        tinyint,        int,    varchar # type
+% 30,  1,      1,      0 # length
+#SELECT '"bam"."files"."sorting_order"' as full_col_nm, 10 as 
max_allowed_length, length("sorting_order") as data_length, t."sorting_order" 
as data_value FROM "bam"."files" t WHERE "sorting_order" IS NOT NULL AND 
length("sorting_order") > (select type_digits from sys._columns where name = 
'sorting_order' and table_id in (select id from tables where name = 'files' and 
schema_id in (select id from sys.schemas where name = 'bam')));
+% .L111,       .L113,  bam.L115,       bam.L117 # table_name
+% full_col_nm, max_allowed_length,     data_length,    data_value # name
+% char,        tinyint,        int,    varchar # type
+% 29,  1,      1,      0 # length
 
 # 18:51:05 >  
 # 18:51:05 >  "Done."
diff --git a/sql/test/sys-schema/Tests/check_MaxStrLength_violations.sql 
b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.sql
@@ -0,0 +1,170 @@
+-- Character string data max length violation checks
+
+-- query used to synthesize bam specific SQLs for checking data length 
violations:
+-- select s.name as sch_nm, t.name as tbl_nm, t.type, c.name as col_nm, 
c.type, c.type_digits
+-- , 'SELECT ''"'||s.name||'"."'||t.name||'"."'||c.name||'"'' as full_col_nm, 
'||c.type_digits||' as max_allowed_length, length("'||c.name||'") as 
data_length, t."'||c.name||'" as data_value FROM "'||s.name||'"."'||t.name||'" 
t WHERE "'||c.name||'" IS NOT NULL AND length("'||c.name||'") > (select 
type_digits from sys._columns where name = '''||c.name||''' and table_id in 
(select id from tables where name = '''||t.name||''' and schema_id in (select 
id from sys.schemas where name = '''||s.name||''')));' as validation_qry
+--  from sys._columns c join sys._tables t on (c.table_id = t.id) join 
sys.schemas s on (t.schema_id = s.id)
+-- where c.type_digits >= 1
+--   and c.type in ('varchar', 'char', 'clob', 'json', 'url')
+-- --and t.type <> 1  -- exclude views
+--   and s.name not in ('bam')
+-- order by sch_nm, tbl_nm, col_nm, c.type, c.type_digits;
+
+SELECT '"sys"."_columns"."default"' as full_col_nm, 2048 as 
max_allowed_length, length("default") as data_length, t."default" as data_value 
FROM "sys"."_columns" t WHERE "default" IS NOT NULL AND length("default") > 
(select type_digits from sys._columns where name = 'default' and table_id in 
(select id from tables where name = '_columns' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."_columns"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."_columns" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = '_columns' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."_columns"."storage"' as full_col_nm, 2048 as 
max_allowed_length, length("storage") as data_length, t."storage" as data_value 
FROM "sys"."_columns" t WHERE "storage" IS NOT NULL AND length("storage") > 
(select type_digits from sys._columns where name = 'storage' and table_id in 
(select id from tables where name = '_columns' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."_columns"."type"' as full_col_nm, 1024 as max_allowed_length, 
length("type") as data_length, t."type" as data_value FROM "sys"."_columns" t 
WHERE "type" IS NOT NULL AND length("type") > (select type_digits from 
sys._columns where name = 'type' and table_id in (select id from tables where 
name = '_columns' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."_tables"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."_tables" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = '_tables' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."_tables"."query"' as full_col_nm, 1048576 as 
max_allowed_length, length("query") as data_length, t."query" as data_value 
FROM "sys"."_tables" t WHERE "query" IS NOT NULL AND length("query") > (select 
type_digits from sys._columns where name = 'query' and table_id in (select id 
from tables where name = '_tables' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."args"."name"' as full_col_nm, 256 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."args" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'args' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."args"."type"' as full_col_nm, 1024 as max_allowed_length, 
length("type") as data_length, t."type" as data_value FROM "sys"."args" t WHERE 
"type" IS NOT NULL AND length("type") > (select type_digits from sys._columns 
where name = 'type' and table_id in (select id from tables where name = 'args' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."auths"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."auths" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'auths' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."columns"."default"' as full_col_nm, 2048 as max_allowed_length, 
length("default") as data_length, t."default" as data_value FROM 
"sys"."columns" t WHERE "default" IS NOT NULL AND length("default") > (select 
type_digits from sys._columns where name = 'default' and table_id in (select id 
from tables where name = 'columns' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."columns"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."columns" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'columns' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."columns"."storage"' as full_col_nm, 2048 as max_allowed_length, 
length("storage") as data_length, t."storage" as data_value FROM 
"sys"."columns" t WHERE "storage" IS NOT NULL AND length("storage") > (select 
type_digits from sys._columns where name = 'storage' and table_id in (select id 
from tables where name = 'columns' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."columns"."type"' as full_col_nm, 1024 as max_allowed_length, 
length("type") as data_length, t."type" as data_value FROM "sys"."columns" t 
WHERE "type" IS NOT NULL AND length("type") > (select type_digits from 
sys._columns where name = 'type' and table_id in (select id from tables where 
name = 'columns' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."comments"."remark"' as full_col_nm, 65000 as 
max_allowed_length, length("remark") as data_length, t."remark" as data_value 
FROM "sys"."comments" t WHERE "remark" IS NOT NULL AND length("remark") > 
(select type_digits from sys._columns where name = 'remark' and table_id in 
(select id from tables where name = 'comments' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."db_user_info"."fullname"' as full_col_nm, 2048 as 
max_allowed_length, length("fullname") as data_length, t."fullname" as 
data_value FROM "sys"."db_user_info" t WHERE "fullname" IS NOT NULL AND 
length("fullname") > (select type_digits from sys._columns where name = 
'fullname' and table_id in (select id from tables where name = 'db_user_info' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."db_user_info"."name"' as full_col_nm, 1024 as 
max_allowed_length, length("name") as data_length, t."name" as data_value FROM 
"sys"."db_user_info" t WHERE "name" IS NOT NULL AND length("name") > (select 
type_digits from sys._columns where name = 'name' and table_id in (select id 
from tables where name = 'db_user_info' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependencies_vw"."dependency_type_name"' as full_col_nm, 15 as 
max_allowed_length, length("dependency_type_name") as data_length, 
t."dependency_type_name" as data_value FROM "sys"."dependencies_vw" t WHERE 
"dependency_type_name" IS NOT NULL AND length("dependency_type_name") > (select 
type_digits from sys._columns where name = 'dependency_type_name' and table_id 
in (select id from tables where name = 'dependencies_vw' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependencies_vw"."name"' as full_col_nm, 1024 as 
max_allowed_length, length("name") as data_length, t."name" as data_value FROM 
"sys"."dependencies_vw" t WHERE "name" IS NOT NULL AND length("name") > (select 
type_digits from sys._columns where name = 'name' and table_id in (select id 
from tables where name = 'dependencies_vw' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependencies_vw"."obj_type"' as full_col_nm, 13 as 
max_allowed_length, length("obj_type") as data_length, t."obj_type" as 
data_value FROM "sys"."dependencies_vw" t WHERE "obj_type" IS NOT NULL AND 
length("obj_type") > (select type_digits from sys._columns where name = 
'obj_type' and table_id in (select id from tables where name = 
'dependencies_vw' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."dependencies_vw"."used_by_name"' as full_col_nm, 1024 as 
max_allowed_length, length("used_by_name") as data_length, t."used_by_name" as 
data_value FROM "sys"."dependencies_vw" t WHERE "used_by_name" IS NOT NULL AND 
length("used_by_name") > (select type_digits from sys._columns where name = 
'used_by_name' and table_id in (select id from tables where name = 
'dependencies_vw' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."dependencies_vw"."used_by_obj_type"' as full_col_nm, 13 as 
max_allowed_length, length("used_by_obj_type") as data_length, 
t."used_by_obj_type" as data_value FROM "sys"."dependencies_vw" t WHERE 
"used_by_obj_type" IS NOT NULL AND length("used_by_obj_type") > (select 
type_digits from sys._columns where name = 'used_by_obj_type' and table_id in 
(select id from tables where name = 'dependencies_vw' and schema_id in (select 
id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_args_on_types"."arg_name"' as full_col_nm, 256 as 
max_allowed_length, length("arg_name") as data_length, t."arg_name" as 
data_value FROM "sys"."dependency_args_on_types" t WHERE "arg_name" IS NOT NULL 
AND length("arg_name") > (select type_digits from sys._columns where name = 
'arg_name' and table_id in (select id from tables where name = 
'dependency_args_on_types' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_args_on_types"."function_name"' as full_col_nm, 256 
as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_args_on_types" t WHERE 
"function_name" IS NOT NULL AND length("function_name") > (select type_digits 
from sys._columns where name = 'function_name' and table_id in (select id from 
tables where name = 'dependency_args_on_types' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_args_on_types"."type_name"' as full_col_nm, 1024 as 
max_allowed_length, length("type_name") as data_length, t."type_name" as 
data_value FROM "sys"."dependency_args_on_types" t WHERE "type_name" IS NOT 
NULL AND length("type_name") > (select type_digits from sys._columns where name 
= 'type_name' and table_id in (select id from tables where name = 
'dependency_args_on_types' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_columns_on_functions"."function_name"' as 
full_col_nm, 256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_columns_on_functions" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_columns_on_functions' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_functions"."name"' as full_col_nm, 1024 
as max_allowed_length, length("name") as data_length, t."name" as data_value 
FROM "sys"."dependency_columns_on_functions" t WHERE "name" IS NOT NULL AND 
length("name") > (select type_digits from sys._columns where name = 'name' and 
table_id in (select id from tables where name = 
'dependency_columns_on_functions' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_indexes"."column_name"' as full_col_nm, 
1024 as max_allowed_length, length("column_name") as data_length, 
t."column_name" as data_value FROM "sys"."dependency_columns_on_indexes" t 
WHERE "column_name" IS NOT NULL AND length("column_name") > (select type_digits 
from sys._columns where name = 'column_name' and table_id in (select id from 
tables where name = 'dependency_columns_on_indexes' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_indexes"."index_name"' as full_col_nm, 
1024 as max_allowed_length, length("index_name") as data_length, t."index_name" 
as data_value FROM "sys"."dependency_columns_on_indexes" t WHERE "index_name" 
IS NOT NULL AND length("index_name") > (select type_digits from sys._columns 
where name = 'index_name' and table_id in (select id from tables where name = 
'dependency_columns_on_indexes' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_indexes"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_columns_on_indexes" t WHERE "table_name" 
IS NOT NULL AND length("table_name") > (select type_digits from sys._columns 
where name = 'table_name' and table_id in (select id from tables where name = 
'dependency_columns_on_indexes' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_keys"."column_name"' as full_col_nm, 1024 
as max_allowed_length, length("column_name") as data_length, t."column_name" as 
data_value FROM "sys"."dependency_columns_on_keys" t WHERE "column_name" IS NOT 
NULL AND length("column_name") > (select type_digits from sys._columns where 
name = 'column_name' and table_id in (select id from tables where name = 
'dependency_columns_on_keys' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_columns_on_keys"."key_name"' as full_col_nm, 1024 as 
max_allowed_length, length("key_name") as data_length, t."key_name" as 
data_value FROM "sys"."dependency_columns_on_keys" t WHERE "key_name" IS NOT 
NULL AND length("key_name") > (select type_digits from sys._columns where name 
= 'key_name' and table_id in (select id from tables where name = 
'dependency_columns_on_keys' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_columns_on_keys"."table_name"' as full_col_nm, 1024 
as max_allowed_length, length("table_name") as data_length, t."table_name" as 
data_value FROM "sys"."dependency_columns_on_keys" t WHERE "table_name" IS NOT 
NULL AND length("table_name") > (select type_digits from sys._columns where 
name = 'table_name' and table_id in (select id from tables where name = 
'dependency_columns_on_keys' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_columns_on_procedures"."column_name"' as 
full_col_nm, 1024 as max_allowed_length, length("column_name") as data_length, 
t."column_name" as data_value FROM "sys"."dependency_columns_on_procedures" t 
WHERE "column_name" IS NOT NULL AND length("column_name") > (select type_digits 
from sys._columns where name = 'column_name' and table_id in (select id from 
tables where name = 'dependency_columns_on_procedures' and schema_id in (select 
id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_procedures"."procedure_name"' as 
full_col_nm, 256 as max_allowed_length, length("procedure_name") as 
data_length, t."procedure_name" as data_value FROM 
"sys"."dependency_columns_on_procedures" t WHERE "procedure_name" IS NOT NULL 
AND length("procedure_name") > (select type_digits from sys._columns where name 
= 'procedure_name' and table_id in (select id from tables where name = 
'dependency_columns_on_procedures' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_triggers"."column_name"' as full_col_nm, 
1024 as max_allowed_length, length("column_name") as data_length, 
t."column_name" as data_value FROM "sys"."dependency_columns_on_triggers" t 
WHERE "column_name" IS NOT NULL AND length("column_name") > (select type_digits 
from sys._columns where name = 'column_name' and table_id in (select id from 
tables where name = 'dependency_columns_on_triggers' and schema_id in (select 
id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_triggers"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_columns_on_triggers" t WHERE "table_name" 
IS NOT NULL AND length("table_name") > (select type_digits from sys._columns 
where name = 'table_name' and table_id in (select id from tables where name = 
'dependency_columns_on_triggers' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_triggers"."trigger_name"' as full_col_nm, 
1024 as max_allowed_length, length("trigger_name") as data_length, 
t."trigger_name" as data_value FROM "sys"."dependency_columns_on_triggers" t 
WHERE "trigger_name" IS NOT NULL AND length("trigger_name") > (select 
type_digits from sys._columns where name = 'trigger_name' and table_id in 
(select id from tables where name = 'dependency_columns_on_triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_types"."column_name"' as full_col_nm, 
1024 as max_allowed_length, length("column_name") as data_length, 
t."column_name" as data_value FROM "sys"."dependency_columns_on_types" t WHERE 
"column_name" IS NOT NULL AND length("column_name") > (select type_digits from 
sys._columns where name = 'column_name' and table_id in (select id from tables 
where name = 'dependency_columns_on_types' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_types"."table_name"' as full_col_nm, 1024 
as max_allowed_length, length("table_name") as data_length, t."table_name" as 
data_value FROM "sys"."dependency_columns_on_types" t WHERE "table_name" IS NOT 
NULL AND length("table_name") > (select type_digits from sys._columns where 
name = 'table_name' and table_id in (select id from tables where name = 
'dependency_columns_on_types' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_types"."type_name"' as full_col_nm, 1024 
as max_allowed_length, length("type_name") as data_length, t."type_name" as 
data_value FROM "sys"."dependency_columns_on_types" t WHERE "type_name" IS NOT 
NULL AND length("type_name") > (select type_digits from sys._columns where name 
= 'type_name' and table_id in (select id from tables where name = 
'dependency_columns_on_types' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_views"."column_name"' as full_col_nm, 
1024 as max_allowed_length, length("column_name") as data_length, 
t."column_name" as data_value FROM "sys"."dependency_columns_on_views" t WHERE 
"column_name" IS NOT NULL AND length("column_name") > (select type_digits from 
sys._columns where name = 'column_name' and table_id in (select id from tables 
where name = 'dependency_columns_on_views' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_views"."table_name"' as full_col_nm, 1024 
as max_allowed_length, length("table_name") as data_length, t."table_name" as 
data_value FROM "sys"."dependency_columns_on_views" t WHERE "table_name" IS NOT 
NULL AND length("table_name") > (select type_digits from sys._columns where 
name = 'table_name' and table_id in (select id from tables where name = 
'dependency_columns_on_views' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_columns_on_views"."view_name"' as full_col_nm, 1024 
as max_allowed_length, length("view_name") as data_length, t."view_name" as 
data_value FROM "sys"."dependency_columns_on_views" t WHERE "view_name" IS NOT 
NULL AND length("view_name") > (select type_digits from sys._columns where name 
= 'view_name' and table_id in (select id from tables where name = 
'dependency_columns_on_views' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_functions"."function_name"' as 
full_col_nm, 256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_functions_on_functions" 
t WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_functions' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_functions"."used_in_function_name"' as 
full_col_nm, 256 as max_allowed_length, length("used_in_function_name") as 
data_length, t."used_in_function_name" as data_value FROM 
"sys"."dependency_functions_on_functions" t WHERE "used_in_function_name" IS 
NOT NULL AND length("used_in_function_name") > (select type_digits from 
sys._columns where name = 'used_in_function_name' and table_id in (select id 
from tables where name = 'dependency_functions_on_functions' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_procedures"."function_name"' as 
full_col_nm, 256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_functions_on_procedures" 
t WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_procedures' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_procedures"."procedure_name"' as 
full_col_nm, 256 as max_allowed_length, length("procedure_name") as 
data_length, t."procedure_name" as data_value FROM 
"sys"."dependency_functions_on_procedures" t WHERE "procedure_name" IS NOT NULL 
AND length("procedure_name") > (select type_digits from sys._columns where name 
= 'procedure_name' and table_id in (select id from tables where name = 
'dependency_functions_on_procedures' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_triggers"."function_name"' as 
full_col_nm, 256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_functions_on_triggers" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_triggers"."trigger_name"' as 
full_col_nm, 1024 as max_allowed_length, length("trigger_name") as data_length, 
t."trigger_name" as data_value FROM "sys"."dependency_functions_on_triggers" t 
WHERE "trigger_name" IS NOT NULL AND length("trigger_name") > (select 
type_digits from sys._columns where name = 'trigger_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_types"."function_name"' as full_col_nm, 
256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_functions_on_types" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_types' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_types"."type_name"' as full_col_nm, 
1024 as max_allowed_length, length("type_name") as data_length, t."type_name" 
as data_value FROM "sys"."dependency_functions_on_types" t WHERE "type_name" IS 
NOT NULL AND length("type_name") > (select type_digits from sys._columns where 
name = 'type_name' and table_id in (select id from tables where name = 
'dependency_functions_on_types' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_views"."function_name"' as full_col_nm, 
256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_functions_on_views" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_functions_on_views' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_functions_on_views"."view_name"' as full_col_nm, 
1024 as max_allowed_length, length("view_name") as data_length, t."view_name" 
as data_value FROM "sys"."dependency_functions_on_views" t WHERE "view_name" IS 
NOT NULL AND length("view_name") > (select type_digits from sys._columns where 
name = 'view_name' and table_id in (select id from tables where name = 
'dependency_functions_on_views' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_keys_on_foreignkeys"."fk_name"' as full_col_nm, 1024 
as max_allowed_length, length("fk_name") as data_length, t."fk_name" as 
data_value FROM "sys"."dependency_keys_on_foreignkeys" t WHERE "fk_name" IS NOT 
NULL AND length("fk_name") > (select type_digits from sys._columns where name = 
'fk_name' and table_id in (select id from tables where name = 
'dependency_keys_on_foreignkeys' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_keys_on_foreignkeys"."key_name"' as full_col_nm, 
1024 as max_allowed_length, length("key_name") as data_length, t."key_name" as 
data_value FROM "sys"."dependency_keys_on_foreignkeys" t WHERE "key_name" IS 
NOT NULL AND length("key_name") > (select type_digits from sys._columns where 
name = 'key_name' and table_id in (select id from tables where name = 
'dependency_keys_on_foreignkeys' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_owners_on_schemas"."owner_name"' as full_col_nm, 
1024 as max_allowed_length, length("owner_name") as data_length, t."owner_name" 
as data_value FROM "sys"."dependency_owners_on_schemas" t WHERE "owner_name" IS 
NOT NULL AND length("owner_name") > (select type_digits from sys._columns where 
name = 'owner_name' and table_id in (select id from tables where name = 
'dependency_owners_on_schemas' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_owners_on_schemas"."schema_name"' as full_col_nm, 
1024 as max_allowed_length, length("schema_name") as data_length, 
t."schema_name" as data_value FROM "sys"."dependency_owners_on_schemas" t WHERE 
"schema_name" IS NOT NULL AND length("schema_name") > (select type_digits from 
sys._columns where name = 'schema_name' and table_id in (select id from tables 
where name = 'dependency_owners_on_schemas' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_schemas_on_users"."schema_name"' as full_col_nm, 
1024 as max_allowed_length, length("schema_name") as data_length, 
t."schema_name" as data_value FROM "sys"."dependency_schemas_on_users" t WHERE 
"schema_name" IS NOT NULL AND length("schema_name") > (select type_digits from 
sys._columns where name = 'schema_name' and table_id in (select id from tables 
where name = 'dependency_schemas_on_users' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_schemas_on_users"."user_name"' as full_col_nm, 2048 
as max_allowed_length, length("user_name") as data_length, t."user_name" as 
data_value FROM "sys"."dependency_schemas_on_users" t WHERE "user_name" IS NOT 
NULL AND length("user_name") > (select type_digits from sys._columns where name 
= 'user_name' and table_id in (select id from tables where name = 
'dependency_schemas_on_users' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_foreignkeys"."fk_name"' as full_col_nm, 
1024 as max_allowed_length, length("fk_name") as data_length, t."fk_name" as 
data_value FROM "sys"."dependency_tables_on_foreignkeys" t WHERE "fk_name" IS 
NOT NULL AND length("fk_name") > (select type_digits from sys._columns where 
name = 'fk_name' and table_id in (select id from tables where name = 
'dependency_tables_on_foreignkeys' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_foreignkeys"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_tables_on_foreignkeys" t WHERE 
"table_name" IS NOT NULL AND length("table_name") > (select type_digits from 
sys._columns where name = 'table_name' and table_id in (select id from tables 
where name = 'dependency_tables_on_foreignkeys' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_functions"."function_name"' as 
full_col_nm, 256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_tables_on_functions" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_tables_on_functions' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_functions"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_tables_on_functions" t WHERE "table_name" 
IS NOT NULL AND length("table_name") > (select type_digits from sys._columns 
where name = 'table_name' and table_id in (select id from tables where name = 
'dependency_tables_on_functions' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_indexes"."index_name"' as full_col_nm, 
1024 as max_allowed_length, length("index_name") as data_length, t."index_name" 
as data_value FROM "sys"."dependency_tables_on_indexes" t WHERE "index_name" IS 
NOT NULL AND length("index_name") > (select type_digits from sys._columns where 
name = 'index_name' and table_id in (select id from tables where name = 
'dependency_tables_on_indexes' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_indexes"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_tables_on_indexes" t WHERE "table_name" IS 
NOT NULL AND length("table_name") > (select type_digits from sys._columns where 
name = 'table_name' and table_id in (select id from tables where name = 
'dependency_tables_on_indexes' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_procedures"."procedure_name"' as 
full_col_nm, 256 as max_allowed_length, length("procedure_name") as 
data_length, t."procedure_name" as data_value FROM 
"sys"."dependency_tables_on_procedures" t WHERE "procedure_name" IS NOT NULL 
AND length("procedure_name") > (select type_digits from sys._columns where name 
= 'procedure_name' and table_id in (select id from tables where name = 
'dependency_tables_on_procedures' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_procedures"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_tables_on_procedures" t WHERE "table_name" 
IS NOT NULL AND length("table_name") > (select type_digits from sys._columns 
where name = 'table_name' and table_id in (select id from tables where name = 
'dependency_tables_on_procedures' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_triggers"."table_name"' as full_col_nm, 
1024 as max_allowed_length, length("table_name") as data_length, t."table_name" 
as data_value FROM "sys"."dependency_tables_on_triggers" t WHERE "table_name" 
IS NOT NULL AND length("table_name") > (select type_digits from sys._columns 
where name = 'table_name' and table_id in (select id from tables where name = 
'dependency_tables_on_triggers' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_triggers"."trigger_name"' as full_col_nm, 
1024 as max_allowed_length, length("trigger_name") as data_length, 
t."trigger_name" as data_value FROM "sys"."dependency_tables_on_triggers" t 
WHERE "trigger_name" IS NOT NULL AND length("trigger_name") > (select 
type_digits from sys._columns where name = 'trigger_name' and table_id in 
(select id from tables where name = 'dependency_tables_on_triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_tables_on_views"."table_name"' as full_col_nm, 1024 
as max_allowed_length, length("table_name") as data_length, t."table_name" as 
data_value FROM "sys"."dependency_tables_on_views" t WHERE "table_name" IS NOT 
NULL AND length("table_name") > (select type_digits from sys._columns where 
name = 'table_name' and table_id in (select id from tables where name = 
'dependency_tables_on_views' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_tables_on_views"."view_name"' as full_col_nm, 1024 
as max_allowed_length, length("view_name") as data_length, t."view_name" as 
data_value FROM "sys"."dependency_tables_on_views" t WHERE "view_name" IS NOT 
NULL AND length("view_name") > (select type_digits from sys._columns where name 
= 'view_name' and table_id in (select id from tables where name = 
'dependency_tables_on_views' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_types"."dependency_type_name"' as full_col_nm, 15 as 
max_allowed_length, length("dependency_type_name") as data_length, 
t."dependency_type_name" as data_value FROM "sys"."dependency_types" t WHERE 
"dependency_type_name" IS NOT NULL AND length("dependency_type_name") > (select 
type_digits from sys._columns where name = 'dependency_type_name' and table_id 
in (select id from tables where name = 'dependency_types' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_views_on_functions"."function_name"' as full_col_nm, 
256 as max_allowed_length, length("function_name") as data_length, 
t."function_name" as data_value FROM "sys"."dependency_views_on_functions" t 
WHERE "function_name" IS NOT NULL AND length("function_name") > (select 
type_digits from sys._columns where name = 'function_name' and table_id in 
(select id from tables where name = 'dependency_views_on_functions' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."dependency_views_on_functions"."view_name"' as full_col_nm, 
1024 as max_allowed_length, length("view_name") as data_length, t."view_name" 
as data_value FROM "sys"."dependency_views_on_functions" t WHERE "view_name" IS 
NOT NULL AND length("view_name") > (select type_digits from sys._columns where 
name = 'view_name' and table_id in (select id from tables where name = 
'dependency_views_on_functions' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_views_on_procedures"."procedure_name"' as 
full_col_nm, 256 as max_allowed_length, length("procedure_name") as 
data_length, t."procedure_name" as data_value FROM 
"sys"."dependency_views_on_procedures" t WHERE "procedure_name" IS NOT NULL AND 
length("procedure_name") > (select type_digits from sys._columns where name = 
'procedure_name' and table_id in (select id from tables where name = 
'dependency_views_on_procedures' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_views_on_procedures"."view_name"' as full_col_nm, 
1024 as max_allowed_length, length("view_name") as data_length, t."view_name" 
as data_value FROM "sys"."dependency_views_on_procedures" t WHERE "view_name" 
IS NOT NULL AND length("view_name") > (select type_digits from sys._columns 
where name = 'view_name' and table_id in (select id from tables where name = 
'dependency_views_on_procedures' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."dependency_views_on_views"."view1_name"' as full_col_nm, 1024 
as max_allowed_length, length("view1_name") as data_length, t."view1_name" as 
data_value FROM "sys"."dependency_views_on_views" t WHERE "view1_name" IS NOT 
NULL AND length("view1_name") > (select type_digits from sys._columns where 
name = 'view1_name' and table_id in (select id from tables where name = 
'dependency_views_on_views' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."dependency_views_on_views"."view2_name"' as full_col_nm, 1024 
as max_allowed_length, length("view2_name") as data_length, t."view2_name" as 
data_value FROM "sys"."dependency_views_on_views" t WHERE "view2_name" IS NOT 
NULL AND length("view2_name") > (select type_digits from sys._columns where 
name = 'view2_name' and table_id in (select id from tables where name = 
'dependency_views_on_views' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."environment"."name"' as full_col_nm, 1024 as 
max_allowed_length, length("name") as data_length, t."name" as data_value FROM 
"sys"."environment" t WHERE "name" IS NOT NULL AND length("name") > (select 
type_digits from sys._columns where name = 'name' and table_id in (select id 
from tables where name = 'environment' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."environment"."value"' as full_col_nm, 2048 as 
max_allowed_length, length("value") as data_length, t."value" as data_value 
FROM "sys"."environment" t WHERE "value" IS NOT NULL AND length("value") > 
(select type_digits from sys._columns where name = 'value' and table_id in 
(select id from tables where name = 'environment' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."function_languages"."language_keyword"' as full_col_nm, 20 as 
max_allowed_length, length("language_keyword") as data_length, 
t."language_keyword" as data_value FROM "sys"."function_languages" t WHERE 
"language_keyword" IS NOT NULL AND length("language_keyword") > (select 
type_digits from sys._columns where name = 'language_keyword' and table_id in 
(select id from tables where name = 'function_languages' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."function_languages"."language_name"' as full_col_nm, 20 as 
max_allowed_length, length("language_name") as data_length, t."language_name" 
as data_value FROM "sys"."function_languages" t WHERE "language_name" IS NOT 
NULL AND length("language_name") > (select type_digits from sys._columns where 
name = 'language_name' and table_id in (select id from tables where name = 
'function_languages' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."function_types"."function_type_keyword"' as full_col_nm, 30 as 
max_allowed_length, length("function_type_keyword") as data_length, 
t."function_type_keyword" as data_value FROM "sys"."function_types" t WHERE 
"function_type_keyword" IS NOT NULL AND length("function_type_keyword") > 
(select type_digits from sys._columns where name = 'function_type_keyword' and 
table_id in (select id from tables where name = 'function_types' and schema_id 
in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."function_types"."function_type_name"' as full_col_nm, 30 as 
max_allowed_length, length("function_type_name") as data_length, 
t."function_type_name" as data_value FROM "sys"."function_types" t WHERE 
"function_type_name" IS NOT NULL AND length("function_type_name") > (select 
type_digits from sys._columns where name = 'function_type_name' and table_id in 
(select id from tables where name = 'function_types' and schema_id in (select 
id from sys.schemas where name = 'sys')));
+SELECT '"sys"."functions"."func"' as full_col_nm, 8196 as max_allowed_length, 
length("func") as data_length, t."func" as data_value FROM "sys"."functions" t 
WHERE "func" IS NOT NULL AND length("func") > (select type_digits from 
sys._columns where name = 'func' and table_id in (select id from tables where 
name = 'functions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."functions"."mod"' as full_col_nm, 8196 as max_allowed_length, 
length("mod") as data_length, t."mod" as data_value FROM "sys"."functions" t 
WHERE "mod" IS NOT NULL AND length("mod") > (select type_digits from 
sys._columns where name = 'mod' and table_id in (select id from tables where 
name = 'functions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."functions"."name"' as full_col_nm, 256 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."functions" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'functions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+-- moved queries on "sys"."geometry_columns" to geom_tables_checks.sql
+SELECT '"sys"."ids"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."ids" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'ids' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."ids"."obj_type"' as full_col_nm, 13 as max_allowed_length, 
length("obj_type") as data_length, t."obj_type" as data_value FROM "sys"."ids" 
t WHERE "obj_type" IS NOT NULL AND length("obj_type") > (select type_digits 
from sys._columns where name = 'obj_type' and table_id in (select id from 
tables where name = 'ids' and schema_id in (select id from sys.schemas where 
name = 'sys')));
+SELECT '"sys"."ids"."sys_table"' as full_col_nm, 13 as max_allowed_length, 
length("sys_table") as data_length, t."sys_table" as data_value FROM 
"sys"."ids" t WHERE "sys_table" IS NOT NULL AND length("sys_table") > (select 
type_digits from sys._columns where name = 'sys_table' and table_id in (select 
id from tables where name = 'ids' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."ids"."table_name"' as full_col_nm, 1024 as max_allowed_length, 
length("table_name") as data_length, t."table_name" as data_value FROM 
"sys"."ids" t WHERE "table_name" IS NOT NULL AND length("table_name") > (select 
type_digits from sys._columns where name = 'table_name' and table_id in (select 
id from tables where name = 'ids' and schema_id in (select id from sys.schemas 
where name = 'sys')));
+SELECT '"sys"."idxs"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."idxs" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'idxs' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."index_types"."index_type_name"' as full_col_nm, 25 as 
max_allowed_length, length("index_type_name") as data_length, 
t."index_type_name" as data_value FROM "sys"."index_types" t WHERE 
"index_type_name" IS NOT NULL AND length("index_type_name") > (select 
type_digits from sys._columns where name = 'index_type_name' and table_id in 
(select id from tables where name = 'index_types' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."key_types"."key_type_name"' as full_col_nm, 15 as 
max_allowed_length, length("key_type_name") as data_length, t."key_type_name" 
as data_value FROM "sys"."key_types" t WHERE "key_type_name" IS NOT NULL AND 
length("key_type_name") > (select type_digits from sys._columns where name = 
'key_type_name' and table_id in (select id from tables where name = 'key_types' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."keys"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."keys" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'keys' 
and schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."keywords"."keyword"' as full_col_nm, 40 as max_allowed_length, 
length("keyword") as data_length, t."keyword" as data_value FROM 
"sys"."keywords" t WHERE "keyword" IS NOT NULL AND length("keyword") > (select 
type_digits from sys._columns where name = 'keyword' and table_id in (select id 
from tables where name = 'keywords' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+-- moved queries on "sys"."netcdf_attrs" to netcdf_tables_checks.sql
+SELECT '"sys"."objects"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."objects" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'objects' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."privilege_codes"."privilege_code_name"' as full_col_nm, 40 as 
max_allowed_length, length("privilege_code_name") as data_length, 
t."privilege_code_name" as data_value FROM "sys"."privilege_codes" t WHERE 
"privilege_code_name" IS NOT NULL AND length("privilege_code_name") > (select 
type_digits from sys._columns where name = 'privilege_code_name' and table_id 
in (select id from tables where name = 'privilege_codes' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."range_partitions"."maximum"' as full_col_nm, 2048 as 
max_allowed_length, length("maximum") as data_length, t."maximum" as data_value 
FROM "sys"."range_partitions" t WHERE "maximum" IS NOT NULL AND 
length("maximum") > (select type_digits from sys._columns where name = 
'maximum' and table_id in (select id from tables where name = 
'range_partitions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."range_partitions"."minimum"' as full_col_nm, 2048 as 
max_allowed_length, length("minimum") as data_length, t."minimum" as data_value 
FROM "sys"."range_partitions" t WHERE "minimum" IS NOT NULL AND 
length("minimum") > (select type_digits from sys._columns where name = 
'minimum' and table_id in (select id from tables where name = 
'range_partitions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."roles"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."roles" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'roles' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."schemas"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."schemas" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'schemas' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."schemastorage"."schema"' as full_col_nm, 1024 as 
max_allowed_length, length("schema") as data_length, t."schema" as data_value 
FROM "sys"."schemastorage" t WHERE "schema" IS NOT NULL AND length("schema") > 
(select type_digits from sys._columns where name = 'schema' and table_id in 
(select id from tables where name = 'schemastorage' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."sequences"."name"' as full_col_nm, 256 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."sequences" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'sequences' and schema_id in (select id from sys.schemas where name = 
'sys')));
+-- moved queries on "sys"."spatial_ref_sys" to geom_tables_checks.sql
+SELECT '"sys"."storage"."column"' as full_col_nm, 1024 as max_allowed_length, 
length("column") as data_length, t."column" as data_value FROM "sys"."storage" 
t WHERE "column" IS NOT NULL AND length("column") > (select type_digits from 
sys._columns where name = 'column' and table_id in (select id from tables where 
name = 'storage' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."storage"."location"' as full_col_nm, 1024 as 
max_allowed_length, length("location") as data_length, t."location" as 
data_value FROM "sys"."storage" t WHERE "location" IS NOT NULL AND 
length("location") > (select type_digits from sys._columns where name = 
'location' and table_id in (select id from tables where name = 'storage' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."storage"."mode"' as full_col_nm, 15 as max_allowed_length, 
length("mode") as data_length, t."mode" as data_value FROM "sys"."storage" t 
WHERE "mode" IS NOT NULL AND length("mode") > (select type_digits from 
sys._columns where name = 'mode' and table_id in (select id from tables where 
name = 'storage' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."storage"."schema"' as full_col_nm, 1024 as max_allowed_length, 
length("schema") as data_length, t."schema" as data_value FROM "sys"."storage" 
t WHERE "schema" IS NOT NULL AND length("schema") > (select type_digits from 
sys._columns where name = 'schema' and table_id in (select id from tables where 
name = 'storage' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."storage"."table"' as full_col_nm, 1024 as max_allowed_length, 
length("table") as data_length, t."table" as data_value FROM "sys"."storage" t 
WHERE "table" IS NOT NULL AND length("table") > (select type_digits from 
sys._columns where name = 'table' and table_id in (select id from tables where 
name = 'storage' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."storage"."type"' as full_col_nm, 1024 as max_allowed_length, 
length("type") as data_length, t."type" as data_value FROM "sys"."storage" t 
WHERE "type" IS NOT NULL AND length("type") > (select type_digits from 
sys._columns where name = 'type' and table_id in (select id from tables where 
name = 'storage' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."storagemodel"."column"' as full_col_nm, 1024 as 
max_allowed_length, length("column") as data_length, t."column" as data_value 
FROM "sys"."storagemodel" t WHERE "column" IS NOT NULL AND length("column") > 
(select type_digits from sys._columns where name = 'column' and table_id in 
(select id from tables where name = 'storagemodel' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodel"."schema"' as full_col_nm, 1024 as 
max_allowed_length, length("schema") as data_length, t."schema" as data_value 
FROM "sys"."storagemodel" t WHERE "schema" IS NOT NULL AND length("schema") > 
(select type_digits from sys._columns where name = 'schema' and table_id in 
(select id from tables where name = 'storagemodel' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodel"."table"' as full_col_nm, 1024 as 
max_allowed_length, length("table") as data_length, t."table" as data_value 
FROM "sys"."storagemodel" t WHERE "table" IS NOT NULL AND length("table") > 
(select type_digits from sys._columns where name = 'table' and table_id in 
(select id from tables where name = 'storagemodel' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodel"."type"' as full_col_nm, 1024 as 
max_allowed_length, length("type") as data_length, t."type" as data_value FROM 
"sys"."storagemodel" t WHERE "type" IS NOT NULL AND length("type") > (select 
type_digits from sys._columns where name = 'type' and table_id in (select id 
from tables where name = 'storagemodel' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodelinput"."column"' as full_col_nm, 1024 as 
max_allowed_length, length("column") as data_length, t."column" as data_value 
FROM "sys"."storagemodelinput" t WHERE "column" IS NOT NULL AND 
length("column") > (select type_digits from sys._columns where name = 'column' 
and table_id in (select id from tables where name = 'storagemodelinput' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodelinput"."schema"' as full_col_nm, 1024 as 
max_allowed_length, length("schema") as data_length, t."schema" as data_value 
FROM "sys"."storagemodelinput" t WHERE "schema" IS NOT NULL AND 
length("schema") > (select type_digits from sys._columns where name = 'schema' 
and table_id in (select id from tables where name = 'storagemodelinput' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodelinput"."table"' as full_col_nm, 1024 as 
max_allowed_length, length("table") as data_length, t."table" as data_value 
FROM "sys"."storagemodelinput" t WHERE "table" IS NOT NULL AND length("table") 
> (select type_digits from sys._columns where name = 'table' and table_id in 
(select id from tables where name = 'storagemodelinput' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."storagemodelinput"."type"' as full_col_nm, 1024 as 
max_allowed_length, length("type") as data_length, t."type" as data_value FROM 
"sys"."storagemodelinput" t WHERE "type" IS NOT NULL AND length("type") > 
(select type_digits from sys._columns where name = 'type' and table_id in 
(select id from tables where name = 'storagemodelinput' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."table_partitions"."expression"' as full_col_nm, 2048 as 
max_allowed_length, length("expression") as data_length, t."expression" as 
data_value FROM "sys"."table_partitions" t WHERE "expression" IS NOT NULL AND 
length("expression") > (select type_digits from sys._columns where name = 
'expression' and table_id in (select id from tables where name = 
'table_partitions' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."table_types"."table_type_name"' as full_col_nm, 25 as 
max_allowed_length, length("table_type_name") as data_length, 
t."table_type_name" as data_value FROM "sys"."table_types" t WHERE 
"table_type_name" IS NOT NULL AND length("table_type_name") > (select 
type_digits from sys._columns where name = 'table_type_name' and table_id in 
(select id from tables where name = 'table_types' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."tables"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."tables" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'tables' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."tables"."query"' as full_col_nm, 1048576 as max_allowed_length, 
length("query") as data_length, t."query" as data_value FROM "sys"."tables" t 
WHERE "query" IS NOT NULL AND length("query") > (select type_digits from 
sys._columns where name = 'query' and table_id in (select id from tables where 
name = 'tables' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."tablestorage"."schema"' as full_col_nm, 1024 as 
max_allowed_length, length("schema") as data_length, t."schema" as data_value 
FROM "sys"."tablestorage" t WHERE "schema" IS NOT NULL AND length("schema") > 
(select type_digits from sys._columns where name = 'schema' and table_id in 
(select id from tables where name = 'tablestorage' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."tablestorage"."table"' as full_col_nm, 1024 as 
max_allowed_length, length("table") as data_length, t."table" as data_value 
FROM "sys"."tablestorage" t WHERE "table" IS NOT NULL AND length("table") > 
(select type_digits from sys._columns where name = 'table' and table_id in 
(select id from tables where name = 'tablestorage' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."tablestoragemodel"."schema"' as full_col_nm, 1024 as 
max_allowed_length, length("schema") as data_length, t."schema" as data_value 
FROM "sys"."tablestoragemodel" t WHERE "schema" IS NOT NULL AND 
length("schema") > (select type_digits from sys._columns where name = 'schema' 
and table_id in (select id from tables where name = 'tablestoragemodel' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."tablestoragemodel"."table"' as full_col_nm, 1024 as 
max_allowed_length, length("table") as data_length, t."table" as data_value 
FROM "sys"."tablestoragemodel" t WHERE "table" IS NOT NULL AND length("table") 
> (select type_digits from sys._columns where name = 'table' and table_id in 
(select id from tables where name = 'tablestoragemodel' and schema_id in 
(select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."tracelog"."clk"' as full_col_nm, 20 as max_allowed_length, 
length("clk") as data_length, t."clk" as data_value FROM "sys"."tracelog" t 
WHERE "clk" IS NOT NULL AND length("clk") > (select type_digits from 
sys._columns where name = 'clk' and table_id in (select id from tables where 
name = 'tracelog' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."tracelog"."pc"' as full_col_nm, 50 as max_allowed_length, 
length("pc") as data_length, t."pc" as data_value FROM "sys"."tracelog" t WHERE 
"pc" IS NOT NULL AND length("pc") > (select type_digits from sys._columns where 
name = 'pc' and table_id in (select id from tables where name = 'tracelog' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."triggers"."condition"' as full_col_nm, 2048 as 
max_allowed_length, length("condition") as data_length, t."condition" as 
data_value FROM "sys"."triggers" t WHERE "condition" IS NOT NULL AND 
length("condition") > (select type_digits from sys._columns where name = 
'condition' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."triggers"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."triggers" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'triggers' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."triggers"."new_name"' as full_col_nm, 1024 as 
max_allowed_length, length("new_name") as data_length, t."new_name" as 
data_value FROM "sys"."triggers" t WHERE "new_name" IS NOT NULL AND 
length("new_name") > (select type_digits from sys._columns where name = 
'new_name' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."triggers"."old_name"' as full_col_nm, 1024 as 
max_allowed_length, length("old_name") as data_length, t."old_name" as 
data_value FROM "sys"."triggers" t WHERE "old_name" IS NOT NULL AND 
length("old_name") > (select type_digits from sys._columns where name = 
'old_name' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."triggers"."statement"' as full_col_nm, 2048 as 
max_allowed_length, length("statement") as data_length, t."statement" as 
data_value FROM "sys"."triggers" t WHERE "statement" IS NOT NULL AND 
length("statement") > (select type_digits from sys._columns where name = 
'statement' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"sys"."types"."sqlname"' as full_col_nm, 1024 as max_allowed_length, 
length("sqlname") as data_length, t."sqlname" as data_value FROM "sys"."types" 
t WHERE "sqlname" IS NOT NULL AND length("sqlname") > (select type_digits from 
sys._columns where name = 'sqlname' and table_id in (select id from tables 
where name = 'types' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."types"."systemname"' as full_col_nm, 256 as max_allowed_length, 
length("systemname") as data_length, t."systemname" as data_value FROM 
"sys"."types" t WHERE "systemname" IS NOT NULL AND length("systemname") > 
(select type_digits from sys._columns where name = 'systemname' and table_id in 
(select id from tables where name = 'types' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."users"."fullname"' as full_col_nm, 2024 as max_allowed_length, 
length("fullname") as data_length, t."fullname" as data_value FROM 
"sys"."users" t WHERE "fullname" IS NOT NULL AND length("fullname") > (select 
type_digits from sys._columns where name = 'fullname' and table_id in (select 
id from tables where name = 'users' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+SELECT '"sys"."users"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "sys"."users" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'users' and schema_id in (select id from sys.schemas where name = 
'sys')));
+SELECT '"sys"."value_partitions"."value"' as full_col_nm, 2048 as 
max_allowed_length, length("value") as data_length, t."value" as data_value 
FROM "sys"."value_partitions" t WHERE "value" IS NOT NULL AND length("value") > 
(select type_digits from sys._columns where name = 'value' and table_id in 
(select id from tables where name = 'value_partitions' and schema_id in (select 
id from sys.schemas where name = 'sys')));
+SELECT '"sys"."var_values"."value"' as full_col_nm, 1024 as 
max_allowed_length, length("value") as data_length, t."value" as data_value 
FROM "sys"."var_values" t WHERE "value" IS NOT NULL AND length("value") > 
(select type_digits from sys._columns where name = 'value' and table_id in 
(select id from tables where name = 'var_values' and schema_id in (select id 
from sys.schemas where name = 'sys')));
+SELECT '"sys"."var_values"."var_name"' as full_col_nm, 16 as 
max_allowed_length, length("var_name") as data_length, t."var_name" as 
data_value FROM "sys"."var_values" t WHERE "var_name" IS NOT NULL AND 
length("var_name") > (select type_digits from sys._columns where name = 
'var_name' and table_id in (select id from tables where name = 'var_values' and 
schema_id in (select id from sys.schemas where name = 'sys')));
+SELECT '"tmp"."_columns"."default"' as full_col_nm, 2048 as 
max_allowed_length, length("default") as data_length, t."default" as data_value 
FROM "tmp"."_columns" t WHERE "default" IS NOT NULL AND length("default") > 
(select type_digits from sys._columns where name = 'default' and table_id in 
(select id from tables where name = '_columns' and schema_id in (select id from 
sys.schemas where name = 'tmp')));
+SELECT '"tmp"."_columns"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."_columns" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = '_columns' and schema_id in (select id from sys.schemas where name = 
'tmp')));
+SELECT '"tmp"."_columns"."storage"' as full_col_nm, 2048 as 
max_allowed_length, length("storage") as data_length, t."storage" as data_value 
FROM "tmp"."_columns" t WHERE "storage" IS NOT NULL AND length("storage") > 
(select type_digits from sys._columns where name = 'storage' and table_id in 
(select id from tables where name = '_columns' and schema_id in (select id from 
sys.schemas where name = 'tmp')));
+SELECT '"tmp"."_columns"."type"' as full_col_nm, 1024 as max_allowed_length, 
length("type") as data_length, t."type" as data_value FROM "tmp"."_columns" t 
WHERE "type" IS NOT NULL AND length("type") > (select type_digits from 
sys._columns where name = 'type' and table_id in (select id from tables where 
name = '_columns' and schema_id in (select id from sys.schemas where name = 
'tmp')));
+SELECT '"tmp"."_tables"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."_tables" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = '_tables' and schema_id in (select id from sys.schemas where name = 
'tmp')));
+SELECT '"tmp"."_tables"."query"' as full_col_nm, 1048576 as 
max_allowed_length, length("query") as data_length, t."query" as data_value 
FROM "tmp"."_tables" t WHERE "query" IS NOT NULL AND length("query") > (select 
type_digits from sys._columns where name = 'query' and table_id in (select id 
from tables where name = '_tables' and schema_id in (select id from sys.schemas 
where name = 'tmp')));
+SELECT '"tmp"."idxs"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."idxs" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'idxs' 
and schema_id in (select id from sys.schemas where name = 'tmp')));
+SELECT '"tmp"."keys"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."keys" t WHERE 
"name" IS NOT NULL AND length("name") > (select type_digits from sys._columns 
where name = 'name' and table_id in (select id from tables where name = 'keys' 
and schema_id in (select id from sys.schemas where name = 'tmp')));
+SELECT '"tmp"."objects"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."objects" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'objects' and schema_id in (select id from sys.schemas where name = 
'tmp')));
+SELECT '"tmp"."triggers"."condition"' as full_col_nm, 2048 as 
max_allowed_length, length("condition") as data_length, t."condition" as 
data_value FROM "tmp"."triggers" t WHERE "condition" IS NOT NULL AND 
length("condition") > (select type_digits from sys._columns where name = 
'condition' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'tmp')));
+SELECT '"tmp"."triggers"."name"' as full_col_nm, 1024 as max_allowed_length, 
length("name") as data_length, t."name" as data_value FROM "tmp"."triggers" t 
WHERE "name" IS NOT NULL AND length("name") > (select type_digits from 
sys._columns where name = 'name' and table_id in (select id from tables where 
name = 'triggers' and schema_id in (select id from sys.schemas where name = 
'tmp')));
+SELECT '"tmp"."triggers"."new_name"' as full_col_nm, 1024 as 
max_allowed_length, length("new_name") as data_length, t."new_name" as 
data_value FROM "tmp"."triggers" t WHERE "new_name" IS NOT NULL AND 
length("new_name") > (select type_digits from sys._columns where name = 
'new_name' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'tmp')));
+SELECT '"tmp"."triggers"."old_name"' as full_col_nm, 1024 as 
max_allowed_length, length("old_name") as data_length, t."old_name" as 
data_value FROM "tmp"."triggers" t WHERE "old_name" IS NOT NULL AND 
length("old_name") > (select type_digits from sys._columns where name = 
'old_name' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'tmp')));
+SELECT '"tmp"."triggers"."statement"' as full_col_nm, 2048 as 
max_allowed_length, length("statement") as data_length, t."statement" as 
data_value FROM "tmp"."triggers" t WHERE "statement" IS NOT NULL AND 
length("statement") > (select type_digits from sys._columns where name = 
'statement' and table_id in (select id from tables where name = 'triggers' and 
schema_id in (select id from sys.schemas where name = 'tmp')));
+
diff --git a/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.err 
b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'check_MaxStrLength_violations` in directory 
'sql/test/sys-schema` itself:
+
+
+# 16:32:04 >  
+# 16:32:04 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=37627" "--set" 
"mapi_usock=/var/tmp/mtest-14862/.s.monetdb.37627" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/dinther/INSTALL/var/MonetDB/mTests_sql_test_sys-schema"
 "--set" "embedded_c=true"
+# 16:32:04 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/dinther/INSTALL/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 37627
+# cmdline opt  mapi_usock = /var/tmp/mtest-14862/.s.monetdb.37627
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/dinther/INSTALL/var/MonetDB/mTests_sql_test_sys-schema
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 16:32:04 >  
+# 16:32:04 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-14862" "--port=37627"
+# 16:32:04 >  
+
+
+# 16:32:05 >  
+# 16:32:05 >  "Done."
+# 16:32:05 >  
+
diff --git a/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out 
b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/sys-schema/Tests/check_MaxStrLength_violations.stable.out
@@ -0,0 +1,801 @@
+stdout of test 'check_MaxStrLength_violations` in directory 
'sql/test/sys-schema` itself:
+
+
+# 16:32:04 >  
+# 16:32:04 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=37627" "--set" 
"mapi_usock=/var/tmp/mtest-14862/.s.monetdb.37627" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/dinther/INSTALL/var/MonetDB/mTests_sql_test_sys-schema"
 "--set" "embedded_c=true"
+# 16:32:04 >  
+
+# MonetDB 5 server v11.32.0 (hg id: 759bcf8796d8+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_sys-schema', using 4 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers
+# Found 31.306 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://catskill.da.cwi.nl:37627/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-14862/.s.monetdb.37627
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 16:32:04 >  
+# 16:32:04 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-14862" "--port=37627"
+# 16:32:04 >  
+
+#SELECT '"sys"."_columns"."default"' as full_col_nm, 2048 as 
max_allowed_length, length("default") as data_length, t."default" as data_value 
FROM "sys"."_columns" t WHERE "default" IS NOT NULL AND length("default") > 
(select type_digits from sys._columns where name = 'default' and table_id in 
(select id from tables where name = '_columns' and schema_id in (select id from 
sys.schemas where name = 'sys')));
+% .L111,       .L113,  sys.L115,       sys.L117 # table_name
+% full_col_nm, max_allowed_length,     data_length,    data_value # name
+% char,        smallint,       int,    varchar # type
+% 26,  1,      1,      0 # length
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to