Changeset: 4ba5f5c616f0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4ba5f5c616f0 Modified Files: clients/Tests/SQL-dump.stable.out clients/Tests/SQL-dump.stable.out.int128 gdk/gdk_batop.c sql/test/Tests/systemfunctions.stable.out sql/test/Tests/systemfunctions.stable.out.int128 Branch: Jul2015 Log Message:
Approvals. diffs (truncated from 1129 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 @@ -496,7 +496,7 @@ create function buffer(a geometry, dista -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- (co) Arjen de Rijke, Bart Scheers -- Use statistical functions from gsl library @@ -557,7 +557,7 @@ CREATE FUNCTION db_users () RETURNS TABL -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create function degrees(r double) returns double @@ -602,7 +602,7 @@ return table (select a.name, s.name, 'DE -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. --Schema s has a dependency on user u create function dependencies_schemas_on_users() @@ -658,7 +658,7 @@ create function sys.environment() -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- assume milliseconds when converted to TIMESTAMP create function sys."epoch"(sec bigint) returns timestamp @@ -688,7 +688,7 @@ returns bigint external name udf.fuse; -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- (c) Author M.Kersten @@ -820,7 +820,7 @@ create function length(g geometry) retur -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create filter function "like"(val string, pat string, esc string) external name algebra."like"; create filter function "like"(val string, pat string) external name algebra."like"; @@ -841,7 +841,7 @@ create function mbroverlaps(a mbr, b mbr -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- (co) Arjen de Rijke @@ -889,7 +889,7 @@ end; -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create function ms_stuff( s1 varchar(32), st int, len int, s3 varchar(32)) returns varchar(32) @@ -937,7 +937,7 @@ create function newurl(protocol string, -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- show the optimizer statistics maintained by the SQL frontend create function sys.optimizer_stats () @@ -953,7 +953,7 @@ create function overlaps(a geometry, b g -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create function sys.password_hash (username string) returns string @@ -1032,7 +1032,7 @@ external name sql.querylog_calls; -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- QUERY HISTORY -- The query history mechanism of MonetDB/SQL relies on a few hooks. @@ -1065,7 +1065,7 @@ external name sql.querylog_enable_thresh -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- System monitoring @@ -1089,7 +1089,7 @@ returns double -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- COPY into reject management @@ -1112,7 +1112,7 @@ create procedure reuse(sys string, tab s -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- add function signatures to SQL catalog @@ -1140,7 +1140,7 @@ create procedure sys.settimeout("query" -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- Vacuum a relational table should be done with care. -- For, the oid's are used in join-indices. @@ -1180,7 +1180,7 @@ create aggregate stddev_pop(val timestam -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create aggregate stddev_samp(val tinyint) returns double external name "aggr"."stdev"; @@ -1210,8 +1210,7 @@ external name sql.sysmon_stop; -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. - +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- Author M.Kersten -- This script gives the database administrator insight in the actual @@ -1296,7 +1295,7 @@ end; -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create function str_to_date(s string, format string) returns date external name mtime."str_to_date"; @@ -1313,7 +1312,7 @@ create function time_to_str(d time, form -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- Provide a simple equivalent for the UNIX times command -- times 0 ms user 0 ms system 0 ms 0 reads 0 writes @@ -1327,7 +1326,7 @@ create function touches(a geometry, b ge -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. -- make the offline tracing table available for inspection create function sys.tracelog() @@ -1404,7 +1403,7 @@ create function zorder_decode_y(z oid) r -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. -- --- Copyright 2008-2015 MonetDB B.V. +-- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V. create function zorder_encode(x integer, y integer) returns oid external name zorder.encode; @@ -7032,13 +7031,13 @@ 88 "count" "count" "aggr" 0 3 false fals 5231 "env" "CREATE FUNCTION env () RETURNS TABLE( name varchar(1024), value varchar(2048)) EXTERNAL NAME sql.sql_environment;" "sql" 2 5 false false false 2000 5234 "var" "CREATE FUNCTION var() RETURNS TABLE( name varchar(1024)) EXTERNAL NAME sql.sql_variables;" "sql" 2 5 false false false 2000 5240 "db_users" "CREATE FUNCTION db_users () RETURNS TABLE( name varchar(2048)) EXTERNAL NAME sql.db_users;" "sql" 2 5 false false false 2000 -5260 "like" "-- 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 filter function ""like""(val string, pat string, esc string) external name algebra.""like"";" "algebra" 1 4 true false false 2000 +5260 "like" "-- 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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\ncreate filter function ""like""(val string, pat string, esc string) external name algebra.""like"";" "algebra" 1 4 true false false 2000 5265 "ilike" "create filter function ""ilike""(val string, pat string, esc string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 5270 "like" "create filter function ""like""(val string, pat string) external name algebra.""like"";" "algebra" 1 4 true false false 2000 5274 "ilike" "create filter function ""ilike""(val string, pat string) external name algebra.""ilike"";" "algebra" 1 4 true false false 2000 -5278 "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 +5278 "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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\ncreate function degrees(r double)\nreturns double\n\treturn r*180/pi();" "user" 2 1 false false false 2000 5282 "radians" "create function radians(d double)\nreturns double\n\treturn d*pi()/180;" "user" 2 1 false false false 2000 -5286 "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 +5286 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5289 "getanchor" "create function getanchor( theurl url ) returns string\n\texternal name url.""getAnchor"";" "url" 1 1 false false false 2000 5293 "getbasename" "create function getbasename(theurl url) returns string\n\texternal name url.""getBasename"";" "url" 1 1 false false false 2000 5297 "getcontent" "create function getcontent(theurl url) returns string\n\texternal name url.""getContent"";" "url" 1 1 false false false 2000 @@ -7055,7 +7054,7 @@ 5337 "getroboturl" "create function getr 5341 "isaurl" "create function isaurl(theurl url) returns bool\n\texternal name url.""isaURL"";" "url" 1 1 false false false 2000 5345 "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 5352 "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 -5358 "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 +5358 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5363 "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 5368 "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 5373 "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 @@ -7074,23 +7073,23 @@ 5426 "left_shift" "create function ""lef 5431 "right_shift" "create function ""right_shift""(i1 inet, i2 inet) returns boolean\n\texternal name inet."">>"";" "inet" 1 1 false false false 2000 5436 "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 5441 "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 -5446 "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 +5446 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5456 "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 5506 "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 5508 "querylog_enable" "-- manipulate the query logger\ncreate procedure sys.querylog_enable()\nexternal name sql.querylog_enable;" "sql" 1 2 true false false 2000 5510 "querylog_enable" "create procedure sys.querylog_enable(threshold smallint)\nexternal name sql.querylog_enable_threshold;" "sql" 1 2 true false false 2000 5513 "querylog_disable" "create procedure sys.querylog_disable()\nexternal name sql.querylog_disable;" "sql" 1 2 true false false 2000 -5515 "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 +5515 "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 1997 - July 2008 CWI, August 2008 - 2016 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 sta tement executed\n\t)\n\texternal name sql.dump_trace;" "sql" 1 5 false false false 2000 5545 "profiler_openstream" "create procedure profiler_openstream(host string, port int) external name profiler.""openStream"";" "profiler" 1 2 true false false 2000 5549 "profiler_stethoscope" "create procedure profiler_stethoscope(ticks int) external name profiler.stethoscope;" "profiler" 1 2 true false false 2000 -5552 "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 sys.""epoch""(sec bigint) returns timestamp\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 +5552 "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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\n-- assume milliseconds when converted to TIMESTAMP\ncreate function sys.""epoch""(sec bigint) returns timestamp\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 5556 "epoch" "create function sys.""epoch""(sec int) returns timestamp\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 5560 "epoch" "create function sys.""epoch""(ts timestamp) returns int\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 5564 "epoch" "create function sys.""epoch""(ts timestamp with time zone) returns int\n\texternal name timestamp.""epoch"";" "timestamp" 1 1 false false false 2000 -5568 "shrink" "-- 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-- Vacuum a relational table should be done with care.\n-- For, the oid's are used in join-indices.\n\n-- Vacuum of tables may improve IO performance and disk footprint.\n-- The foreign key constraints should be dropped before\n-- and re-established after the cluster operation.\n\ncreate procedure shrink(sys string, tab string)\n\texternal name sql.shrink;" "sql" 1 2 true false false 2000 +5568 "shrink" "-- 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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\n-- Vacuum a relational table should be done with care.\n-- For, the oid's are used in join-indices.\n\n-- Vacuum of tables may improve IO performance and disk footprint.\n-- The foreign key constraints should be dropped before\n-- and re-established after the cluster operation.\n\ncreate procedure shrink(sys string, tab string)\n\texternal name sql.shrink;" "sql" 1 2 true false false 2000 5572 "reuse" "create procedure reuse(sys string, tab string)\n\texternal name sql.reuse;" "sql" 1 2 true false false 2000 5576 "vacuum" "create procedure vacuum(sys string, tab string)\n\texternal name sql.vacuum;" "sql" 1 2 true false false 2000 -5580 "dependencies_schemas_on_users" "-- 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--Schema s has a dependency on user u\ncreate function dependencies_schemas_on_users()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select s.name, u.name, 'DEP_USER' from schemas as s, users u where u.default_schema = s.id);" "user" 2 5 false false false 2000 +5580 "dependencies_schemas_on_users" "-- 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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\n--Schema s has a dependency on user u\ncreate function dependencies_schemas_on_users()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select s.name, u.name, 'DEP_USER' from schemas as s, users u where u.default_schema = s.id);" "user" 2 5 false false false 2000 5585 "dependencies_owners_on_schemas" "--User (owner) has a dependency in schema s\ncreate function dependencies_owners_on_schemas()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select a.name, s.name, 'DEP_SCHEMA' from schemas as s, auths a where s.owner = a.id);" "user" 2 5 false false false 2000 5590 "dependencies_tables_on_views" "--Table t has a dependency on view v\ncreate function dependencies_tables_on_views()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select t.name, v.name, 'DEP_VIEW' from tables as t, tables as v, dependencies as dep where t.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 5595 "dependencies_tables_on_indexes" "--Table t has a dependency on index i\ncreate function dependencies_tables_on_indexes()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select t.name, i.name, 'DEP_INDEX' from tables as t, idxs as i where i.table_id = t.id and i.name not in (select name from keys) and t.type = 0);" "user" 2 5 false false false 2000 @@ -7107,38 +7106,38 @@ 5645 "dependencies_views_on_triggers" "- 5650 "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 5655 "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 5660 "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 -5665 "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 +5665 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5669 "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 5685 "shutdown" "create procedure sys.shutdown(delay tinyint)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 5688 "shutdown" "create procedure sys.shutdown(delay tinyint, force bool)\nexternal name sql.shutdown;" "sql" 1 2 true false false 2000 5692 "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 5695 "settimeout" "create procedure sys.settimeout(""query"" bigint, ""session"" bigint)\n\texternal name sql.settimeout;" "sql" 1 2 true false false 2000 5699 "setsession" "create procedure sys.setsession(""timeout"" bigint)\n\texternal name sql.setsession;" "sql" 1 2 true false false 2000 -5702 "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 +5702 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5709 "ms_trunc" "create function ms_trunc(num double, prc int)\nreturns double\nexternal name sql.ms_trunc;" "sql" 1 1 false false false 2000 5714 "ms_round" "create function ms_round(num double, prc int, truncat int)\nreturns double\nbegin\n\tif (truncat = 0)\n\t\tthen return round(num, prc);\n\t\telse return ms_trunc(num, prc);\n\tend if;\nend;" "user" 2 1 false false false 2000 5720 "ms_str" "create function ms_str(num float, prc int, truncat int)\nreturns string\nbegin\n return cast(num as string);\nend;" "user" 2 1 false false false 2000 5726 "alpha" "create function alpha(pdec double, pradius double)\nreturns double external name sql.alpha;" "sql" 1 1 false false false 2000 -5731 "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 +5731 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5736 "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 5740 "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 -5744 "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 +5744 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5748 "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 5752 "querylog" "-- Trace the SQL input\ncreate procedure sys.querylog(filename string)\n\texternal name sql.logfile;" "sql" 1 2 true false false 2000 5755 "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 5765 "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 5773 "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 5787 "evalalgebra" "create procedure sys.evalalgebra( ra_stmt string, opt bool)\n\texternal name sql.""evalAlgebra"";" "sql" 1 2 true false false 2000 -5791 "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 +5791 "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 1997 - July 2008 CWI, August 2008 - 2016 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 5811 "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 5814 "resume" "create procedure sys.resume(tag int)\nexternal name sql.sysmon_resume;" "sql" 1 2 true false false 2000 5817 "stop" "create procedure sys.stop(tag int)\nexternal name sql.sysmon_stop;" "sql" 1 2 true false false 2000 5820 "pause" "create procedure sys.pause(tag bigint)\nexternal name sql.sysmon_pause;" "sql" 1 2 true false false 2000 5823 "resume" "create procedure sys.resume(tag bigint)\nexternal name sql.sysmon_resume;" "sql" 1 2 true false false 2000 5826 "stop" "create procedure sys.stop(tag bigint)\nexternal name sql.sysmon_stop;" "sql" 1 2 true false false 2000 -5829 "rejects" "-- 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-- COPY into reject management\n\ncreate function sys.rejects()\nreturns table(\n\trowid bigint,\n\tfldid int,\n\t""message"" string,\n\t""input"" string\n)\nexternal name sql.copy_rejects;" "sql" 1 5 false false false 2000 +5829 "rejects" "-- 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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\n-- COPY into reject management\n\ncreate function sys.rejects()\nreturns table(\n\trowid bigint,\n\tfldid int,\n\t""message"" string,\n\t""input"" string\n)\nexternal name sql.copy_rejects;" "sql" 1 5 false false false 2000 5841 "clearrejects" "create procedure sys.clearrejects()\nexternal name sql.copy_rejects_clear;" "sql" 1 2 true false false 2000 -5843 "stddev_samp" "-- 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 aggregate stddev_samp(val tinyint) returns double\n\texternal name ""aggr"".""stdev"";" "aggr" 1 3 false false false 2000 +5843 "stddev_samp" "-- 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 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.\n\ncreate aggregate stddev_samp(val tinyint) returns double\n\texternal name ""aggr"".""stdev"";" "aggr" 1 3 false false false 2000 5847 "stddev_samp" "create aggregate stddev_samp(val smallint) returns double\n\texternal name ""aggr"".""stdev"";" "aggr" 1 3 false false false 2000 5851 "stddev_samp" "create aggregate stddev_samp(val integer) returns double\n\texternal name ""aggr"".""stdev"";" "aggr" 1 3 false false false 2000 5855 "stddev_samp" "create aggregate stddev_samp(val wrd) returns double\n\texternal name ""aggr"".""stdev"";" "aggr" 1 3 false false false 2000 @@ -7270,18 +7269,18 @@ 6422 "text" "create function json.text(j 6426 "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 6342 6430 "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 6342 6434 "tojsonarray" "create aggregate json.tojsonarray( x double ) returns string external name aggr.jsonaggr;" "aggr" 1 3 false false false 6342 -6438 "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 +6438 "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 1997 - July 2008 CWI, August 2008 - 2016 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 _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
