Changeset: 848d4204cffd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=848d4204cffd Modified Files: sql/jdbc/tests/Tests/Test_Dobjects.stable.out sql/test/Tests/coalesce.stable.err.single sql/test/Tests/systemfunctions.stable.out.int128 sql/test/Tests/systemfunctions_bam.stable.out.int128 sql/test/Tests/systemfunctions_gsl.stable.out.int128 sql/test/Tests/systemfunctions_nogeom.stable.out.int128 sql/test/Tests/trace_nogeom.stable.out.int128 Branch: default Log Message:
Approvals. diffs (truncated from 949 to 300 lines): diff --git a/sql/jdbc/tests/Tests/Test_Dobjects.stable.out b/sql/jdbc/tests/Tests/Test_Dobjects.stable.out --- a/sql/jdbc/tests/Tests/Test_Dobjects.stable.out +++ b/sql/jdbc/tests/Tests/Test_Dobjects.stable.out @@ -94,12 +94,12 @@ mTests_sql_jdbc_tests sys querylog_calls mTests_sql_jdbc_tests sys querylog_catalog SYSTEM VIEW -- create table views for convenience create view sys.querylog_catalog as select * from sys.querylog_catalog(); null null null rowid SYSTEM mTests_sql_jdbc_tests sys querylog_history SYSTEM VIEW create view sys.querylog_history as -select qd.*, ql."start",ql."stop", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.space, ql.io +select qd.*, ql."start",ql."stop", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.io from sys.querylog_catalog() qd, sys.querylog_calls() ql where qd.id = ql.id and qd.owner = user; null null null rowid SYSTEM mTests_sql_jdbc_tests sys queue SYSTEM VIEW create view sys.queue as select * from sys.queue(); null null null rowid SYSTEM mTests_sql_jdbc_tests sys sessions SYSTEM VIEW create view sys.sessions as select * from sys.sessions(); null null null rowid SYSTEM -mTests_sql_jdbc_tests sys storage SYSTEM VIEW create view sys.storage as select * from sys.storage(); null null null rowid SYSTEM +mTests_sql_jdbc_tests sys storage SYSTEM VIEW create view sys."storage" as select * from sys."storage"(); null null null rowid SYSTEM mTests_sql_jdbc_tests sys storagemodel SYSTEM VIEW create view sys.storagemodel as select * from sys.storagemodel(); null null null rowid SYSTEM mTests_sql_jdbc_tests sys tables SYSTEM VIEW SELECT * FROM (SELECT p.*, 0 AS "temporary" FROM "sys"."_tables" AS p UNION ALL SELECT t.*, 1 AS "temporary" FROM "tmp"."_tables" AS t) AS tables where tables.type <> 2; null null null rowid SYSTEM mTests_sql_jdbc_tests sys tablestoragemodel SYSTEM VIEW -- A summary of the table storage requirement is is available as a table view. diff --git a/sql/test/Tests/coalesce.stable.err.single b/sql/test/Tests/coalesce.stable.err.single --- a/sql/test/Tests/coalesce.stable.err.single +++ b/sql/test/Tests/coalesce.stable.err.single @@ -79,12 +79,6 @@ stderr of test 'coalesce` in directory ' # 20:30:43 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=39627 # 20:30:43 > -MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 -QUERY = select id, coalesce(age,'age unknown') from coalescetest; -ERROR = !conversion of string 'age unknown' to type int failed. -MAPI = (monetdb) /var/tmp/mtest-23209/.s.monetdb.33225 -QUERY = select id, coalesce(name, age, 'unknown') from coalescetest; -ERROR = !conversion of string 'a' to type int failed. # 20:30:44 > # 20:30:44 > Done. diff --git a/sql/test/Tests/systemfunctions.stable.out.int128 b/sql/test/Tests/systemfunctions.stable.out.int128 --- a/sql/test/Tests/systemfunctions.stable.out.int128 +++ b/sql/test/Tests/systemfunctions.stable.out.int128 @@ -58,7 +58,7 @@ Ready. % sys.L3, sys.L3, sys.L3, sys.L3, sys.L3 # table_name % schema, function, argno, argtype, definition # name % varchar, varchar, int, varchar, varchar # type -% 4, 35, 2, 15, 1681 # length +% 4, 35, 2, 15, 1336 # length [ "json", "filter", 0, "json", "-- access the top level key by name, return its value\ncreate function json.filter(js json, pathexpr string)\nreturns json external name json.filter;" ] [ "json", "filter", 1, "json", "" ] [ "json", "filter", 2, "clob", "" ] @@ -71,7 +71,7 @@ Ready. [ "json", "filter", 0, "json", "create function json.filter(js json, name bigint)\nreturns json external name json.filter;" ] [ "json", "filter", 1, "json", "" ] [ "json", "filter", 2, "bigint", "" ] -[ "json", "filter", 0, "json", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (co) Martin Kersten\n-- The JSON type comes with a few operators.\n\ncreate function json.filter(js json, name hugeint)\nreturns json external name json.filter;" ] +[ "json", "filter", 0, "json", "-- 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) Martin Kersten\n-- The JSON type comes with a few operators.\n\ncreate function json.filter(js json, name hugeint)\nreturns json external name json.filter;" ] [ "json", "filter", 1, "json", "" ] [ "json", "filter", 2, "hugeint", "" ] [ "json", "integer", 0, "bigint", "create function json.\"integer\"(js json)\nreturns bigint external name json.\"integer\";" ] @@ -168,6 +168,9 @@ Ready. [ "sys", "contains", 0, "boolean", "create function contains(a geometry, b geometry) returns boolean external name geom.\"Contains\";" ] [ "sys", "contains", 1, "geometry", "" ] [ "sys", "contains", 2, "geometry", "" ] +[ "sys", "convert", 0, "date", "create function \"convert\"(s string, format string) returns date\n\texternal name mtime.\"str_to_date\";" ] +[ "sys", "convert", 1, "clob", "" ] +[ "sys", "convert", 2, "clob", "" ] [ "sys", "convexhull", 0, "geometry", "create function convexhull(a geometry) returns geometry external name geom.\"ConvexHull\";" ] [ "sys", "convexhull", 1, "geometry", "" ] [ "sys", "corr", 0, "tinyint", "create aggregate corr(e1 tinyint, e2 tinyint) returns tinyint\n\texternal name \"aggr\".\"corr\";" ] @@ -201,7 +204,7 @@ Ready. [ "sys", "date_to_str", 1, "date", "" ] [ "sys", "date_to_str", 2, "clob", "" ] [ "sys", "db_users", 0, "varchar", "CREATE FUNCTION db_users () RETURNS TABLE( name varchar(2048)) EXTERNAL NAME sql.db_users;" ] -[ "sys", "degrees", 0, "double", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate function degrees(r double) \nreturns double\n\treturn r*180/pi();" ] +[ "sys", "degrees", 0, "double", "-- 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();" ] [ "sys", "degrees", 1, "double", "" ] [ "sys", "dependencies_columns_on_functions", 0, "varchar", "--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);" ] [ "sys", "dependencies_columns_on_functions", 1, "varchar", "" ] @@ -230,7 +233,7 @@ Ready. [ "sys", "dependencies_owners_on_schemas", 0, "varchar", "--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);" ] [ "sys", "dependencies_owners_on_schemas", 1, "varchar", "" ] [ "sys", "dependencies_owners_on_schemas", 2, "varchar", "" ] -[ "sys", "dependencies_schemas_on_users", 0, "varchar", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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);" ] +[ "sys", "dependencies_schemas_on_users", 0, "varchar", "-- 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);" ] [ "sys", "dependencies_schemas_on_users", 1, "varchar", "" ] [ "sys", "dependencies_schemas_on_users", 2, "varchar", "" ] [ "sys", "dependencies_tables_on_foreignkeys", 0, "varchar", "--Table t has a dependency on foreign key k\ncreate function dependencies_tables_on_foreignkeys()\nreturns table (sch varchar(100), usr varchar(100), dep_type varchar(32))\nreturn table (select t.name, fk.name, 'DEP_FKEY' from tables as t, keys as k, keys as fk where fk.rkey = k.id and k.table_id = t.id);" ] @@ -271,7 +274,7 @@ Ready. [ "sys", "envelope", 1, "geometry", "" ] [ "sys", "environment", 0, "clob", "-- The environment table\ncreate function sys.environment()\n\treturns table (\"name\" string, value string)\n\texternal name sql.sql_environment;" ] [ "sys", "environment", 1, "clob", "" ] -[ "sys", "epoch", 0, "timestamp", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- assume milliseconds when converted to TIMESTAMP\ncreate function \"epoch\"(sec bigint) returns timestamp\n external name timestamp.\"epoch\";" ] +[ "sys", "epoch", 0, "timestamp", "-- 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 external name timestamp.\"epoch\";" ] [ "sys", "epoch", 1, "bigint", "" ] [ "sys", "epoch", 0, "timestamp", "create function \"epoch\"(sec int) returns timestamp\n\texternal name timestamp.\"epoch\";" ] [ "sys", "epoch", 1, "int", "" ] @@ -293,17 +296,10 @@ Ready. [ "sys", "fuse", 0, "bigint", "-- fuse two (4-byte) integer values into one (8-byte) bigint value\ncreate function fuse(one integer, two integer)\nreturns bigint external name udf.fuse;" ] [ "sys", "fuse", 1, "int", "" ] [ "sys", "fuse", 2, "int", "" ] -[ "sys", "fuse", 0, "hugeint", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- add function signatures to SQL catalog\n\n\n-- fuse two (8-byte) integer values into one (16-byte) bigint value\ncreate function fuse(one bigint, two bigint)\nreturns hugeint external name udf.fus e;" ] +[ "sys", "fuse", 0, "hugeint", "-- 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-- add function signatures to SQL catalog\n\n\n-- fuse two (8-byte) integer values into one (16-byte) bigint value\ncreate function fuse(one bigint, two bigint)\nreturns hugeint external name udf.fuse;" ] [ "sys", "fuse", 1, "bigint", "" ] [ "sys", "fuse", 2, "bigint", "" ] -[ "sys", "generate_series", 0, "hugeint", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (c) Author M.Kersten\n\ncreate function sys.generate_series(first hugeint, last hugeint)\nreturns table (value hugeint)\nexternal name generator.series;" ] -[ "sys", "generate_series", 1, "hugeint", "" ] -[ "sys", "generate_series", 2, "hugeint", "" ] -[ "sys", "generate_series", 0, "hugeint", "create function sys.generate_series(first hugeint, last hugeint, stepsize hugeint)\nreturns table (value hugeint)\nexternal name generator.series;" ] -[ "sys", "generate_series", 1, "hugeint", "" ] -[ "sys", "generate_series", 2, "hugeint", "" ] -[ "sys", "generate_series", 3, "hugeint", "" ] -[ "sys", "generate_series", 0, "tinyint", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (c) Author M.Kersten\n\ncreate function sys.generate_series(first tinyint, last tinyint)\nreturns table (value tinyint)\nexternal name generator.series;" ] +[ "sys", "generate_series", 0, "tinyint", "-- 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-- (c) Author M.Kersten\n\ncreate function sys.generate_series(first tinyint, last tinyint)\nreturns table (value tinyint)\nexternal name generator.series;" ] [ "sys", "generate_series", 1, "tinyint", "" ] [ "sys", "generate_series", 2, "tinyint", "" ] [ "sys", "generate_series", 0, "tinyint", "create function sys.generate_series(first tinyint, last tinyint, stepsize tinyint)\nreturns table (value tinyint)\nexternal name generator.series;" ] @@ -347,6 +343,13 @@ Ready. [ "sys", "generate_series", 1, "timestamp", "" ] [ "sys", "generate_series", 2, "timestamp", "" ] [ "sys", "generate_series", 3, "sec_interval", "" ] +[ "sys", "generate_series", 0, "hugeint", "-- 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-- (c) Author M.Kersten\n\ncreate function sys.generate_series(first hugeint, last hugeint)\nreturns table (value hugeint)\nexternal name generator.series;" ] +[ "sys", "generate_series", 1, "hugeint", "" ] +[ "sys", "generate_series", 2, "hugeint", "" ] +[ "sys", "generate_series", 0, "hugeint", "create function sys.generate_series(first hugeint, last hugeint, stepsize hugeint)\nreturns table (value hugeint)\nexternal name generator.series;" ] +[ "sys", "generate_series", 1, "hugeint", "" ] +[ "sys", "generate_series", 2, "hugeint", "" ] +[ "sys", "generate_series", 3, "hugeint", "" ] [ "sys", "geomcollectionfromtext", 0, "multipolygon", "create function geomcollectionfromtext(wkt string, srid smallint) returns multipolygon external name geom.\"GeomCollectionFromText\";" ] [ "sys", "geomcollectionfromtext", 1, "clob", "" ] [ "sys", "geomcollectionfromtext", 2, "smallint", "" ] @@ -421,7 +424,7 @@ Ready. [ "sys", "left_shift_assign", 2, "inet", "" ] [ "sys", "length", 0, "double", "create function length(g geometry) returns float external name geom.\"Length\";" ] [ "sys", "length", 1, "geometry", "" ] -[ "sys", "like", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate filter function \"like\"(val string, pat string, esc string) external name algebra.\"like\";" ] +[ "sys", "like", 0, "clob", "-- 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\";" ] [ "sys", "like", 1, "clob", "" ] [ "sys", "like", 2, "clob", "" ] [ "sys", "like", 0, "clob", "create filter function \"like\"(val string, pat string) external name algebra.\"like\";" ] @@ -439,7 +442,7 @@ Ready. [ "sys", "mbroverlaps", 0, "boolean", "create function mbroverlaps(a mbr, b mbr) returns boolean external name geom.\"mbroverlaps\";" ] [ "sys", "mbroverlaps", 1, "mbr", "" ] [ "sys", "mbroverlaps", 2, "mbr", "" ] -[ "sys", "md5", 0, "clob", "\n-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (co) Arjen de Rijke\n-- Functions supporting jsonstore\n\ncreate function sys.md5(v string)\nreturns string external name clients.md5sum;" ] +[ "sys", "md5", 0, "clob", "-- 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-- Functions supporting jsonstore\n\ncreate function sys.md5(v string)\nreturns string external name clients.md5sum;" ] [ "sys", "md5", 1, "clob", "" ] [ "sys", "median", 0, "tinyint", "create aggregate median(val tinyint) returns tinyint\n\texternal name \"aggr\".\"median\";" ] [ "sys", "median", 1, "tinyint", "" ] @@ -482,7 +485,7 @@ Ready. [ "sys", "ms_str", 1, "double", "" ] [ "sys", "ms_str", 2, "int", "" ] [ "sys", "ms_str", 3, "int", "" ] -[ "sys", "ms_stuff", 0, "varchar", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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;" ] +[ "sys", "ms_stuff", 0, "varchar", "-- 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;" ] [ "sys", "ms_stuff", 1, "varchar", "" ] [ "sys", "ms_stuff", 2, "int", "" ] [ "sys", "ms_stuff", 3, "int", "" ] @@ -503,7 +506,7 @@ Ready. [ "sys", "newurl", 1, "clob", "" ] [ "sys", "newurl", 2, "clob", "" ] [ "sys", "newurl", 3, "clob", "" ] -[ "sys", "optimizer_stats", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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;" ] +[ "sys", "optimizer_stats", 0, "clob", "-- 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;" ] [ "sys", "optimizer_stats", 1, "int", "" ] [ "sys", "optimizers", 0, "clob", "-- 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;" ] [ "sys", "optimizers", 1, "clob", "" ] @@ -511,7 +514,7 @@ Ready. [ "sys", "overlaps", 0, "boolean", "create function overlaps(a geometry, b geometry) returns boolean external name geom.\"Overlaps\";" ] [ "sys", "overlaps", 1, "geometry", "" ] [ "sys", "overlaps", 2, "geometry", "" ] -[ "sys", "password_hash", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate function sys.password_hash (username string) \n\treturns string \n\texternal name sql.password;" ] +[ "sys", "password_hash", 0, "clob", "-- 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;" ] [ "sys", "password_hash", 1, "clob", "" ] [ "sys", "pause", 0, "int", "-- operations to manipulate the state of havoc queries\ncreate procedure sys.pause(tag int)\nexternal name sql.sysmon_pause;" ] [ "sys", "pause", 0, "bigint", "create procedure sys.pause(tag bigint)\nexternal name sql.sysmon_pause;" ] @@ -578,7 +581,7 @@ Ready. [ "sys", "querylog_calls", 6, "bigint", "" ] [ "sys", "querylog_calls", 7, "int", "" ] [ "sys", "querylog_calls", 8, "int", "" ] -[ "sys", "querylog_catalog", 0, "oid", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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;" ] +[ "sys", "querylog_catalog", 0, "oid", "-- 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;" ] [ "sys", "querylog_catalog", 1, "clob", "" ] [ "sys", "querylog_catalog", 2, "timestamp", "" ] [ "sys", "querylog_catalog", 3, "clob", "" ] @@ -587,7 +590,7 @@ Ready. [ "sys", "querylog_catalog", 6, "int", "" ] [ "sys", "querylog_catalog", 7, "bigint", "" ] [ "sys", "querylog_enable", 0, "smallint", "create procedure sys.querylog_enable(threshold smallint)\nexternal name sql.querylog_enable_threshold;" ] -[ "sys", "queue", 0, "bigint", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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\tprog ress int,\n\tstatus string,\n\ttag oid,\n\tquery string\n)\nexternal name sql.sysmon_queue;" ] +[ "sys", "queue", 0, "bigint", "-- 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;" ] [ "sys", "queue", 1, "clob", "" ] [ "sys", "queue", 2, "timestamp", "" ] [ "sys", "queue", 3, "timestamp", "" ] @@ -605,7 +608,7 @@ Ready. [ "sys", "resume", 0, "bigint", "create procedure sys.resume(tag bigint)\nexternal name sql.sysmon_resume;" ] [ "sys", "reuse", 0, "clob", "create procedure reuse(sys string, tab string)\n\texternal name sql.reuse;" ] [ "sys", "reuse", 1, "clob", "" ] -[ "sys", "reverse", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- add function signatures to SQL catalog\n\n\n-- Reverse a string\ncreate function reverse(src string)\nreturns string external name udf.reverse;" ] +[ "sys", "reverse", 0, "clob", "-- 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-- add function signatures to SQL catalog\n\n\n-- Reverse a string\ncreate function reverse(src string)\nreturns string external name udf.reverse;" ] [ "sys", "reverse", 1, "clob", "" ] [ "sys", "right_shift", 0, "boolean", "create function \"right_shift\"(i1 inet, i2 inet) returns boolean\n\texternal name inet.\">>\";" ] [ "sys", "right_shift", 1, "inet", "" ] @@ -626,7 +629,7 @@ Ready. [ "sys", "settimeout", 0, "bigint", "-- control the query and session time out \ncreate procedure sys.settimeout(\"query\" bigint)\n\texternal name sql.settimeout;" ] [ "sys", "settimeout", 0, "bigint", "create procedure sys.settimeout(\"query\" bigint, \"session\" bigint)\n\texternal name sql.settimeout;" ] [ "sys", "settimeout", 1, "bigint", "" ] -[ "sys", "shrink", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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 constraint s 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;" ] +[ "sys", "shrink", 0, "clob", "-- 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;" ] [ "sys", "shrink", 1, "clob", "" ] [ "sys", "shutdown", 0, "tinyint", "create procedure sys.shutdown(delay tinyint) \nexternal name sql.shutdown;" ] [ "sys", "shutdown", 0, "tinyint", "create procedure sys.shutdown(delay tinyint, force bool) \nexternal name sql.shutdown;" ] @@ -655,7 +658,7 @@ Ready. [ "sys", "stddev_pop", 1, "timestamp", "" ] [ "sys", "stddev_pop", 0, "double", "create aggregate stddev_pop(val hugeint) returns double\n\texternal name \"aggr\".\"stdevp\";" ] [ "sys", "stddev_pop", 1, "hugeint", "" ] -[ "sys", "stddev_samp", 0, "double", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate aggregate stddev_samp(val tinyint) returns double\n\texternal name \"aggr\".\"stdev\";" ] +[ "sys", "stddev_samp", 0, "double", "-- 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\";" ] [ "sys", "stddev_samp", 1, "tinyint", "" ] [ "sys", "stddev_samp", 0, "double", "create aggregate stddev_samp(val smallint) returns double\n\texternal name \"aggr\".\"stdev\";" ] [ "sys", "stddev_samp", 1, "smallint", "" ] @@ -675,11 +678,11 @@ Ready. [ "sys", "stddev_samp", 1, "time", "" ] [ "sys", "stddev_samp", 0, "double", "create aggregate stddev_samp(val timestamp) returns double\n\texternal name \"aggr\".\"stdev\";" ] [ "sys", "stddev_samp", 1, "timestamp", "" ] -[ "sys", "stddev_samp", 0, "double", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate aggregate stddev_samp(val hugeint) returns double\n\texternal name \"aggr\".\"stdev\";" ] +[ "sys", "stddev_samp", 0, "double", "-- 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 hugeint) returns double\n\texternal name \"aggr\".\"stdev\";" ] [ "sys", "stddev_samp", 1, "hugeint", "" ] [ "sys", "stop", 0, "int", "create procedure sys.stop(tag int)\nexternal name sql.sysmon_stop;" ] [ "sys", "stop", 0, "bigint", "create procedure sys.stop(tag bigint)\nexternal name sql.sysmon_stop;" ] -[ "sys", "storage", 0, "clob", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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, imprints bigint, sorted boolean)\nexternal name sql.\"storage\";" ] +[ "sys", "storage", 0, "clob", "-- 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 (\"sc hema\" string, \"table\" string, \"column\" string, \"type\" string, \"mode\" string, location string, \"count\" bigint, typewidth int, columnsize bigint, heapsize bigint, hashes bigint, imprints bigint, sorted boolean)\nexternal name sql.\"storage\";" ] [ "sys", "storage", 1, "clob", "" ] [ "sys", "storage", 2, "clob", "" ] [ "sys", "storage", 3, "clob", "" ] @@ -702,7 +705,7 @@ Ready. [ "sys", "storagemodel", 7, "bigint", "" ] [ "sys", "storagemodel", 8, "bigint", "" ] [ "sys", "storagemodel", 9, "boolean", "" ] -[ "sys", "str_to_date", 0, "date", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate function str_to_date(s string, format string) returns date\n\texternal name mtime.\"str_to_date\";" ] +[ "sys", "str_to_date", 0, "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\";" ] [ "sys", "str_to_date", 1, "clob", "" ] [ "sys", "str_to_date", 2, "clob", "" ] [ "sys", "symdifference", 0, "geometry", "create function symdifference(a geometry, b geometry) returns geometry external name geom.\"SymDifference\";" ] @@ -713,7 +716,7 @@ Ready. [ "sys", "touches", 0, "boolean", "create function touches(a geometry, b geometry) returns boolean external name geom.\"Touches\";" ] [ "sys", "touches", 1, "geometry", "" ] [ "sys", "touches", 2, "geometry", "" ] -[ "sys", "tracelog", 0, "int", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\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 i n 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;" ] +[ "sys", "tracelog", 0, "int", "-- 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 state ment executed\n\t)\n\texternal name sql.dump_trace;" ] [ "sys", "tracelog", 1, "varchar", "" ] [ "sys", "tracelog", 2, "varchar", "" ] [ "sys", "tracelog", 3, "int", "" ] @@ -785,7 +788,7 @@ Ready. [ "sys", "zorder_decode_x", 1, "oid", "" ] [ "sys", "zorder_decode_y", 0, "int", "create function zorder_decode_y(z oid) returns integer\n external name zorder.decode_y;" ] [ "sys", "zorder_decode_y", 1, "oid", "" ] -[ "sys", "zorder_encode", 0, "oid", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\ncreate function zorder_encode(x integer, y integer) returns oid\n external name zorder.encode;" ] +[ "sys", "zorder_encode", 0, "oid", "-- 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;" ] [ "sys", "zorder_encode", 1, "int", "" ] [ "sys", "zorder_encode", 2, "int", "" ] diff --git a/sql/test/Tests/systemfunctions_bam.stable.out.int128 b/sql/test/Tests/systemfunctions_bam.stable.out.int128 --- a/sql/test/Tests/systemfunctions_bam.stable.out.int128 +++ b/sql/test/Tests/systemfunctions_bam.stable.out.int128 @@ -58,7 +58,7 @@ Ready. % sys.L3, sys.L3, sys.L3, sys.L3, sys.L3 # table_name % schema, function, argno, argtype, definition # name % varchar, varchar, int, varchar, varchar # type -% 4, 35, 2, 15, 1681 # length +% 4, 35, 2, 15, 1336 # length [ "bam", "bam_drop_file", 0, "bigint", "create procedure bam.bam_drop_file(file_id bigint, dbschema smallint)\nexternal name bam.bam_drop_file;" ] [ "bam", "bam_drop_file", 1, "smallint", "" ] [ "bam", "bam_export", 0, "clob", "create procedure bam.bam_export(output_path string)\nexternal name bam.bam_export;" ] @@ -92,7 +92,7 @@ Ready. [ "json", "filter", 0, "json", "create function json.filter(js json, name bigint)\nreturns json external name json.filter;" ] [ "json", "filter", 1, "json", "" ] [ "json", "filter", 2, "bigint", "" ] -[ "json", "filter", 0, "json", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (co) Martin Kersten\n-- The JSON type comes with a few operators.\n\ncreate function json.filter(js json, name hugeint)\nreturns json external name json.filter;" ] +[ "json", "filter", 0, "json", "-- 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) Martin Kersten\n-- The JSON type comes with a few operators.\n\ncreate function json.filter(js json, name hugeint)\nreturns json external name json.filter;" ] [ "json", "filter", 1, "json", "" ] [ "json", "filter", 2, "hugeint", "" ] [ "json", "integer", 0, "bigint", "create function json.\"integer\"(js json)\nreturns bigint external name json.\"integer\";" ] @@ -182,7 +182,7 @@ Ready. [ "sys", "buffer", 0, "geometry", "create function buffer(a geometry, distance float) returns geometry external name geom.\"Buffer\";" ] [ "sys", "buffer", 1, "geometry", "" ] [ "sys", "buffer", 2, "double", "" ] -[ "sys", "chi2prob", 0, "double", "-- The contents of this file are subject to the MonetDB Public License\n-- Version 1.1 (the \"License\"); you may not use this file except in\n-- compliance with the License. You may obtain a copy of the License at\n-- http://www.monetdb.org/Legal/MonetDBLicense\n--\n-- Software distributed under the License is distributed on an \"AS IS\"\n-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n-- License for the specific language governing rights and limitations\n-- under the License.\n--\n-- The Original Code is the MonetDB Database System.\n--\n-- The Initial Developer of the Original Code is CWI.\n-- Portions created by CWI are Copyright (C) 1997-July 2008 CWI.\n-- Copyright August 2008-2015 MonetDB B.V.\n-- All Rights Reserved.\n\n-- (co) Arjen de Rijke, Bart Scheers\n-- Use statistical functions from gsl library\n\n-- Calculate Chi squared probability\ncreate function sys.chi2prob(chi2 double, datapoints double)\nreturns d ouble external name gsl.\"chi2prob\";" ] +[ "sys", "chi2prob", 0, "double", "-- 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, Bart Scheers\n-- Use statistical functions from gsl library\n\n-- Calculate Chi squared probability\ncreate function sys.chi2prob(chi2 double, datapoints double)\nreturns double external name gsl.\"chi2prob\";" ] [ "sys", "chi2prob", 1, "double", "" ] [ "sys", "chi2prob", 2, "double", "" ] [ "sys", "columnsize", 0, "bigint", "-- 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;" ] @@ -192,6 +192,9 @@ Ready. [ "sys", "contains", 0, "boolean", "create function contains(a geometry, b geometry) returns boolean external name geom.\"Contains\";" ] [ "sys", "contains", 1, "geometry", "" ] [ "sys", "contains", 2, "geometry", "" ] +[ "sys", "convert", 0, "date", "create function \"convert\"(s string, format string) returns date\n\texternal name mtime.\"str_to_date\";" ] +[ "sys", "convert", 1, "clob", "" ] +[ "sys", "convert", 2, "clob", "" ] [ "sys", "convexhull", 0, "geometry", "create function convexhull(a geometry) returns geometry external name geom.\"ConvexHull\";" ] [ "sys", "convexhull", 1, "geometry", "" ] [ "sys", "corr", 0, "tinyint", "create aggregate corr(e1 tinyint, e2 tinyint) returns tinyint\n\texternal name \"aggr\".\"corr\";" ] @@ -225,7 +228,7 @@ Ready. [ "sys", "date_to_str", 1, "date", "" ] [ "sys", "date_to_str", 2, "clob", "" ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list