Changeset: f7c78d77602b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f7c78d77602b Modified Files: clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 sql/backends/monet5/sql_upgrades.c sql/scripts/10_math.sql sql/scripts/12_url.sql sql/scripts/14_inet.sql sql/scripts/15_querylog.sql sql/scripts/16_tracelog.sql sql/scripts/21_dependency_functions.sql sql/scripts/22_clients.sql sql/scripts/25_debug.sql sql/scripts/39_analytics.sql sql/scripts/40_json.sql sql/scripts/51_sys_schema_extension.sql sql/scripts/75_storagemodel.sql sql/scripts/80_statistics.sql sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: default Log Message:
Cleanup. Use compiler to concatenate strings, instead of the run time. Changed layout of very long strings in upgrade code. Cleaned some white space in SQL scripts. diffs (truncated from 3419 to 300 lines): diff --git a/clients/Tests/SQL-dump.stable.out b/clients/Tests/SQL-dump.stable.out --- a/clients/Tests/SQL-dump.stable.out +++ b/clients/Tests/SQL-dump.stable.out @@ -1743,7 +1743,7 @@ 5241 "auths" 2000 NULL 0 true 0 0 5245 "privileges" 2000 NULL 0 true 0 0 5467 "querylog_catalog" 2000 "-- create table views for convenience\ncreate view sys.querylog_catalog as select * from sys.querylog_catalog();" 1 true 0 0 5478 "querylog_calls" 2000 "create view sys.querylog_calls as select * from sys.querylog_calls();" 1 true 0 0 -5496 "querylog_history" 2000 "create view sys.querylog_history as\nselect qd.*, ql.""start"",ql.""stop"", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.io \nfrom sys.querylog_catalog() qd, sys.querylog_calls() ql\nwhere qd.id = ql.id and qd.owner = user;" 1 true 0 0 +5496 "querylog_history" 2000 "create view sys.querylog_history as\nselect qd.*, ql.""start"",ql.""stop"", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.io\nfrom sys.querylog_catalog() qd, sys.querylog_calls() ql\nwhere qd.id = ql.id and qd.owner = user;" 1 true 0 0 5535 "tracelog" 2000 "create view sys.tracelog as select * from sys.tracelog();" 1 true 0 0 5671 "sessions" 2000 "create view sys.sessions as select * from sys.sessions();" 1 true 0 0 5751 "optimizers" 2000 "create view sys.optimizers as select * from sys.optimizers();" 1 true 0 0 @@ -6932,32 +6932,32 @@ 5252 "like" "-- This Source Code Form is 5257 "ilike" "create filter function ""ilike""(val string, pat string, esc string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 5262 "like" "create filter function ""like""(val string, pat string) external name algebra.""like"";" "algebra" 1 4 true false false 2000 5266 "ilike" "create filter function ""ilike""(val string, pat string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 -5270 "degrees" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function degrees(r double) \nreturns double\n\treturn r*180/pi();" "user" 2 1 false false false 2000 -5274 "radians" "create function radians(d double) \nreturns double\n\treturn d*pi()/180;" "user" 2 1 false false false 2000 +5270 "degrees" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function degrees(r double)\nreturns double\n\treturn r*180/pi();" "user" 2 1 false false false 2000 +5274 "radians" "create function radians(d double)\nreturns double\n\treturn d*pi()/180;" "user" 2 1 false false false 2000 5278 "times" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- Provide a simple equivalent for the UNIX times command\n-- times 0 ms user 0 ms system 0 ms 0 reads 0 writes\n\ncreate procedure times()\nexternal name sql.times;" "sql" 1 2 true false false 2000 -5281 "getanchor" "create function getanchor( theurl url ) returns string \n\texternal name url.""getAnchor"";" "url" 1 1 false false false 2000 -5285 "getbasename" "create function getbasename(theurl url) returns string \n\texternal name url.""getBasename"";" "url" 1 1 false false false 2000 -5289 "getcontent" "create function getcontent(theurl url) returns string \n\texternal name url.""getContent"";" "url" 1 1 false false false 2000 -5293 "getcontext" "create function getcontext(theurl url) returns string \n\texternal name url.""getContext"";" "url" 1 1 false false false 2000 -5297 "getdomain" "create function getdomain(theurl url) returns string \n\texternal name url.""getDomain"";" "url" 1 1 false false false 2000 -5301 "getextension" "create function getextension(theurl url) returns string \n\texternal name url.""getExtension"";" "url" 1 1 false false false 2000 -5305 "getfile" "create function getfile(theurl url) returns string \n\texternal name url.""getFile"";" "url" 1 1 false false false 2000 -5309 "gethost" "create function gethost(theurl url) returns string \n\texternal name url.""getHost"";" "url" 1 1 false false false 2000 -5313 "getport" "create function getport(theurl url) returns string \n\texternal name url.""getPort"";" "url" 1 1 false false false 2000 -5317 "getprotocol" "create function getprotocol(theurl url) returns string \n\texternal name url.""getProtocol"";" "url" 1 1 false false false 2000 -5321 "getquery" "create function getquery(theurl url) returns string \n\texternal name url.""getQuery"";" "url" 1 1 false false false 2000 -5325 "getuser" "create function getuser(theurl url) returns string \n\texternal name url.""getUser"";" "url" 1 1 false false false 2000 -5329 "getroboturl" "create function getroboturl(theurl url) returns string \n\texternal name url.""getRobotURL"";" "url" 1 1 false false false 2000 +5281 "getanchor" "create function getanchor( theurl url ) returns string\n\texternal name url.""getAnchor"";" "url" 1 1 false false false 2000 +5285 "getbasename" "create function getbasename(theurl url) returns string\n\texternal name url.""getBasename"";" "url" 1 1 false false false 2000 +5289 "getcontent" "create function getcontent(theurl url) returns string\n\texternal name url.""getContent"";" "url" 1 1 false false false 2000 +5293 "getcontext" "create function getcontext(theurl url) returns string\n\texternal name url.""getContext"";" "url" 1 1 false false false 2000 +5297 "getdomain" "create function getdomain(theurl url) returns string\n\texternal name url.""getDomain"";" "url" 1 1 false false false 2000 +5301 "getextension" "create function getextension(theurl url) returns string\n\texternal name url.""getExtension"";" "url" 1 1 false false false 2000 +5305 "getfile" "create function getfile(theurl url) returns string\n\texternal name url.""getFile"";" "url" 1 1 false false false 2000 +5309 "gethost" "create function gethost(theurl url) returns string\n\texternal name url.""getHost"";" "url" 1 1 false false false 2000 +5313 "getport" "create function getport(theurl url) returns string\n\texternal name url.""getPort"";" "url" 1 1 false false false 2000 +5317 "getprotocol" "create function getprotocol(theurl url) returns string\n\texternal name url.""getProtocol"";" "url" 1 1 false false false 2000 +5321 "getquery" "create function getquery(theurl url) returns string\n\texternal name url.""getQuery"";" "url" 1 1 false false false 2000 +5325 "getuser" "create function getuser(theurl url) returns string\n\texternal name url.""getUser"";" "url" 1 1 false false false 2000 +5329 "getroboturl" "create function getroboturl(theurl url) returns string\n\texternal name url.""getRobotURL"";" "url" 1 1 false false false 2000 5333 "isaurl" "create function isaurl(theurl url) returns bool\n\texternal name url.""isaURL"";" "url" 1 1 false false false 2000 -5337 "newurl" "create function newurl(protocol string, hostname string, ""port"" int, file string) \n\treturns url \n\texternal name url.""new"";" "url" 1 1 false false false 2000 -5344 "newurl" "create function newurl(protocol string, hostname string, file string) \n\treturns url \n\texternal name url.""new"";" "url" 1 1 false false false 2000 +5337 "newurl" "create function newurl(protocol string, hostname string, ""port"" int, file string)\n\treturns url\n\texternal name url.""new"";" "url" 1 1 false false false 2000 +5344 "newurl" "create function newurl(protocol string, hostname string, file string)\n\treturns url\n\texternal name url.""new"";" "url" 1 1 false false false 2000 5350 "str_to_date" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function str_to_date(s string, format string) returns date\n\texternal name mtime.""str_to_date"";" "mtime" 1 1 false false false 2000 5355 "date_to_str" "create function date_to_str(d date, format string) returns string\n\texternal name mtime.""date_to_str"";" "mtime" 1 1 false false false 2000 5360 "str_to_time" "create function str_to_time(s string, format string) returns time\n\texternal name mtime.""str_to_time"";" "mtime" 1 1 false false false 2000 5365 "time_to_str" "create function time_to_str(d time, format string) returns string\n\texternal name mtime.""time_to_str"";" "mtime" 1 1 false false false 2000 5370 "str_to_timestamp" "create function str_to_timestamp(s string, format string) returns timestamp\n\texternal name mtime.""str_to_timestamp"";" "mtime" 1 1 false false false 2000 5375 "timestamp_to_str" "create function timestamp_to_str(d timestamp, format string) returns string\n\texternal name mtime.""timestamp_to_str"";" "mtime" 1 1 false false false 2000 -5381 "broadcast" "create function ""broadcast"" (p inet) returns inet \n\texternal name inet.""broadcast"";" "inet" 1 1 false false false 2000 +5381 "broadcast" "create function ""broadcast"" (p inet) returns inet\n\texternal name inet.""broadcast"";" "inet" 1 1 false false false 2000 5385 "host" "create function ""host"" (p inet) returns clob\n\texternal name inet.""host"";" "inet" 1 1 false false false 2000 5389 "masklen" "create function ""masklen"" (p inet) returns int\n\texternal name inet.""masklen"";" "inet" 1 1 false false false 2000 5393 "setmasklen" "create function ""setmasklen"" (p inet, mask int) returns inet\n\texternal name inet.""setmasklen"";" "inet" 1 1 false false false 2000 @@ -6970,13 +6970,13 @@ 5418 "left_shift" "create function ""lef 5423 "right_shift" "create function ""right_shift""(i1 inet, i2 inet) returns boolean\n\texternal name inet."">>"";" "inet" 1 1 false false false 2000 5428 "left_shift_assign" "create function ""left_shift_assign""(i1 inet, i2 inet) returns boolean\n\texternal name inet.""<<="";" "inet" 1 1 false false false 2000 5433 "right_shift_assign" "create function ""right_shift_assign""(i1 inet, i2 inet) returns boolean\n\texternal name inet."">>="";" "inet" 1 1 false false false 2000 -5438 "querylog_catalog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- QUERY HISTORY\n-- The query history mechanism of MonetDB/SQL relies on a few hooks.\n-- The most important one is a global system variable which controls\n-- monitoring of all sessions. \n\ncreate function sys.querylog_catalog()\nreturns table(\n\tid oid,\n\towner string,\n\tdefined timestamp,\n\tquery string,\n\tpipe string,\n\t""plan"" string,\t\t-- Name of MAL plan\n\tmal int,\t\t\t-- size of MAL plan\n\toptimize bigint \t-- time in usec\n)\nexternal name sql.querylog_catalog;" "sql" 1 5 false false false 2000 -5448 "querylog_calls" "-- Each query call is stored in the table calls\n-- At regular intervals the query history table should be cleaned.\n-- This can be done manually on the SQL console, or be integrated\n-- in the keepQuery and keepCall upon need.\n-- The parameters are geared at understanding the resource claims\n-- They reflect the effect of the total workload mix during execution.\n-- The 'cpu' gives the average cpu load percentage over all cores on the \n-- server during execution phase. \n-- increasing cpu load indicates better use of multi-cores.\n-- The 'io' indicate IOs during complete query run.\n-- The 'space' is the total amount of intermediates created in MB.\n-- Reducing the space component improves performance/\n-- All timing in usec and all storage in bytes.\n\ncreate function sys.querylog_calls()\nreturns table(\n\tid oid,\t\t\t\t -- references query plan\n\t""start"" timestamp,\t-- time the statement was started\n\t""stop"" timestamp,\t-- time the statement was c ompletely finished\n\targuments string,\t-- actual call structure\n\ttuples wrd,\t\t\t-- number of tuples in the result set\n\trun bigint,\t\t-- time spent (in usec) until the result export\n\tship bigint,\t\t-- time spent (in usec) to ship the result set\n\tcpu int, \t\t-- average cpu load percentage during execution\n\tio int\t\t\t-- percentage time waiting for IO to finish \n)\nexternal name sql.querylog_calls;" "sql" 1 5 false false false 2000 +5438 "querylog_catalog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- QUERY HISTORY\n-- The query history mechanism of MonetDB/SQL relies on a few hooks.\n-- The most important one is a global system variable which controls\n-- monitoring of all sessions.\n\ncreate function sys.querylog_catalog()\nreturns table(\n\tid oid,\n\towner string,\n\tdefined timestamp,\n\tquery string,\n\tpipe string,\n\t""plan"" string,\t\t-- Name of MAL plan\n\tmal int,\t\t-- size of MAL plan\n\toptimize bigint\t-- time in usec\n)\nexternal name sql.querylog_catalog;" "sql" 1 5 false false false 2000 +5448 "querylog_calls" "-- Each query call is stored in the table calls\n-- At regular intervals the query history table should be cleaned.\n-- This can be done manually on the SQL console, or be integrated\n-- in the keepQuery and keepCall upon need.\n-- The parameters are geared at understanding the resource claims\n-- They reflect the effect of the total workload mix during execution.\n-- The 'cpu' gives the average cpu load percentage over all cores on the\n-- server during execution phase.\n-- increasing cpu load indicates better use of multi-cores.\n-- The 'io' indicate IOs during complete query run.\n-- The 'space' is the total amount of intermediates created in MB.\n-- Reducing the space component improves performance/\n-- All timing in usec and all storage in bytes.\n\ncreate function sys.querylog_calls()\nreturns table(\n\tid oid,\t\t -- references query plan\n\t""start"" timestamp,\t-- time the statement was started\n\t""stop"" timestamp,\t-- time the statement was complet ely finished\n\targuments string,\t-- actual call structure\n\ttuples wrd,\t\t-- number of tuples in the result set\n\trun bigint,\t\t-- time spent (in usec) until the result export\n\tship bigint,\t\t-- time spent (in usec) to ship the result set\n\tcpu int,\t\t-- average cpu load percentage during execution\n\tio int\t\t\t-- percentage time waiting for IO to finish\n)\nexternal name sql.querylog_calls;" "sql" 1 5 false false false 2000 5498 "querylog_empty" "-- reset history for a particular user\ncreate procedure sys.querylog_empty()\nexternal name sql.querylog_empty;" "sql" 1 2 true false false 2000 5500 "querylog_enable" "-- manipulate the query logger\ncreate procedure sys.querylog_enable()\nexternal name sql.querylog_enable;" "sql" 1 2 true false false 2000 5502 "querylog_enable" "create procedure sys.querylog_enable(threshold smallint)\nexternal name sql.querylog_enable_threshold;" "sql" 1 2 true false false 2000 5505 "querylog_disable" "create procedure sys.querylog_disable()\nexternal name sql.querylog_disable;" "sql" 1 2 true false false 2000 -5507 "tracelog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- make the offline tracing table available for inspection\ncreate function sys.tracelog() \n\treturns table (\n\t\tevent integer,\t\t-- event counter\n\t\tclk varchar(20), \t-- wallclock, no mtime in kernel\n\t\tpc varchar(50), \t-- module.function[nr]\n\t\tthread int, \t\t-- thread identifier\n\t\tticks bigint, \t\t-- time in microseconds\n\t\trrsmb bigint, \t\t-- resident memory in MB\n\t\tvmmb bigint, \t\t-- virtual size in MB\n\t\treads bigint, \t\t-- number of blocks read\n\t\twrites bigint, \t\t-- number of blocks written\n\t\tminflt bigint, \t\t-- minor page faults\n\t\tmajflt bigint, \t\t-- major page faults\n\t\tnvcsw bigint, \t\t-- non-volantary conext switch\n\t\tstmt string\t\t\t-- actual statement executed\n \t)\n\texternal name sql.dump_trace;" "sql" 1 5 false false false 2000 +5507 "tracelog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- make the offline tracing table available for inspection\ncreate function sys.tracelog()\n\treturns table (\n\t\tevent integer,\t\t-- event counter\n\t\tclk varchar(20),\t-- wallclock, no mtime in kernel\n\t\tpc varchar(50),\t-- module.function[nr]\n\t\tthread int,\t\t-- thread identifier\n\t\tticks bigint,\t\t-- time in microseconds\n\t\trrsmb bigint,\t\t-- resident memory in MB\n\t\tvmmb bigint,\t\t-- virtual size in MB\n\t\treads bigint,\t\t-- number of blocks read\n\t\twrites bigint,\t\t-- number of blocks written\n\t\tminflt bigint,\t\t-- minor page faults\n\t\tmajflt bigint,\t\t-- major page faults\n\t\tnvcsw bigint,\t\t-- non-volantary conext switch\n\t\tstmt string\t\t-- actual statement executed\n\t)\n\texterna l name sql.dump_trace;" "sql" 1 5 false false false 2000 5537 "profiler_openstream" "create procedure profiler_openstream(host string, port int) external name profiler.""openStream"";" "profiler" 1 2 true false false 2000 5541 "profiler_stethoscope" "create procedure profiler_stethoscope(ticks int) external name profiler.stethoscope;" "profiler" 1 2 true false false 2000 5544 "epoch" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- assume milliseconds when converted to TIMESTAMP\ncreate function ""epoch""(sec bigint) returns timestamp\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 @@ -6994,7 +6994,7 @@ 5593 "dependencies_tables_on_foreignkeys 5598 "dependencies_tables_on_functions" "--Table t has a dependency on function f\ncreate function dependencies_tables_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select t.name, f.name, 'DEP_FUNC' from functions as f, tables as t, dependencies as dep where t.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7 and t.type = 0);" "user" 2 5 false false false 2000 5603 "dependencies_columns_on_views" "--Column c has a dependency on view v\ncreate function dependencies_columns_on_views()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, v.name, 'DEP_VIEW' from columns as c, tables as v, dependencies as dep where c.id = dep.id and v.id = dep.depend_id and dep.depend_type = 5 and v.type = 1);" "user" 2 5 false false false 2000 5608 "dependencies_columns_on_keys" "--Column c has a dependency on key k\ncreate function dependencies_columns_on_keys()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, k.name, 'DEP_KEY' from columns as c, objects as kc, keys as k where kc.""name"" = c.name and kc.id = k.id and k.table_id = c.table_id and k.rkey = -1);" "user" 2 5 false false false 2000 -5613 "dependencies_columns_on_indexes" "--Column c has a dependency on index i \ncreate function dependencies_columns_on_indexes()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc.""name"" = c.name and kc.id = i.id and c.table_id = i.table_id and i.name not in (select name from keys));" "user" 2 5 false false false 2000 +5613 "dependencies_columns_on_indexes" "--Column c has a dependency on index i\ncreate function dependencies_columns_on_indexes()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc.""name"" = c.name and kc.id = i.id and c.table_id = i.table_id and i.name not in (select name from keys));" "user" 2 5 false false false 2000 5618 "dependencies_columns_on_functions" "--Column c has a dependency on function f\ncreate function dependencies_columns_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, f.name, 'DEP_FUNC' from functions as f, columns as c, dependencies as dep where c.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7);" "user" 2 5 false false false 2000 5623 "dependencies_columns_on_triggers" "--Column c has a dependency on trigger tri\ncreate function dependencies_columns_on_triggers()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, tri.name, 'DEP_TRIGGER' from columns as c, triggers as tri, dependencies as dep where dep.id = c.id and dep.depend_id =tri.id and dep.depend_type = 8);" "user" 2 5 false false false 2000 5628 "dependencies_views_on_functions" "--View v has a dependency on function f\ncreate function dependencies_views_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select v.name, f.name, 'DEP_FUNC' from functions as f, tables as v, dependencies as dep where v.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7 and v.type = 1);" "user" 2 5 false false false 2000 @@ -7002,11 +7002,11 @@ 5633 "dependencies_views_on_triggers" "- 5638 "dependencies_functions_on_functions" "--Function f1 has a dependency on function f2\ncreate function dependencies_functions_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select f1.name, f2.name, 'DEP_FUNC' from functions as f1, functions as f2, dependencies as dep where f1.id = dep.id and f2.id = dep.depend_id and dep.depend_type = 7);" "user" 2 5 false false false 2000 5643 "dependencies_functions_os_triggers" "--Function f1 has a dependency on trigger tri\ncreate function dependencies_functions_os_triggers()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select f.name, tri.name, 'DEP_TRIGGER' from functions as f, triggers as tri, dependencies as dep where dep.id = f.id and dep.depend_id =tri.id and dep.depend_type = 8);" "user" 2 5 false false false 2000 5648 "dependencies_keys_on_foreignkeys" "--Key k has a dependency on foreign key fk\ncreate function dependencies_keys_on_foreignkeys()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select k.name, fk.name, 'DEP_FKEY' from keys as k, keys as fk where fk.rkey = k.id);" "user" 2 5 false false false 2000 -5653 "password_hash" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function sys.password_hash (username string) \n\treturns string \n\texternal name sql.password;" "sql" 1 1 false false false 2000 +5653 "password_hash" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function sys.password_hash (username string)\n\treturns string\n\texternal name sql.password;" "sql" 1 1 false false false 2000 5657 "sessions" "create function sys.sessions()\nreturns table(""user"" string, ""login"" timestamp, ""sessiontimeout"" bigint, ""lastcommand"" timestamp, ""querytimeout"" bigint, ""active"" bool)\nexternal name sql.sessions;" "sql" 1 5 false false false 2000 -5673 "shutdown" "create procedure sys.shutdown(delay tinyint) \nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 -5676 "shutdown" "create procedure sys.shutdown(delay tinyint, force bool) \nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 -5680 "settimeout" "-- control the query and session time out \ncreate procedure sys.settimeout(""query"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 +5673 "shutdown" "create procedure sys.shutdown(delay tinyint)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 +5676 "shutdown" "create procedure sys.shutdown(delay tinyint, force bool)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 +5680 "settimeout" "-- control the query and session time out\ncreate procedure sys.settimeout(""query"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 5683 "settimeout" "create procedure sys.settimeout(""query"" bigint, ""session"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 5687 "setsession" "create procedure sys.setsession(""timeout"" bigint)\n\texternal name sql.setsession;" "sql" 1 2 true false false 2000 5690 "ms_stuff" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function ms_stuff( s1 varchar(32), st int, len int, s3 varchar(32))\nreturns varchar(32)\nbegin\n\tdeclare res varchar(32), aux varchar(32);\n\tdeclare ofset int;\n\n if ( st < 0 or st > length(s1))\n then return '';\n end if;\n\n set ofset = 1;\n set res = substring(s1,ofset,st-1);\n set res = res || s3;\n set ofset = st + len;\n set aux = substring(s1,ofset,length(s1)-ofset+1);\n\tset res = res || aux;\n\treturn res;\nend;" "user" 2 1 false false false 2000 @@ -7017,12 +7017,12 @@ 5714 "alpha" "create function alpha(pdec 5719 "zorder_encode" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function zorder_encode(x integer, y integer) returns oid\n external name zorder.encode;" "zorder" 1 1 false false false 2000 5724 "zorder_decode_x" "create function zorder_decode_x(z oid) returns integer\n external name zorder.decode_x;" "zorder" 1 1 false false false 2000 5728 "zorder_decode_y" "create function zorder_decode_y(z oid) returns integer\n external name zorder.decode_y;" "zorder" 1 1 false false false 2000 -5732 "optimizer_stats" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- show the optimizer statistics maintained by the SQL frontend\ncreate function sys.optimizer_stats () \n\treturns table (rewrite string, count int) \n\texternal name sql.dump_opt_stats;" "sql" 1 5 false false false 2000 -5736 "querycache" "-- SQL QUERY CACHE\n-- The SQL query cache returns a table with the query plans kept\n\ncreate function sys.querycache() \n\treturns table (query string, count int) \n\texternal name sql.dump_cache;" "sql" 1 5 false false false 2000 -5740 "querylog" "-- Trace the SQL input\ncreate procedure sys.querylog(filename string) \n\texternal name sql.logfile;" "sql" 1 2 true false false 2000 -5743 "optimizers" "-- MONETDB KERNEL SECTION\n-- optimizer pipe catalog\ncreate function sys.optimizers () \n\treturns table (name string, def string, status string)\n\texternal name sql.optimizers;" "sql" 1 5 false false false 2000 +5732 "optimizer_stats" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- show the optimizer statistics maintained by the SQL frontend\ncreate function sys.optimizer_stats ()\n\treturns table (rewrite string, count int)\n\texternal name sql.dump_opt_stats;" "sql" 1 5 false false false 2000 +5736 "querycache" "-- SQL QUERY CACHE\n-- The SQL query cache returns a table with the query plans kept\n\ncreate function sys.querycache()\n\treturns table (query string, count int)\n\texternal name sql.dump_cache;" "sql" 1 5 false false false 2000 +5740 "querylog" "-- Trace the SQL input\ncreate procedure sys.querylog(filename string)\n\texternal name sql.logfile;" "sql" 1 2 true false false 2000 +5743 "optimizers" "-- MONETDB KERNEL SECTION\n-- optimizer pipe catalog\ncreate function sys.optimizers ()\n\treturns table (name string, def string, status string)\n\texternal name sql.optimizers;" "sql" 1 5 false false false 2000 5753 "environment" "-- The environment table\ncreate function sys.environment()\n\treturns table (""name"" string, value string)\n\texternal name sql.sql_environment;" "sql" 1 5 false false false 2000 -5761 "bbp" "-- The BAT buffer pool overview\ncreate function sys.bbp () \n\treturns table (id int, name string, htype string, \n\t\tttype string, count bigint, refcnt int, lrefcnt int, \n\t\tlocation string, heat int, dirty string, \n\t\tstatus string, kind string) \n\texternal name bbp.get;" "bbp" 1 5 false false false 2000 +5761 "bbp" "-- The BAT buffer pool overview\ncreate function sys.bbp ()\n\treturns table (id int, name string, htype string,\n\t\tttype string, count bigint, refcnt int, lrefcnt int,\n\t\tlocation string, heat int, dirty string,\n\t\tstatus string, kind string)\n\texternal name bbp.get;" "bbp" 1 5 false false false 2000 5775 "evalalgebra" "create procedure sys.evalalgebra( ra_stmt string, opt bool)\n\texternal name sql.""evalAlgebra"";" "sql" 1 2 true false false 2000 5779 "queue" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- System monitoring\n\n-- show status of all active SQL queries.\ncreate function sys.queue()\nreturns table(\n\tqtag bigint,\n\t""user"" string,\n\tstarted timestamp,\n\testimate timestamp,\n\tprogress int,\n\tstatus string,\n\ttag oid,\n\tquery string\n)\nexternal name sql.sysmon_queue;" "sql" 1 5 false false false 2000 5799 "pause" "-- operations to manipulate the state of havoc queries\ncreate procedure sys.pause(tag int)\nexternal name sql.sysmon_pause;" "sql" 1 2 true false false 2000 @@ -7076,18 +7076,18 @@ 5981 "median" "create aggregate median(v 5985 "median" "create aggregate median(val integer) returns integer\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 5989 "median" "create aggregate median(val wrd) returns wrd\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 5993 "median" "create aggregate median(val bigint) returns bigint\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 -5997 "median" "create aggregate median(val decimal) returns decimal\n \texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 +5997 "median" "create aggregate median(val decimal) returns decimal\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6001 "median" "create aggregate median(val real) returns real\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6005 "median" "create aggregate median(val double) returns double\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6009 "median" "create aggregate median(val date) returns date\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6013 "median" "create aggregate median(val time) returns time\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6017 "median" "create aggregate median(val timestamp) returns timestamp\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 -6021 "quantile" "create aggregate quantile(val tinyint, q double) returns tinyint\n \texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 -6026 "quantile" "create aggregate quantile(val smallint, q double) returns smallint\n \texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 -6031 "quantile" "create aggregate quantile(val integer, q double) returns integer\n \texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 +6021 "quantile" "create aggregate quantile(val tinyint, q double) returns tinyint\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 +6026 "quantile" "create aggregate quantile(val smallint, q double) returns smallint\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 +6031 "quantile" "create aggregate quantile(val integer, q double) returns integer\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 6036 "quantile" "create aggregate quantile(val wrd, q double) returns wrd\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 6041 "quantile" "create aggregate quantile(val bigint, q double) returns bigint\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 -6046 "quantile" "create aggregate quantile(val decimal, q double) returns decimal\n \texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 +6046 "quantile" "create aggregate quantile(val decimal, q double) returns decimal\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 6051 "quantile" "create aggregate quantile(val real, q double) returns real\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 6056 "quantile" "create aggregate quantile(val double, q double) returns double\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 6061 "quantile" "create aggregate quantile(val date, q double) returns date\n\texternal name ""aggr"".""quantile"";" "aggr" 1 3 false false false 2000 @@ -7159,7 +7159,7 @@ 6378 "valuearray" "create function json. 6382 "text" "create function json.text(js json)\nreturns string external name json.text;" "json" 1 1 false false false 6310 6386 "text" "create function json.text(js string)\nreturns string external name json.text;" "json" 1 1 false false false 6310 6390 "text" "create function json.text(js int)\nreturns string external name json.text;" "json" 1 1 false false false 6310 -6394 "output" "-- The remainder awaits the implementation \n\ncreate aggregate json.output(js json)\nreturns string external name json.output;" "json" 1 3 false false false 6310 +6394 "output" "-- The remainder awaits the implementation\n\ncreate aggregate json.output(js json)\nreturns string external name json.output;" "json" 1 3 false false false 6310 6398 "tojsonarray" "-- create function json.object(*) returns json external name json.objectrender;\n\n-- create function json.array(*) returns json external name json.arrayrender;\n\n-- unnesting the JSON structure\n\n-- create function json.unnest(js json)\n-- returns table( id integer, k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( k string, v string) external name json.unnest;\n\n-- create function json.unnest(js json)\n-- returns table( v string) external name json.unnest;\n\n-- create function json.nest table( id integer, k string, v string)\n-- returns json external name json.nest;\n\ncreate aggregate json.tojsonarray( x string ) returns string external name aggr.jsonaggr;" "aggr" 1 3 false false false 6310 6402 "tojsonarray" "create aggregate json.tojsonarray( x double ) returns string external name aggr.jsonaggr;" "aggr" 1 3 false false false 6310 6406 "md5" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- (co) Arjen de Rijke\n\ncreate function sys.md5(v string)\nreturns string external name clients.md5sum;" "clients" 1 1 false false false 2000 @@ -7175,11 +7175,11 @@ 6493 "netcdf_attach" "-- gr_name is ""GL 6496 "netcdf_importvar" "create procedure netcdf_importvar(fid integer, varnname varchar(256))\n external name netcdf.importvariable;" "netcdf" 1 2 true false false 2000 6500 "storage" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- Author M.Kersten\n-- This script gives the database administrator insight in the actual\n-- footprint of the persistent tables and the maximum playground used\n-- when indices are introduced upon them.\n-- By chancing the storagemodelinput table directly, the footprint for\n-- yet to be loaded databases can be assessed.\n\n-- The actual storage footprint of an existing database can be\n-- obtained by the table procuding function storage()\n-- It represents the actual state of affairs, i.e. storage on disk\n-- of columns and foreign key indices, and possible temporary hash indices.\n-- For strings we take a sample to determine their average length.\n\ncreate function sys.""storage""()\nreturns table (""schema"" string, " "table"" string, ""column"" string, ""type"" string, ""mode"" string, location string, ""count"" bigint, typewidth int, columnsize bigint, heapsize bigint, hashes bigint, phash boolean, imprints bigint, sorted boolean)\nexternal name sql.""storage"";" "sql" 1 5 false false false 2000 6544 "storagemodelinit" "-- this table can be adjusted to reflect the anticipated final database size\n\n-- The model input can be derived from the current database using\ncreate procedure sys.storagemodelinit()\nbegin\n\tdelete from sys.storagemodelinput;\n\n\tinsert into sys.storagemodelinput\n\tselect x.""schema"", x.""table"", x.""column"", x.""type"", x.typewidth, x.count, 0, x.typewidth, false, x.sorted from sys.""storage""() x;\n\n\tupdate sys.storagemodelinput\n\tset reference = true\n\twhere concat(concat(""schema"",""table""), ""column"") in (\n\t\tselect concat( concat(""fkschema"".""name"", ""fktable"".""name""), ""fkkeycol"".""name"" )\n\t\tfrom\t""sys"".""keys"" as ""fkkey"",\n\t\t\t\t""sys"".""objects"" as ""fkkeycol"",\n\t\t\t\t""sys"".""tables"" as ""fktable"",\n\t\t\t\t""sys"".""schemas"" as ""fkschema""\n\t\twhere ""fktable"".""id"" = ""fkkey"".""table_id""\n\t\t\tand ""fkkey"".""id"" = ""fkkeycol"".""id""\n\t\t\tand ""fkschema"".""id"" = ""fktable"".""schem a_id""\n\t\t\tand ""fkkey"".""rkey"" > -1);\n\n\tupdate sys.storagemodelinput\n\tset ""distinct"" = ""count"" -- assume all distinct\n\twhere ""type"" = 'varchar' or ""type""='clob';\nend;" "user" 2 2 true false false 2000 -6546 "columnsize" "-- The predicted storage footprint of the complete database\n-- determines the amount of diskspace needed for persistent storage\n-- and the upperbound when all possible index structures are created.\n-- The storage requirement for foreign key joins is split amongst the participants.\n\ncreate function sys.columnsize(nme string, i bigint, d bigint)\nreturns bigint\nbegin\n\tcase\n\twhen nme = 'boolean' then return i;\n\twhen nme = 'char' then return 2*i;\n\twhen nme = 'smallint' then return 2 * i;\n\twhen nme = 'int'\t then return 4 * i;\n\twhen nme = 'bigint'\t then return 8 * i;\n\twhen nme = 'hugeint'\t then return 16 * i;\n\twhen nme = 'timestamp' then return 8 * i;\n\twhen nme = 'varchar' then\n\t\tcase\n\t\twhen cast(d as bigint) << 8 then return i;\n\t\twhen cast(d as bigint) << 16 then return 2 * i;\n\t\twhen cast(d as bigint) << 32 then return 4 * i;\n\t\telse return 8 * i;\n\t\tend case;\n\telse return 8 * i;\n\tend case;\nend;" "user" 2 1 false false f alse 2000 +6546 "columnsize" "-- The predicted storage footprint of the complete database\n-- determines the amount of diskspace needed for persistent storage\n-- and the upperbound when all possible index structures are created.\n-- The storage requirement for foreign key joins is split amongst the participants.\n\ncreate function sys.columnsize(nme string, i bigint, d bigint)\nreturns bigint\nbegin\n\tcase\n\twhen nme = 'boolean' then return i;\n\twhen nme = 'char' then return 2*i;\n\twhen nme = 'smallint' then return 2 * i;\n\twhen nme = 'int' then return 4 * i;\n\twhen nme = 'bigint' then return 8 * i;\n\twhen nme = 'hugeint' then return 16 * i;\n\twhen nme = 'timestamp' then return 8 * i;\n\twhen nme = 'varchar' then\n\t\tcase\n\t\twhen cast(d as bigint) << 8 then return i;\n\t\twhen cast(d as bigint) << 16 then return 2 * i;\n\t\twhen cast(d as bigint) << 32 then return 4 * i;\n\t\telse return 8 * i;\n\t\tend case;\n\telse return 8 * i;\n\tend case;\nend;" "user" 2 1 false false false 2 000 6552 "heapsize" "create function sys.heapsize(tpe string, i bigint, w int)\nreturns bigint\nbegin\n\tif tpe <> 'varchar' and tpe <> 'clob'\n\tthen\n\t\treturn 0;\n\tend if;\n\treturn 10240 + i * w;\nend;" "user" 2 1 false false false 2000 6558 "hashsize" "create function sys.hashsize(b boolean, i bigint)\nreturns bigint\nbegin\n\t-- assume non-compound keys\n\tif b = true\n\tthen\n\t\treturn 8 * i;\n\tend if;\n\treturn 0;\nend;" "user" 2 1 false false false 2000 -6563 "imprintsize" "create function sys.imprintsize(i bigint, nme string)\nreturns bigint\nbegin\n\tif nme = 'boolean'\n\t\tor nme = 'tinyint'\n\t\tor nme = 'smallint'\n\t\tor nme = 'int'\t\n\t\tor nme = 'bigint'\t\n\t\tor nme = 'hugeint'\t\n\t\tor nme = 'decimal'\t\n\t\tor nme = 'date'\n\t\tor nme = 'timestamp'\n\t\tor nme = 'real'\n\t\tor nme = 'double'\n\tthen\n\t\treturn cast( i * 0.12 as bigint);\n\tend if ;\n\treturn 0;\nend;" "user" 2 1 false false false 2000 -6568 "storagemodel" "create function sys.storagemodel()\nreturns table (\n\t""schema"" string,\n\t""table"" string,\n\t""column"" string,\n\t""type"" string,\n\t""count""\tbigint,\n\tcolumnsize bigint,\n\theapsize bigint,\n\thashes bigint,\n\timprints bigint,\n\tsorted boolean)\nbegin\n\treturn select i.""schema"", i.""table"", i.""column"", i.""type"", i.""count"",\n\tcolumnsize(i.""type"", i.count, i.""distinct""),\n\theapsize(i.""type"", i.""distinct"", i.""atomwidth""),\n\thashsize(i.""reference"", i.""count""),\n\timprintsize(i.""count"",i.""type""),\n\ti.sorted\n\tfrom sys.storagemodelinput i;\nend;" "user" 2 5 false false false 2000 +6563 "imprintsize" "create function sys.imprintsize(i bigint, nme string)\nreturns bigint\nbegin\n\tif nme = 'boolean'\n\t\tor nme = 'tinyint'\n\t\tor nme = 'smallint'\n\t\tor nme = 'int'\n\t\tor nme = 'bigint'\n\t\tor nme = 'hugeint'\n\t\tor nme = 'decimal'\n\t\tor nme = 'date'\n\t\tor nme = 'timestamp'\n\t\tor nme = 'real'\n\t\tor nme = 'double'\n\tthen\n\t\treturn cast( i * 0.12 as bigint);\n\tend if ;\n\treturn 0;\nend;" "user" 2 1 false false false 2000 +6568 "storagemodel" "create function sys.storagemodel()\nreturns table (\n\t""schema"" string,\n\t""table"" string,\n\t""column"" string,\n\t""type"" string,\n\t""count"" bigint,\n\tcolumnsize bigint,\n\theapsize bigint,\n\thashes bigint,\n\timprints bigint,\n\tsorted boolean)\nbegin\n\treturn select i.""schema"", i.""table"", i.""column"", i.""type"", i.""count"",\n\tcolumnsize(i.""type"", i.count, i.""distinct""),\n\theapsize(i.""type"", i.""distinct"", i.""atomwidth""),\n\thashsize(i.""reference"", i.""count""),\n\timprintsize(i.""count"",i.""type""),\n\ti.sorted\n\tfrom sys.storagemodelinput i;\nend;" "user" 2 5 false false false 2000 6615 "analyze" "create procedure analyze()\nexternal name sql.analyze;" "sql" 1 2 true false false 2000 6617 "analyze" "create procedure analyze(tbl string)\nexternal name sql.analyze;" "sql" 1 2 true false false 2000 6620 "analyze" "create procedure analyze(sch string, tbl string)\nexternal name sql.analyze;" "sql" 1 2 true false false 2000 diff --git a/clients/Tests/SQL-dump.stable.out.int128 b/clients/Tests/SQL-dump.stable.out.int128 --- a/clients/Tests/SQL-dump.stable.out.int128 +++ b/clients/Tests/SQL-dump.stable.out.int128 @@ -1784,7 +1784,7 @@ 5694 "auths" 2000 NULL 0 true 0 0 5698 "privileges" 2000 NULL 0 true 0 0 5920 "querylog_catalog" 2000 "-- create table views for convenience\ncreate view sys.querylog_catalog as select * from sys.querylog_catalog();" 1 true 0 0 5931 "querylog_calls" 2000 "create view sys.querylog_calls as select * from sys.querylog_calls();" 1 true 0 0 -5949 "querylog_history" 2000 "create view sys.querylog_history as\nselect qd.*, ql.""start"",ql.""stop"", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.io \nfrom sys.querylog_catalog() qd, sys.querylog_calls() ql\nwhere qd.id = ql.id and qd.owner = user;" 1 true 0 0 +5949 "querylog_history" 2000 "create view sys.querylog_history as\nselect qd.*, ql.""start"",ql.""stop"", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.io\nfrom sys.querylog_catalog() qd, sys.querylog_calls() ql\nwhere qd.id = ql.id and qd.owner = user;" 1 true 0 0 5988 "tracelog" 2000 "create view sys.tracelog as select * from sys.tracelog();" 1 true 0 0 6124 "sessions" 2000 "create view sys.sessions as select * from sys.sessions();" 1 true 0 0 6204 "optimizers" 2000 "create view sys.optimizers as select * from sys.optimizers();" 1 true 0 0 @@ -7612,32 +7612,32 @@ 5705 "like" "-- This Source Code Form is 5710 "ilike" "create filter function ""ilike""(val string, pat string, esc string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 5715 "like" "create filter function ""like""(val string, pat string) external name algebra.""like"";" "algebra" 1 4 true false false 2000 5719 "ilike" "create filter function ""ilike""(val string, pat string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 -5723 "degrees" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function degrees(r double) \nreturns double\n\treturn r*180/pi();" "user" 2 1 false false false 2000 -5727 "radians" "create function radians(d double) \nreturns double\n\treturn d*pi()/180;" "user" 2 1 false false false 2000 +5723 "degrees" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function degrees(r double)\nreturns double\n\treturn r*180/pi();" "user" 2 1 false false false 2000 +5727 "radians" "create function radians(d double)\nreturns double\n\treturn d*pi()/180;" "user" 2 1 false false false 2000 5731 "times" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- Provide a simple equivalent for the UNIX times command\n-- times 0 ms user 0 ms system 0 ms 0 reads 0 writes\n\ncreate procedure times()\nexternal name sql.times;" "sql" 1 2 true false false 2000 -5734 "getanchor" "create function getanchor( theurl url ) returns string \n\texternal name url.""getAnchor"";" "url" 1 1 false false false 2000 -5738 "getbasename" "create function getbasename(theurl url) returns string \n\texternal name url.""getBasename"";" "url" 1 1 false false false 2000 -5742 "getcontent" "create function getcontent(theurl url) returns string \n\texternal name url.""getContent"";" "url" 1 1 false false false 2000 -5746 "getcontext" "create function getcontext(theurl url) returns string \n\texternal name url.""getContext"";" "url" 1 1 false false false 2000 -5750 "getdomain" "create function getdomain(theurl url) returns string \n\texternal name url.""getDomain"";" "url" 1 1 false false false 2000 -5754 "getextension" "create function getextension(theurl url) returns string \n\texternal name url.""getExtension"";" "url" 1 1 false false false 2000 -5758 "getfile" "create function getfile(theurl url) returns string \n\texternal name url.""getFile"";" "url" 1 1 false false false 2000 -5762 "gethost" "create function gethost(theurl url) returns string \n\texternal name url.""getHost"";" "url" 1 1 false false false 2000 -5766 "getport" "create function getport(theurl url) returns string \n\texternal name url.""getPort"";" "url" 1 1 false false false 2000 -5770 "getprotocol" "create function getprotocol(theurl url) returns string \n\texternal name url.""getProtocol"";" "url" 1 1 false false false 2000 -5774 "getquery" "create function getquery(theurl url) returns string \n\texternal name url.""getQuery"";" "url" 1 1 false false false 2000 -5778 "getuser" "create function getuser(theurl url) returns string \n\texternal name url.""getUser"";" "url" 1 1 false false false 2000 -5782 "getroboturl" "create function getroboturl(theurl url) returns string \n\texternal name url.""getRobotURL"";" "url" 1 1 false false false 2000 +5734 "getanchor" "create function getanchor( theurl url ) returns string\n\texternal name url.""getAnchor"";" "url" 1 1 false false false 2000 +5738 "getbasename" "create function getbasename(theurl url) returns string\n\texternal name url.""getBasename"";" "url" 1 1 false false false 2000 +5742 "getcontent" "create function getcontent(theurl url) returns string\n\texternal name url.""getContent"";" "url" 1 1 false false false 2000 +5746 "getcontext" "create function getcontext(theurl url) returns string\n\texternal name url.""getContext"";" "url" 1 1 false false false 2000 +5750 "getdomain" "create function getdomain(theurl url) returns string\n\texternal name url.""getDomain"";" "url" 1 1 false false false 2000 +5754 "getextension" "create function getextension(theurl url) returns string\n\texternal name url.""getExtension"";" "url" 1 1 false false false 2000 +5758 "getfile" "create function getfile(theurl url) returns string\n\texternal name url.""getFile"";" "url" 1 1 false false false 2000 +5762 "gethost" "create function gethost(theurl url) returns string\n\texternal name url.""getHost"";" "url" 1 1 false false false 2000 +5766 "getport" "create function getport(theurl url) returns string\n\texternal name url.""getPort"";" "url" 1 1 false false false 2000 +5770 "getprotocol" "create function getprotocol(theurl url) returns string\n\texternal name url.""getProtocol"";" "url" 1 1 false false false 2000 +5774 "getquery" "create function getquery(theurl url) returns string\n\texternal name url.""getQuery"";" "url" 1 1 false false false 2000 +5778 "getuser" "create function getuser(theurl url) returns string\n\texternal name url.""getUser"";" "url" 1 1 false false false 2000 +5782 "getroboturl" "create function getroboturl(theurl url) returns string\n\texternal name url.""getRobotURL"";" "url" 1 1 false false false 2000 5786 "isaurl" "create function isaurl(theurl url) returns bool\n\texternal name url.""isaURL"";" "url" 1 1 false false false 2000 -5790 "newurl" "create function newurl(protocol string, hostname string, ""port"" int, file string) \n\treturns url \n\texternal name url.""new"";" "url" 1 1 false false false 2000 -5797 "newurl" "create function newurl(protocol string, hostname string, file string) \n\treturns url \n\texternal name url.""new"";" "url" 1 1 false false false 2000 +5790 "newurl" "create function newurl(protocol string, hostname string, ""port"" int, file string)\n\treturns url\n\texternal name url.""new"";" "url" 1 1 false false false 2000 +5797 "newurl" "create function newurl(protocol string, hostname string, file string)\n\treturns url\n\texternal name url.""new"";" "url" 1 1 false false false 2000 5803 "str_to_date" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function str_to_date(s string, format string) returns date\n\texternal name mtime.""str_to_date"";" "mtime" 1 1 false false false 2000 5808 "date_to_str" "create function date_to_str(d date, format string) returns string\n\texternal name mtime.""date_to_str"";" "mtime" 1 1 false false false 2000 5813 "str_to_time" "create function str_to_time(s string, format string) returns time\n\texternal name mtime.""str_to_time"";" "mtime" 1 1 false false false 2000 5818 "time_to_str" "create function time_to_str(d time, format string) returns string\n\texternal name mtime.""time_to_str"";" "mtime" 1 1 false false false 2000 5823 "str_to_timestamp" "create function str_to_timestamp(s string, format string) returns timestamp\n\texternal name mtime.""str_to_timestamp"";" "mtime" 1 1 false false false 2000 5828 "timestamp_to_str" "create function timestamp_to_str(d timestamp, format string) returns string\n\texternal name mtime.""timestamp_to_str"";" "mtime" 1 1 false false false 2000 -5834 "broadcast" "create function ""broadcast"" (p inet) returns inet \n\texternal name inet.""broadcast"";" "inet" 1 1 false false false 2000 +5834 "broadcast" "create function ""broadcast"" (p inet) returns inet\n\texternal name inet.""broadcast"";" "inet" 1 1 false false false 2000 5838 "host" "create function ""host"" (p inet) returns clob\n\texternal name inet.""host"";" "inet" 1 1 false false false 2000 5842 "masklen" "create function ""masklen"" (p inet) returns int\n\texternal name inet.""masklen"";" "inet" 1 1 false false false 2000 5846 "setmasklen" "create function ""setmasklen"" (p inet, mask int) returns inet\n\texternal name inet.""setmasklen"";" "inet" 1 1 false false false 2000 @@ -7650,13 +7650,13 @@ 5871 "left_shift" "create function ""lef 5876 "right_shift" "create function ""right_shift""(i1 inet, i2 inet) returns boolean\n\texternal name inet."">>"";" "inet" 1 1 false false false 2000 5881 "left_shift_assign" "create function ""left_shift_assign""(i1 inet, i2 inet) returns boolean\n\texternal name inet.""<<="";" "inet" 1 1 false false false 2000 5886 "right_shift_assign" "create function ""right_shift_assign""(i1 inet, i2 inet) returns boolean\n\texternal name inet."">>="";" "inet" 1 1 false false false 2000 -5891 "querylog_catalog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- QUERY HISTORY\n-- The query history mechanism of MonetDB/SQL relies on a few hooks.\n-- The most important one is a global system variable which controls\n-- monitoring of all sessions. \n\ncreate function sys.querylog_catalog()\nreturns table(\n\tid oid,\n\towner string,\n\tdefined timestamp,\n\tquery string,\n\tpipe string,\n\t""plan"" string,\t\t-- Name of MAL plan\n\tmal int,\t\t\t-- size of MAL plan\n\toptimize bigint \t-- time in usec\n)\nexternal name sql.querylog_catalog;" "sql" 1 5 false false false 2000 -5901 "querylog_calls" "-- Each query call is stored in the table calls\n-- At regular intervals the query history table should be cleaned.\n-- This can be done manually on the SQL console, or be integrated\n-- in the keepQuery and keepCall upon need.\n-- The parameters are geared at understanding the resource claims\n-- They reflect the effect of the total workload mix during execution.\n-- The 'cpu' gives the average cpu load percentage over all cores on the \n-- server during execution phase. \n-- increasing cpu load indicates better use of multi-cores.\n-- The 'io' indicate IOs during complete query run.\n-- The 'space' is the total amount of intermediates created in MB.\n-- Reducing the space component improves performance/\n-- All timing in usec and all storage in bytes.\n\ncreate function sys.querylog_calls()\nreturns table(\n\tid oid,\t\t\t\t -- references query plan\n\t""start"" timestamp,\t-- time the statement was started\n\t""stop"" timestamp,\t-- time the statement was c ompletely finished\n\targuments string,\t-- actual call structure\n\ttuples wrd,\t\t\t-- number of tuples in the result set\n\trun bigint,\t\t-- time spent (in usec) until the result export\n\tship bigint,\t\t-- time spent (in usec) to ship the result set\n\tcpu int, \t\t-- average cpu load percentage during execution\n\tio int\t\t\t-- percentage time waiting for IO to finish \n)\nexternal name sql.querylog_calls;" "sql" 1 5 false false false 2000 +5891 "querylog_catalog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- QUERY HISTORY\n-- The query history mechanism of MonetDB/SQL relies on a few hooks.\n-- The most important one is a global system variable which controls\n-- monitoring of all sessions.\n\ncreate function sys.querylog_catalog()\nreturns table(\n\tid oid,\n\towner string,\n\tdefined timestamp,\n\tquery string,\n\tpipe string,\n\t""plan"" string,\t\t-- Name of MAL plan\n\tmal int,\t\t-- size of MAL plan\n\toptimize bigint\t-- time in usec\n)\nexternal name sql.querylog_catalog;" "sql" 1 5 false false false 2000 +5901 "querylog_calls" "-- Each query call is stored in the table calls\n-- At regular intervals the query history table should be cleaned.\n-- This can be done manually on the SQL console, or be integrated\n-- in the keepQuery and keepCall upon need.\n-- The parameters are geared at understanding the resource claims\n-- They reflect the effect of the total workload mix during execution.\n-- The 'cpu' gives the average cpu load percentage over all cores on the\n-- server during execution phase.\n-- increasing cpu load indicates better use of multi-cores.\n-- The 'io' indicate IOs during complete query run.\n-- The 'space' is the total amount of intermediates created in MB.\n-- Reducing the space component improves performance/\n-- All timing in usec and all storage in bytes.\n\ncreate function sys.querylog_calls()\nreturns table(\n\tid oid,\t\t -- references query plan\n\t""start"" timestamp,\t-- time the statement was started\n\t""stop"" timestamp,\t-- time the statement was complet ely finished\n\targuments string,\t-- actual call structure\n\ttuples wrd,\t\t-- number of tuples in the result set\n\trun bigint,\t\t-- time spent (in usec) until the result export\n\tship bigint,\t\t-- time spent (in usec) to ship the result set\n\tcpu int,\t\t-- average cpu load percentage during execution\n\tio int\t\t\t-- percentage time waiting for IO to finish\n)\nexternal name sql.querylog_calls;" "sql" 1 5 false false false 2000 5951 "querylog_empty" "-- reset history for a particular user\ncreate procedure sys.querylog_empty()\nexternal name sql.querylog_empty;" "sql" 1 2 true false false 2000 5953 "querylog_enable" "-- manipulate the query logger\ncreate procedure sys.querylog_enable()\nexternal name sql.querylog_enable;" "sql" 1 2 true false false 2000 5955 "querylog_enable" "create procedure sys.querylog_enable(threshold smallint)\nexternal name sql.querylog_enable_threshold;" "sql" 1 2 true false false 2000 5958 "querylog_disable" "create procedure sys.querylog_disable()\nexternal name sql.querylog_disable;" "sql" 1 2 true false false 2000 -5960 "tracelog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- make the offline tracing table available for inspection\ncreate function sys.tracelog() \n\treturns table (\n\t\tevent integer,\t\t-- event counter\n\t\tclk varchar(20), \t-- wallclock, no mtime in kernel\n\t\tpc varchar(50), \t-- module.function[nr]\n\t\tthread int, \t\t-- thread identifier\n\t\tticks bigint, \t\t-- time in microseconds\n\t\trrsmb bigint, \t\t-- resident memory in MB\n\t\tvmmb bigint, \t\t-- virtual size in MB\n\t\treads bigint, \t\t-- number of blocks read\n\t\twrites bigint, \t\t-- number of blocks written\n\t\tminflt bigint, \t\t-- minor page faults\n\t\tmajflt bigint, \t\t-- major page faults\n\t\tnvcsw bigint, \t\t-- non-volantary conext switch\n\t\tstmt string\t\t\t-- actual statement executed\n \t)\n\texternal name sql.dump_trace;" "sql" 1 5 false false false 2000 +5960 "tracelog" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- make the offline tracing table available for inspection\ncreate function sys.tracelog()\n\treturns table (\n\t\tevent integer,\t\t-- event counter\n\t\tclk varchar(20),\t-- wallclock, no mtime in kernel\n\t\tpc varchar(50),\t-- module.function[nr]\n\t\tthread int,\t\t-- thread identifier\n\t\tticks bigint,\t\t-- time in microseconds\n\t\trrsmb bigint,\t\t-- resident memory in MB\n\t\tvmmb bigint,\t\t-- virtual size in MB\n\t\treads bigint,\t\t-- number of blocks read\n\t\twrites bigint,\t\t-- number of blocks written\n\t\tminflt bigint,\t\t-- minor page faults\n\t\tmajflt bigint,\t\t-- major page faults\n\t\tnvcsw bigint,\t\t-- non-volantary conext switch\n\t\tstmt string\t\t-- actual statement executed\n\t)\n\texterna l name sql.dump_trace;" "sql" 1 5 false false false 2000 5990 "profiler_openstream" "create procedure profiler_openstream(host string, port int) external name profiler.""openStream"";" "profiler" 1 2 true false false 2000 5994 "profiler_stethoscope" "create procedure profiler_stethoscope(ticks int) external name profiler.stethoscope;" "profiler" 1 2 true false false 2000 5997 "epoch" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- assume milliseconds when converted to TIMESTAMP\ncreate function ""epoch""(sec bigint) returns timestamp\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 @@ -7674,7 +7674,7 @@ 6046 "dependencies_tables_on_foreignkeys 6051 "dependencies_tables_on_functions" "--Table t has a dependency on function f\ncreate function dependencies_tables_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select t.name, f.name, 'DEP_FUNC' from functions as f, tables as t, dependencies as dep where t.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7 and t.type = 0);" "user" 2 5 false false false 2000 6056 "dependencies_columns_on_views" "--Column c has a dependency on view v\ncreate function dependencies_columns_on_views()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, v.name, 'DEP_VIEW' from columns as c, tables as v, dependencies as dep where c.id = dep.id and v.id = dep.depend_id and dep.depend_type = 5 and v.type = 1);" "user" 2 5 false false false 2000 6061 "dependencies_columns_on_keys" "--Column c has a dependency on key k\ncreate function dependencies_columns_on_keys()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, k.name, 'DEP_KEY' from columns as c, objects as kc, keys as k where kc.""name"" = c.name and kc.id = k.id and k.table_id = c.table_id and k.rkey = -1);" "user" 2 5 false false false 2000 -6066 "dependencies_columns_on_indexes" "--Column c has a dependency on index i \ncreate function dependencies_columns_on_indexes()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc.""name"" = c.name and kc.id = i.id and c.table_id = i.table_id and i.name not in (select name from keys));" "user" 2 5 false false false 2000 +6066 "dependencies_columns_on_indexes" "--Column c has a dependency on index i\ncreate function dependencies_columns_on_indexes()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, i.name, 'DEP_INDEX' from columns as c, objects as kc, idxs as i where kc.""name"" = c.name and kc.id = i.id and c.table_id = i.table_id and i.name not in (select name from keys));" "user" 2 5 false false false 2000 6071 "dependencies_columns_on_functions" "--Column c has a dependency on function f\ncreate function dependencies_columns_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, f.name, 'DEP_FUNC' from functions as f, columns as c, dependencies as dep where c.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7);" "user" 2 5 false false false 2000 6076 "dependencies_columns_on_triggers" "--Column c has a dependency on trigger tri\ncreate function dependencies_columns_on_triggers()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select c.name, tri.name, 'DEP_TRIGGER' from columns as c, triggers as tri, dependencies as dep where dep.id = c.id and dep.depend_id =tri.id and dep.depend_type = 8);" "user" 2 5 false false false 2000 6081 "dependencies_views_on_functions" "--View v has a dependency on function f\ncreate function dependencies_views_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select v.name, f.name, 'DEP_FUNC' from functions as f, tables as v, dependencies as dep where v.id = dep.id and f.id = dep.depend_id and dep.depend_type = 7 and v.type = 1);" "user" 2 5 false false false 2000 @@ -7682,11 +7682,11 @@ 6086 "dependencies_views_on_triggers" "- 6091 "dependencies_functions_on_functions" "--Function f1 has a dependency on function f2\ncreate function dependencies_functions_on_functions()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select f1.name, f2.name, 'DEP_FUNC' from functions as f1, functions as f2, dependencies as dep where f1.id = dep.id and f2.id = dep.depend_id and dep.depend_type = 7);" "user" 2 5 false false false 2000 6096 "dependencies_functions_os_triggers" "--Function f1 has a dependency on trigger tri\ncreate function dependencies_functions_os_triggers()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select f.name, tri.name, 'DEP_TRIGGER' from functions as f, triggers as tri, dependencies as dep where dep.id = f.id and dep.depend_id =tri.id and dep.depend_type = 8);" "user" 2 5 false false false 2000 6101 "dependencies_keys_on_foreignkeys" "--Key k has a dependency on foreign key fk\ncreate function dependencies_keys_on_foreignkeys()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select k.name, fk.name, 'DEP_FKEY' from keys as k, keys as fk where fk.rkey = k.id);" "user" 2 5 false false false 2000 -6106 "password_hash" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function sys.password_hash (username string) \n\treturns string \n\texternal name sql.password;" "sql" 1 1 false false false 2000 +6106 "password_hash" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function sys.password_hash (username string)\n\treturns string\n\texternal name sql.password;" "sql" 1 1 false false false 2000 6110 "sessions" "create function sys.sessions()\nreturns table(""user"" string, ""login"" timestamp, ""sessiontimeout"" bigint, ""lastcommand"" timestamp, ""querytimeout"" bigint, ""active"" bool)\nexternal name sql.sessions;" "sql" 1 5 false false false 2000 -6126 "shutdown" "create procedure sys.shutdown(delay tinyint) \nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 -6129 "shutdown" "create procedure sys.shutdown(delay tinyint, force bool) \nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 -6133 "settimeout" "-- control the query and session time out \ncreate procedure sys.settimeout(""query"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 +6126 "shutdown" "create procedure sys.shutdown(delay tinyint)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 +6129 "shutdown" "create procedure sys.shutdown(delay tinyint, force bool)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 +6133 "settimeout" "-- control the query and session time out\ncreate procedure sys.settimeout(""query"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 6136 "settimeout" "create procedure sys.settimeout(""query"" bigint, ""session"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 6140 "setsession" "create procedure sys.setsession(""timeout"" bigint)\n\texternal name sql.setsession;" "sql" 1 2 true false false 2000 6143 "ms_stuff" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function ms_stuff( s1 varchar(32), st int, len int, s3 varchar(32))\nreturns varchar(32)\nbegin\n\tdeclare res varchar(32), aux varchar(32);\n\tdeclare ofset int;\n\n if ( st < 0 or st > length(s1))\n then return '';\n end if;\n\n set ofset = 1;\n set res = substring(s1,ofset,st-1);\n set res = res || s3;\n set ofset = st + len;\n set aux = substring(s1,ofset,length(s1)-ofset+1);\n\tset res = res || aux;\n\treturn res;\nend;" "user" 2 1 false false false 2000 @@ -7697,12 +7697,12 @@ 6167 "alpha" "create function alpha(pdec 6172 "zorder_encode" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\ncreate function zorder_encode(x integer, y integer) returns oid\n external name zorder.encode;" "zorder" 1 1 false false false 2000 6177 "zorder_decode_x" "create function zorder_decode_x(z oid) returns integer\n external name zorder.decode_x;" "zorder" 1 1 false false false 2000 6181 "zorder_decode_y" "create function zorder_decode_y(z oid) returns integer\n external name zorder.decode_y;" "zorder" 1 1 false false false 2000 -6185 "optimizer_stats" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- show the optimizer statistics maintained by the SQL frontend\ncreate function sys.optimizer_stats () \n\treturns table (rewrite string, count int) \n\texternal name sql.dump_opt_stats;" "sql" 1 5 false false false 2000 -6189 "querycache" "-- SQL QUERY CACHE\n-- The SQL query cache returns a table with the query plans kept\n\ncreate function sys.querycache() \n\treturns table (query string, count int) \n\texternal name sql.dump_cache;" "sql" 1 5 false false false 2000 -6193 "querylog" "-- Trace the SQL input\ncreate procedure sys.querylog(filename string) \n\texternal name sql.logfile;" "sql" 1 2 true false false 2000 -6196 "optimizers" "-- MONETDB KERNEL SECTION\n-- optimizer pipe catalog\ncreate function sys.optimizers () \n\treturns table (name string, def string, status string)\n\texternal name sql.optimizers;" "sql" 1 5 false false false 2000 +6185 "optimizer_stats" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- show the optimizer statistics maintained by the SQL frontend\ncreate function sys.optimizer_stats ()\n\treturns table (rewrite string, count int)\n\texternal name sql.dump_opt_stats;" "sql" 1 5 false false false 2000 +6189 "querycache" "-- SQL QUERY CACHE\n-- The SQL query cache returns a table with the query plans kept\n\ncreate function sys.querycache()\n\treturns table (query string, count int)\n\texternal name sql.dump_cache;" "sql" 1 5 false false false 2000 +6193 "querylog" "-- Trace the SQL input\ncreate procedure sys.querylog(filename string)\n\texternal name sql.logfile;" "sql" 1 2 true false false 2000 +6196 "optimizers" "-- MONETDB KERNEL SECTION\n-- optimizer pipe catalog\ncreate function sys.optimizers ()\n\treturns table (name string, def string, status string)\n\texternal name sql.optimizers;" "sql" 1 5 false false false 2000 6206 "environment" "-- The environment table\ncreate function sys.environment()\n\treturns table (""name"" string, value string)\n\texternal name sql.sql_environment;" "sql" 1 5 false false false 2000 -6214 "bbp" "-- The BAT buffer pool overview\ncreate function sys.bbp () \n\treturns table (id int, name string, htype string, \n\t\tttype string, count bigint, refcnt int, lrefcnt int, \n\t\tlocation string, heat int, dirty string, \n\t\tstatus string, kind string) \n\texternal name bbp.get;" "bbp" 1 5 false false false 2000 +6214 "bbp" "-- The BAT buffer pool overview\ncreate function sys.bbp ()\n\treturns table (id int, name string, htype string,\n\t\tttype string, count bigint, refcnt int, lrefcnt int,\n\t\tlocation string, heat int, dirty string,\n\t\tstatus string, kind string)\n\texternal name bbp.get;" "bbp" 1 5 false false false 2000 6228 "evalalgebra" "create procedure sys.evalalgebra( ra_stmt string, opt bool)\n\texternal name sql.""evalAlgebra"";" "sql" 1 2 true false false 2000 6232 "queue" "-- This Source Code Form is subject to the terms of the Mozilla Public\n-- License, v. 2.0. If a copy of the MPL was not distributed with this\n-- file, You can obtain one at http://mozilla.org/MPL/2.0/.\n--\n-- Copyright 2008-2015 MonetDB B.V.\n\n-- System monitoring\n\n-- show status of all active SQL queries.\ncreate function sys.queue()\nreturns table(\n\tqtag bigint,\n\t""user"" string,\n\tstarted timestamp,\n\testimate timestamp,\n\tprogress int,\n\tstatus string,\n\ttag oid,\n\tquery string\n)\nexternal name sql.sysmon_queue;" "sql" 1 5 false false false 2000 6252 "pause" "-- operations to manipulate the state of havoc queries\ncreate procedure sys.pause(tag int)\nexternal name sql.sysmon_pause;" "sql" 1 2 true false false 2000 @@ -7756,18 +7756,18 @@ 6434 "median" "create aggregate median(v 6438 "median" "create aggregate median(val integer) returns integer\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6442 "median" "create aggregate median(val wrd) returns wrd\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 6446 "median" "create aggregate median(val bigint) returns bigint\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 -6450 "median" "create aggregate median(val decimal) returns decimal\n \texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 +6450 "median" "create aggregate median(val decimal) returns decimal\n\texternal name ""aggr"".""median"";" "aggr" 1 3 false false false 2000 _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
