Changeset: 0fb4beaf2d4c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0fb4beaf2d4c
Modified Files:
        sql/test/emptydb/Tests/check.SQL.py
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
Branch: Nov2019
Log Message:

Use E'...' escapes for SQL strings with to-be-interpreted backslashes.


diffs (127 lines):

diff --git a/sql/test/emptydb/Tests/check.SQL.py 
b/sql/test/emptydb/Tests/check.SQL.py
--- a/sql/test/emptydb/Tests/check.SQL.py
+++ b/sql/test/emptydb/Tests/check.SQL.py
@@ -8,18 +8,18 @@ clt = process.client('sql', format='csv'
                      stdin=process.PIPE, stdout=process.PIPE, 
stderr=process.PIPE)
 
 for c in 'ntvsf':
-    clt.stdin.write("select '\\\\d%s';\n" % c)
+    clt.stdin.write("select E'\\\\d%s';\n" % c)
 
 for c in 'ntvsf':
-    clt.stdin.write("select '\\\\dS%s';\n" % c)
+    clt.stdin.write("select E'\\\\dS%s';\n" % c)
 
-clt.stdin.write("select '\\\\dn ' || name from sys.schemas order by name;\n")
+clt.stdin.write("select E'\\\\dn ' || name from sys.schemas order by name;\n")
 
