Changeset: d775d5c970f6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d775d5c970f6
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
        sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit
        sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
Branch: default
Log Message:

Approve upgrade.


diffs (truncated from 385 to 300 lines):

diff --git a/clients/Tests/MAL-signatures.stable.out 
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -56,17 +56,17 @@ stdout of test 'MAL-signatures` in direc
 # MonetDB/Python2 module loaded
 # MonetDB/R   module loaded
 
-Ready.
-
-# 14:39:22 >  
-# 14:39:22 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-23085" "--port=30158"
-# 14:39:22 >  
+# 16:19:19 >  
+# 16:19:19 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-28001" "--port=38663"
+# 16:19:19 >  
 
 #select * from sys.malfunctions() order by module, "function", address, 
signature, comment;
 % .L1, .L1,    .L1,    .L1,    .L1 # table_name
 % module,      function,       signature,      address,        comment # name
 % clob,        clob,   clob,   clob,   clob # type
-% 11,  28,     364,    44,     874 # length
+% 11,  28,     364,    38,     874 # length
+[ "aggr",      "allnotequal",  "command aggr.allnotequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",  "SQLallnotequal;",      "if all values in r are not 
equal to l return true, else if r has nil nil else false"   ]
+[ "aggr",      "anyequal",     "command aggr.anyequal(l:bat[:any_1], 
r:bat[:any_1]):bit ",     "SQLanyequal;", "if any value in r is equal to l 
return true, else if r has nil nil else false" ]
 [ "aggr",      "avg",  "command aggr.avg(b:bat[:bte], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ", "AGGRavg13_dbl;",       "Grouped tail average on 
bte"   ]
 [ "aggr",      "avg",  "command aggr.avg(b:bat[:dbl], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ", "AGGRavg13_dbl;",       "Grouped tail average on 
dbl"   ]
 [ "aggr",      "avg",  "command aggr.avg(b:bat[:flt], g:bat[:oid], 
e:bat[:any_1]):bat[:dbl] ", "AGGRavg13_dbl;",       "Grouped tail average on 
flt"   ]
@@ -6117,22 +6117,14 @@ Ready.
 [ "batcalc",   "avg",  "pattern batcalc.avg(b:bat[:sht], s:bat[:oid], 
scale:int):dbl ",        "CMDcalcavg;",  "average of non-nil values of B"       
 ]
 [ "batcalc",   "avg",  "pattern batcalc.avg(b:bat[:sht], scale:int) (X_0:dbl, 
X_1:lng) ",      "CMDcalcavg;",  "average and number of non-nil values of B"    
 ]
 [ "batcalc",   "avg",  "pattern batcalc.avg(b:bat[:sht], scale:int):dbl ",     
"CMDcalcavg;",  "average of non-nil values of B with candidates list"   ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:any_1, hi:any_1):bat[:bit] ",        "CMDbatBETWEEN;",       "B between LO 
and HI inclusive" ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:any_1, hi:any_1, s:bat[:oid]):bat[:bit] ",   "CMDbatBETWEEN;",       "B 
between LO and HI inclusive with candidates list"    ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:any_1, hi:bat[:any_1]):bat[:bit] ",  "CMDbatBETWEEN;",       "B between LO 
and HI inclusive" ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:any_1, hi:bat[:any_1], s:bat[:oid]):bat[:bit] ",     "CMDbatBETWEEN;",       
"B between LO and HI inclusive with candidates list"    ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:bat[:any_1], hi:any_1):bat[:bit] ",  "CMDbatBETWEEN;",       "B between LO 
and HI inclusive" ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:bat[:any_1], hi:any_1, s:bat[:oid]):bat[:bit] ",     "CMDbatBETWEEN;",       
"B between LO and HI inclusive with candidates list"    ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:bat[:any_1], hi:bat[:any_1]):bat[:bit] ",    "CMDbatBETWEEN;",       "B 
between LO and HI inclusive" ]
-[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
lo:bat[:any_1], hi:bat[:any_1], s:bat[:oid]):bat[:bit] ",       
"CMDbatBETWEEN;",       "B between LO and HI inclusive with candidates list"    
]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:any_1, v2:any_1):bat[:bit] ",      
"CMDbatBETWEENsymmetric;",      "B between V1 and V2 (or vice versa) inclusive" 
]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:any_1, v2:any_1, 
s:bat[:oid]):bat[:bit] ", "CMDbatBETWEENsymmetric;",      "B between V1 and V2 
(or vice versa) inclusive with candidates list"    ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:any_1, v2:bat[:any_1]):bat[:bit] ", 
       "CMDbatBETWEENsymmetric;",      "B between V1 and V2 (or vice versa) 
inclusive" ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:any_1, v2:bat[:any_1], 
s:bat[:oid]):bat[:bit] ",   "CMDbatBETWEENsymmetric;",      "B between V1 and 
V2 (or vice versa) inclusive with candidates list"    ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:bat[:any_1], v2:any_1):bat[:bit] ", 
       "CMDbatBETWEENsymmetric;",      "B between V1 and V2 (or vice versa) 
inclusive" ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:bat[:any_1], v2:any_1, 
s:bat[:oid]):bat[:bit] ",   "CMDbatBETWEENsymmetric;",      "B between V1 and 
V2 (or vice versa) inclusive with candidates list"    ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:bat[:any_1], 
v2:bat[:any_1]):bat[:bit] ",  "CMDbatBETWEENsymmetric;",      "B between V1 and 
V2 (or vice versa) inclusive" ]
-[ "batcalc",   "between_symmetric",    "pattern 
batcalc.between_symmetric(b:bat[:any_1], v1:bat[:any_1], v2:bat[:any_1], 
s:bat[:oid]):bat[:bit] ",     "CMDbatBETWEENsymmetric;",      "B between V1 and 
V2 (or vice versa) inclusive with candidates list"    ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:any_1, v2:any_1, s:bat[:oid], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",      "CMDbatBETWEEN;",       "B between V1 and V2 
(or vice versa) with candidate list"       ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:any_1, v2:any_1, sym:bit, linc:bit, hinc:bit, nils_false:bit):bat[:bit] ",   
"CMDbatBETWEEN;",       "B between V1 and V2 (or vice versa)"   ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:any_1, v2:bat[:any_1], s:bat[:oid], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",        "CMDbatBETWEEN;",       "B between V1 and 
V2 (or vice versa) with candidate list"       ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:any_1, v2:bat[:any_1], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",     "CMDbatBETWEEN;",       "B between V1 and V2 
(or vice versa)"   ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:bat[:any_1], v2:any_1, s:bat[:oid], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",        "CMDbatBETWEEN;",       "B between V1 and 
V2 (or vice versa) with candidate list"       ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:bat[:any_1], v2:any_1, sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",     "CMDbatBETWEEN;",       "B between V1 and V2 
(or vice versa)"   ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:bat[:any_1], v2:bat[:any_1], s:bat[:oid], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",  "CMDbatBETWEEN;",       "B between V1 and V2 (or 
vice versa) with candidate list"       ]
+[ "batcalc",   "between",      "pattern batcalc.between(b:bat[:any_1], 
v1:bat[:any_1], v2:bat[:any_1], sym:bit, linc:bit, hinc:bit, 
nils_false:bit):bat[:bit] ",       "CMDbatBETWEEN;",       "B between V1 and V2 
(or vice versa)"   ]
 [ "batcalc",   "bit",  "pattern batcalc.bit(b:bat[:bit]):bat[:bit] ",  
"CMDconvertsignal_bit;",        "cast from bit to bit, signal error on 
overflow"        ]
 [ "batcalc",   "bit",  "pattern batcalc.bit(b:bat[:bit], 
s:bat[:oid]):bat[:bit] ",     "CMDconvertsignal_bit;",        "cast from bit to 
bit with candidates list, signal error on overflow"   ]
 [ "batcalc",   "bit",  "pattern batcalc.bit(b:bat[:bte]):bat[:bit] ",  
"CMDconvertsignal_bit;",        "cast from bte to bit, signal error on 
overflow"        ]
diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -5900,7 +5900,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git 
a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128
--- 
a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128
+++ 
b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.powerpc64.int128
@@ -5900,7 +5900,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
@@ -5110,7 +5110,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit
@@ -5110,7 +5110,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
@@ -5939,7 +5939,9 @@ commit;
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git 
a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128 
b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
--- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
+++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.int128
@@ -5939,7 +5939,9 @@ commit;
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
@@ -5900,7 +5900,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out
@@ -5110,7 +5110,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit
@@ -5110,7 +5110,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
--- a/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
+++ b/sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
@@ -5939,7 +5939,9 @@ commit;
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
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
@@ -977,7 +977,9 @@ create function sys.date_trunc(txt strin
 CREATE FUNCTION db_users () RETURNS TABLE(name varchar(2048)) EXTERNAL NAME 
sql.db_users;
 create function sys.debug(debug int) returns integer external name 
mdb."setDebug";
 create function degrees(r double) returns double return r*180/pi();
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 create procedure sys.droporderindex(sys string, tab string, col string) 
external name sql.droporderindex;
 CREATE FUNCTION env () RETURNS TABLE(name varchar(1024), value varchar(2048)) 
EXTERNAL NAME sql.sql_environment;
 create function sys."epoch"(sec bigint) returns timestamp external name 
timestamp."epoch";
@@ -2331,7 +2333,9 @@ drop function pcre_replace(string, strin
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamp",    7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamptz",  7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "degrees",      "SYSTEM",       "create function degrees(r 
double) returns double return r*180/pi();",  "user", "SQL",  "Scalar function", 
     false,  false,  false,  "result",       "double",       53,     0,      
"out",  "r",    "double",       53,     0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table 
(\"values\" bigint) external name \"sql\".\"deltas\";",      "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "values",       
"bigint",       64,     0,      "out",  "schema",       "clob", 0,      0,      
"in",   "table",        "clob", 0,      0,      "in",   "column",       "clob", 
0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string) returns table (\"id\" int, \"cleared\" boolean, 
\"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" 
bigint, \"level\" int) external name \"sql\".\"deltas\";",   "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "id",   "int",  32,     
0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string) returns table (\"id\" int, \"cleared\" 
boolean, \"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, 
\"deletes\" bigint, \"level\" int) external name \"sql\".\"deltas\";", "sql",  
"MAL",  "Function returning a table",   false,  false,  false,  "id",   "int",  
32,     0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   "table",        "clob", 0,      0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table (\"id\" 
int, \"cleared\" boolean, \"immutable\" bigint, \"inserted\" bigint, 
\"updates\" bigint, \"deletes\" bigint, \"level\" int) external name 
\"sql\".\"deltas\";",      "sql",  "MAL",  "Function returning a table",   
false,  false,  false,  "id",   "int",  32,     0,      "out",  "cleared",      
"boolean",      1,      0,      "out",  "immutable",    "bigint",       64,     
0,      "out",  "inserted",     "bigint",       64,     0,      "out",  
"updates",      "bigint",       64,     0,      "out",  "deletes",      
"bigint",       64,     0,      "out",  "level",        "int",  32,     0,      
"out",  "schema",       "clob", 0,      0,      "in",   "table",        "clob", 
0,      0,      "in",   "column",       "clob", 0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "dense_rank",   "SYSTEM",       "dense_rank",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "boolean",      1,      0,      "in",   
"arg_2",        "any",  0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
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
@@ -977,7 +977,9 @@ create function sys.date_trunc(txt strin
 CREATE FUNCTION db_users () RETURNS TABLE(name varchar(2048)) EXTERNAL NAME 
sql.db_users;
 create function sys.debug(debug int) returns integer external name 
mdb."setDebug";
 create function degrees(r double) returns double return r*180/pi();
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 create procedure sys.droporderindex(sys string, tab string, col string) 
external name sql.droporderindex;
 CREATE FUNCTION env () RETURNS TABLE(name varchar(1024), value varchar(2048)) 
EXTERNAL NAME sql.sql_environment;
 create function sys."epoch"(sec bigint) returns timestamp external name 
timestamp."epoch";
@@ -2331,7 +2333,9 @@ drop function pcre_replace(string, strin
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamp",    7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamptz",  7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "degrees",      "SYSTEM",       "create function degrees(r 
double) returns double return r*180/pi();",  "user", "SQL",  "Scalar function", 
     false,  false,  false,  "result",       "double",       53,     0,      
"out",  "r",    "double",       53,     0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table 
(\"values\" bigint) external name \"sql\".\"deltas\";",      "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "values",       
"bigint",       64,     0,      "out",  "schema",       "clob", 0,      0,      
"in",   "table",        "clob", 0,      0,      "in",   "column",       "clob", 
0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string) returns table (\"id\" int, \"cleared\" boolean, 
\"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" 
bigint, \"level\" int) external name \"sql\".\"deltas\";",   "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "id",   "int",  32,     
0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string) returns table (\"id\" int, \"cleared\" 
boolean, \"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, 
\"deletes\" bigint, \"level\" int) external name \"sql\".\"deltas\";", "sql",  
"MAL",  "Function returning a table",   false,  false,  false,  "id",   "int",  
32,     0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   "table",        "clob", 0,      0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table (\"id\" 
int, \"cleared\" boolean, \"immutable\" bigint, \"inserted\" bigint, 
\"updates\" bigint, \"deletes\" bigint, \"level\" int) external name 
\"sql\".\"deltas\";",      "sql",  "MAL",  "Function returning a table",   
false,  false,  false,  "id",   "int",  32,     0,      "out",  "cleared",      
"boolean",      1,      0,      "out",  "immutable",    "bigint",       64,     
0,      "out",  "inserted",     "bigint",       64,     0,      "out",  
"updates",      "bigint",       64,     0,      "out",  "deletes",      
"bigint",       64,     0,      "out",  "level",        "int",  32,     0,      
"out",  "schema",       "clob", 0,      0,      "in",   "table",        "clob", 
0,      0,      "in",   "column",       "clob", 0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "dense_rank",   "SYSTEM",       "dense_rank",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "boolean",      1,      0,      "in",   
"arg_2",        "any",  0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
diff --git a/sql/test/emptydb/Tests/check.stable.out.int128 
b/sql/test/emptydb/Tests/check.stable.out.int128
--- a/sql/test/emptydb/Tests/check.stable.out.int128
+++ b/sql/test/emptydb/Tests/check.stable.out.int128
@@ -978,7 +978,9 @@ create function sys.date_trunc(txt strin
 CREATE FUNCTION db_users () RETURNS TABLE(name varchar(2048)) EXTERNAL NAME 
sql.db_users;
 create function sys.debug(debug int) returns integer external name 
mdb."setDebug";
 create function degrees(r double) returns double return r*180/pi();
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 create procedure sys.droporderindex(sys string, tab string, col string) 
external name sql.droporderindex;
 CREATE FUNCTION env () RETURNS TABLE(name varchar(1024), value varchar(2048)) 
EXTERNAL NAME sql.sql_environment;
 create function sys."epoch"(sec bigint) returns timestamp external name 
timestamp."epoch";
@@ -2355,7 +2357,9 @@ drop function pcre_replace(string, strin
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamp",    7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "decade",       "SYSTEM",       "decade",       "mtime",        
"Internal C",   "Scalar function",      false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "timestamptz",  7,      0,      
"in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
 [ "sys",       "degrees",      "SYSTEM",       "create function degrees(r 
double) returns double return r*180/pi();",  "user", "SQL",  "Scalar function", 
     false,  false,  false,  "result",       "double",       53,     0,      
"out",  "r",    "double",       53,     0,      "in",   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
-[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table 
(\"values\" bigint) external name \"sql\".\"deltas\";",      "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "values",       
"bigint",       64,     0,      "out",  "schema",       "clob", 0,      0,      
"in",   "table",        "clob", 0,      0,      "in",   "column",       "clob", 
0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string) returns table (\"id\" int, \"cleared\" boolean, 
\"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, \"deletes\" 
bigint, \"level\" int) external name \"sql\".\"deltas\";",   "sql",  "MAL",  
"Function returning a table",   false,  false,  false,  "id",   "int",  32,     
0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string) returns table (\"id\" int, \"cleared\" 
boolean, \"immutable\" bigint, \"inserted\" bigint, \"updates\" bigint, 
\"deletes\" bigint, \"level\" int) external name \"sql\".\"deltas\";", "sql",  
"MAL",  "Function returning a table",   false,  false,  false,  "id",   "int",  
32,     0,      "out",  "cleared",      "boolean",      1,      0,      "out",  
"immutable",    "bigint",       64,     0,      "out",  "inserted",     
"bigint",       64,     0,      "out",  "updates",      "bigint",       64,     
0,      "out",  "deletes",      "bigint",       64,     0,      "out",  
"level",        "int",  32,     0,      "out",  "schema",       "clob", 0,      
0,      "in",   "table",        "clob", 0,      0,      "in",   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL    ]
+[ "sys",       "deltas",       "SYSTEM",       "create function sys.deltas 
(\"schema\" string, \"table\" string, \"column\" string) returns table (\"id\" 
int, \"cleared\" boolean, \"immutable\" bigint, \"inserted\" bigint, 
\"updates\" bigint, \"deletes\" bigint, \"level\" int) external name 
\"sql\".\"deltas\";",      "sql",  "MAL",  "Function returning a table",   
false,  false,  false,  "id",   "int",  32,     0,      "out",  "cleared",      
"boolean",      1,      0,      "out",  "immutable",    "bigint",       64,     
0,      "out",  "inserted",     "bigint",       64,     0,      "out",  
"updates",      "bigint",       64,     0,      "out",  "deletes",      
"bigint",       64,     0,      "out",  "level",        "int",  32,     0,      
"out",  "schema",       "clob", 0,      0,      "in",   "table",        "clob", 
0,      0,      "in",   "column",       "clob", 0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "dense_rank",   "SYSTEM",       "dense_rank",   "sql",  
"Internal C",   "Analytic function",    false,  false,  false,  "res_0",        
"int",  32,     0,      "out",  "arg_1",        "any",  0,      0,      "in",   
"arg_2",        "boolean",      1,      0,      "in",   "arg_3",        
"boolean",      1,      0,      "in",   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "any",  0,      0,      "in",   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL    ]
 [ "sys",       "diff", "SYSTEM",       "diff", "sql",  "Internal C",   
"Analytic function",    false,  false,  false,  "res_0",        "boolean",      
1,      0,      "out",  "arg_1",        "boolean",      1,      0,      "in",   
"arg_2",        "any",  0,      0,      "in",   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
NULL    ]
diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -5900,7 +5900,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
 commit;
diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
@@ -5109,7 +5109,9 @@ set schema "sys";
 
 Running database upgrade commands:
 set schema "sys";
-create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("values" bigint) external name "sql"."deltas";
+create function sys.deltas ("schema" string) returns table ("id" int, 
"cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" bigint, 
"deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string) returns table 
("id" int, "cleared" boolean, "immutable" bigint, "inserted" bigint, "updates" 
bigint, "deletes" bigint, "level" int) external name "sql"."deltas";
+create function sys.deltas ("schema" string, "table" string, "column" string) 
returns table ("id" int, "cleared" boolean, "immutable" bigint, "inserted" 
bigint, "updates" bigint, "deletes" bigint, "level" int) external name 
"sql"."deltas";
 update sys.functions set system = true where schema_id = (select id from 
sys.schemas where name = 'sys') and name in ('deltas') and type = 5;
 set schema "sys";
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to