-clt.stdin.write("select '\\\\dSt ' || s.name || '.' || t.name from sys._tables 
t, sys.schemas s where t.schema_id = s.id and t.query is null order by s.name, 
t.name;\n")
+clt.stdin.write("select E'\\\\dSt ' || s.name || '.' || t.name from 
sys._tables t, sys.schemas s where t.schema_id = s.id and t.query is null order 
by s.name, t.name;\n")
 
-clt.stdin.write("select '\\\\dSv ' || s.name || '.' || t.name from sys._tables 
t, sys.schemas s where t.schema_id = s.id and t.query is not null order by 
s.name, t.name;\n")
+clt.stdin.write("select E'\\\\dSv ' || s.name || '.' || t.name from 
sys._tables t, sys.schemas s where t.schema_id = s.id and t.query is not null 
order by s.name, t.name;\n")
 
-clt.stdin.write("select distinct '\\\\dSf ' || s.name || '.\"' || f.name || 
'\"' from sys.functions f, sys.schemas s where f.language between 1 and 2 and 
f.schema_id = s.id and s.name = 'sys' order by s.name, f.name;\n")
+clt.stdin.write("select distinct E'\\\\dSf ' || s.name || '.\"' || f.name || 
'\"' from sys.functions f, sys.schemas s where f.language between 1 and 2 and 
f.schema_id = s.id and s.name = 'sys' order by s.name, f.name;\n")
 
 out, err = clt.communicate()
 out = re.sub('^"(.*)"$', r'\1', out, flags=re.MULTILINE).replace('"\n', 
'\n').replace('\n"', '\n').replace('""', '"').replace(r'\\', '\\')
@@ -67,7 +67,7 @@ create function pcre_replace(origin stri
 -- schemas
 select name, authorization, owner, system from sys.schemas order by name;
 -- _tables
-select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
'--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
+select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
E'--.*\n*', '', ''), E'[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
 -- _columns
 select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", 
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = 
c.table_id order by t.name, c.number;
 -- partitioned tables (these three should be empty)
@@ -75,7 +75,7 @@ select t.name, c.name, p.expression from
 select t.name, p.expression, r.minimum, r.maximum, r.with_nulls from 
sys.range_partitions r left outer join sys._tables t on t.id = r.table_id left 
outer join sys.table_partitions p on r.partition_id = p.id;
 select t.name, p.expression, v.value from sys.value_partitions v left outer 
join sys._tables t on t.id = v.table_id left outer join sys.table_partitions p 
on v.partition_id = p.id;
 -- external functions that don't reference existing MAL function (should be 
empty)
-with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
+with funcs as (select name, pcre_replace(func, E'--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
 -- args
 '''
 # generate a monster query to get all functions with all their
@@ -88,7 +88,7 @@ MAXARGS = 16
 # columns of the args table we're interested in
 args = ['name', 'type', 'type_digits', 'type_scale', 'inout']
 
-out += r"select s.name, f.name, case f.system when true then 'SYSTEM' else '' 
end as system, 
replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
'--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg"
+out += r"select s.name, f.name, case f.system when true then 'SYSTEM' else '' 
end as system, 
replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
E'--.*\n', '', ''), E'[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg"
 for i in range(0, MAXARGS):
     for a in args[:-1]:
         out += ", a%d.%s as %s%d" % (i, a, a, i)
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
@@ -1305,7 +1305,7 @@ create function pcre_replace(origin stri
 -- schemas
 select name, authorization, owner, system from sys.schemas order by name;
 -- _tables
-select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
'--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
+select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
E'--.*\n*', '', ''), E'[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
 -- _columns
 select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", 
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = 
c.table_id order by t.name, c.number;
 -- partitioned tables (these three should be empty)
@@ -1313,9 +1313,9 @@ select t.name, c.name, p.expression from
 select t.name, p.expression, r.minimum, r.maximum, r.with_nulls from 
sys.range_partitions r left outer join sys._tables t on t.id = r.table_id left 
outer join sys.table_partitions p on r.partition_id = p.id;
 select t.name, p.expression, v.value from sys.value_partitions v left outer 
join sys._tables t on t.id = v.table_id left outer join sys.table_partitions p 
on v.partition_id = p.id;
 -- external functions that don't reference existing MAL function (should be 
empty)
-with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
+with funcs as (select name, pcre_replace(func, E'--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
 -- args
-select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
'--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end as
  inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as name
 10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 'i
 n' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join sys
 .args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12, 
 type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
+select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
E'--.*\n', '', ''), E'[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end 
 as inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as na
 me10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 
 'in' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join s
 ys.args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12
 , type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
 -- auths
 select name, grantor from sys.auths;
 -- comments
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
@@ -1305,7 +1305,7 @@ create function pcre_replace(origin stri
 -- schemas
 select name, authorization, owner, system from sys.schemas order by name;
 -- _tables
-select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
'--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
+select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
E'--.*\n*', '', ''), E'[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
 -- _columns
 select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", 
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = 
c.table_id order by t.name, c.number;
 -- partitioned tables (these three should be empty)
@@ -1313,9 +1313,9 @@ select t.name, c.name, p.expression from
 select t.name, p.expression, r.minimum, r.maximum, r.with_nulls from 
sys.range_partitions r left outer join sys._tables t on t.id = r.table_id left 
outer join sys.table_partitions p on r.partition_id = p.id;
 select t.name, p.expression, v.value from sys.value_partitions v left outer 
join sys._tables t on t.id = v.table_id left outer join sys.table_partitions p 
on v.partition_id = p.id;
 -- external functions that don't reference existing MAL function (should be 
empty)
-with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
+with funcs as (select name, pcre_replace(func, E'--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
 -- args
-select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
'--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end as
  inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as name
 10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 'i
 n' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join sys
 .args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12, 
 type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
+select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
E'--.*\n', '', ''), E'[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end 
 as inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as na
 me10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 
 'in' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join s
 ys.args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12
 , type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
 -- auths
 select name, grantor from sys.auths;
 -- comments
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
@@ -1317,7 +1317,7 @@ create function pcre_replace(origin stri
 -- schemas
 select name, authorization, owner, system from sys.schemas order by name;
 -- _tables
-select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
'--.*\n*', '', ''), '[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
+select s.name, t.name, replace(replace(pcre_replace(pcre_replace(t.query, 
E'--.*\n*', '', ''), E'[ \t\n]+', ' ', ''), '( ', '('), ' )', ')') as query, 
tt.table_type_name as type, t.system, ca.action_name as commit_action, at.value 
as access from sys._tables t left outer join sys.schemas s on t.schema_id = 
s.id left outer join sys.table_types tt on t.type = tt.table_type_id left outer 
join (values (0, 'COMMIT'), (1, 'DELETE'), (2, 'PRESERVE'), (3, 'DROP'), (4, 
'ABORT')) as ca (action_id, action_name) on t.commit_action = ca.action_id left 
outer join (values (0, 'WRITABLE'), (1, 'READONLY'), (2, 'APPENDONLY')) as at 
(id, value) on t.access = at.id order by s.name, t.name;
 -- _columns
 select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default", 
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id = 
c.table_id order by t.name, c.number;
 -- partitioned tables (these three should be empty)
@@ -1325,9 +1325,9 @@ select t.name, c.name, p.expression from
 select t.name, p.expression, r.minimum, r.maximum, r.with_nulls from 
sys.range_partitions r left outer join sys._tables t on t.id = r.table_id left 
outer join sys.table_partitions p on r.partition_id = p.id;
 select t.name, p.expression, v.value from sys.value_partitions v left outer 
join sys._tables t on t.id = v.table_id left outer join sys.table_partitions p 
on v.partition_id = p.id;
 -- external functions that don't reference existing MAL function (should be 
empty)
-with funcs as (select name, pcre_replace(func, '--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
+with funcs as (select name, pcre_replace(func, E'--.*\n*', '', '') as func, 
schema_id from sys.functions), x (sname, name, modfunc) as (select s.name, 
f.name, replace(pcre_replace(f.func, '.*external name (.*);.*', '$1', 'ims'), 
'"', '') from funcs f left outer join sys.schemas s on f.schema_id = s.id where 
f.func ilike '% external name %') select * from x where x.modfunc not in 
(select m.module || '.' || m."function" from sys.malfunctions() m);
 -- args
-select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
'--.*\n', '', ''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end as
  inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as name
 10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 'i
 n' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join sys
 .args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12, 
 type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
+select s.name, f.name, case f.system when true then 'SYSTEM' else '' end as 
system, replace(replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, 
E'--.*\n', '', ''), E'[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', 
')'), 'create system ', 'create ') as query, f.mod, fl.language_name, 
ft.function_type_name, f.side_effect, f.varres, f.vararg, a0.name as name0, 
a0.type as type0, a0.type_digits as type_digits0, a0.type_scale as type_scale0, 
case a0.inout when 0 then 'out' when 1 then 'in' end as inout0, a1.name as 
name1, a1.type as type1, a1.type_digits as type_digits1, a1.type_scale as 
type_scale1, case a1.inout when 0 then 'out' when 1 then 'in' end as inout1, 
a2.name as name2, a2.type as type2, a2.type_digits as type_digits2, 
a2.type_scale as type_scale2, case a2.inout when 0 then 'out' when 1 then 'in' 
end as inout2, a3.name as name3, a3.type as type3, a3.type_digits as 
type_digits3, a3.type_scale as type_scale3, case a3.inout when 0 then 'out' 
when 1 then 'in' end 
 as inout3, a4.name as name4, a4.type as type4, a4.type_digits as type_digits4, 
a4.type_scale as type_scale4, case a4.inout when 0 then 'out' when 1 then 'in' 
end as inout4, a5.name as name5, a5.type as type5, a5.type_digits as 
type_digits5, a5.type_scale as type_scale5, case a5.inout when 0 then 'out' 
when 1 then 'in' end as inout5, a6.name as name6, a6.type as type6, 
a6.type_digits as type_digits6, a6.type_scale as type_scale6, case a6.inout 
when 0 then 'out' when 1 then 'in' end as inout6, a7.name as name7, a7.type as 
type7, a7.type_digits as type_digits7, a7.type_scale as type_scale7, case 
a7.inout when 0 then 'out' when 1 then 'in' end as inout7, a8.name as name8, 
a8.type as type8, a8.type_digits as type_digits8, a8.type_scale as type_scale8, 
case a8.inout when 0 then 'out' when 1 then 'in' end as inout8, a9.name as 
name9, a9.type as type9, a9.type_digits as type_digits9, a9.type_scale as 
type_scale9, case a9.inout when 0 then 'out' when 1 then 'in' end as inout9, 
a10.name as na
 me10, a10.type as type10, a10.type_digits as type_digits10, a10.type_scale as 
type_scale10, case a10.inout when 0 then 'out' when 1 then 'in' end as inout10, 
a11.name as name11, a11.type as type11, a11.type_digits as type_digits11, 
a11.type_scale as type_scale11, case a11.inout when 0 then 'out' when 1 then 
'in' end as inout11, a12.name as name12, a12.type as type12, a12.type_digits as 
type_digits12, a12.type_scale as type_scale12, case a12.inout when 0 then 'out' 
when 1 then 'in' end as inout12, a13.name as name13, a13.type as type13, 
a13.type_digits as type_digits13, a13.type_scale as type_scale13, case 
a13.inout when 0 then 'out' when 1 then 'in' end as inout13, a14.name as 
name14, a14.type as type14, a14.type_digits as type_digits14, a14.type_scale as 
type_scale14, case a14.inout when 0 then 'out' when 1 then 'in' end as inout14, 
a15.name as name15, a15.type as type15, a15.type_digits as type_digits15, 
a15.type_scale as type_scale15, case a15.inout when 0 then 'out' when 1 then 
 'in' end as inout15 from sys.functions f left outer join sys.schemas s on 
f.schema_id = s.id left outer join sys.function_types as ft on f.type = 
ft.function_type_id left outer join sys.function_languages fl on f.language = 
fl.language_id left outer join sys.args a0 on a0.func_id = f.id and a0.number = 
0 left outer join sys.args a1 on a1.func_id = f.id and a1.number = 1 left outer 
join sys.args a2 on a2.func_id = f.id and a2.number = 2 left outer join 
sys.args a3 on a3.func_id = f.id and a3.number = 3 left outer join sys.args a4 
on a4.func_id = f.id and a4.number = 4 left outer join sys.args a5 on 
a5.func_id = f.id and a5.number = 5 left outer join sys.args a6 on a6.func_id = 
f.id and a6.number = 6 left outer join sys.args a7 on a7.func_id = f.id and 
a7.number = 7 left outer join sys.args a8 on a8.func_id = f.id and a8.number = 
8 left outer join sys.args a9 on a9.func_id = f.id and a9.number = 9 left outer 
join sys.args a10 on a10.func_id = f.id and a10.number = 10 left outer join s
 ys.args a11 on a11.func_id = f.id and a11.number = 11 left outer join sys.args 
a12 on a12.func_id = f.id and a12.number = 12 left outer join sys.args a13 on 
a13.func_id = f.id and a13.number = 13 left outer join sys.args a14 on 
a14.func_id = f.id and a14.number = 14 left outer join sys.args a15 on 
a15.func_id = f.id and a15.number = 15 order by s.name, f.name, query, name0, 
type0, type_digits0, type_scale0, inout0, name1, type1, type_digits1, 
type_scale1, inout1, name2, type2, type_digits2, type_scale2, inout2, name3, 
type3, type_digits3, type_scale3, inout3, name4, type4, type_digits4, 
type_scale4, inout4, name5, type5, type_digits5, type_scale5, inout5, name6, 
type6, type_digits6, type_scale6, inout6, name7, type7, type_digits7, 
type_scale7, inout7, name8, type8, type_digits8, type_scale8, inout8, name9, 
type9, type_digits9, type_scale9, inout9, name10, type10, type_digits10, 
type_scale10, inout10, name11, type11, type_digits11, type_scale11, inout11, 
name12, type12, type_digits12
 , type_scale12, inout12, name13, type13, type_digits13, type_scale13, inout13, 
name14, type14, type_digits14, type_scale14, inout14, name15, type15, 
type_digits15, type_scale15, inout15;
 -- auths
 select name, grantor from sys.auths;
 -- comments
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to