Changeset: 8b0d85cd9058 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b0d85cd9058
Modified Files:
clients/Tests/SQL-dump.sql
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.int128
Branch: Jul2015
Log Message:
Updated test with current list of SQL functions.
diffs (truncated from 390 to 300 lines):
diff --git a/clients/Tests/SQL-dump.sql b/clients/Tests/SQL-dump.sql
--- a/clients/Tests/SQL-dump.sql
+++ b/clients/Tests/SQL-dump.sql
@@ -52,7 +52,7 @@
\dSv sys.tracelog
\dSv sys.users
--- select distinct name from sys.functions where sql = true order by name;
+-- select distinct '\\dSf ' || s.name || '.' || f.name from sys.functions f,
sys.schemas s where f.language between 1 and 2 and f.schema_id = s.id order and
s.name = 'sys' by s.name, f.name;
\dSf sys.Intersect
\dSf sys.Union
\dSf sys.abbrev
@@ -65,8 +65,7 @@
\dSf sys.broadcast
\dSf sys.buffer
\dSf sys.chi2prob
-\dSf sys.cluster1
-\dSf sys.cluster2
+\dSf sys.clearrejects
\dSf sys.columnsize
\dSf sys.contains
\dSf sys.convexhull
@@ -99,8 +98,11 @@
\dSf sys.env
\dSf sys.envelope
\dSf sys.environment
+\dSf sys.epoch
\dSf sys.equals
\dSf sys.evalalgebra
+\dSf sys.fitsattach
+\dSf sys.fitsload
\dSf sys.fuse
\dSf sys.generate_series
\dSf sys.geomcollectionfromtext
@@ -130,9 +132,13 @@
\dSf sys.isauuid
\dSf sys.isempty
\dSf sys.issimple
+\dSf sys.left_shift
+\dSf sys.left_shift_assign
\dSf sys.length
\dSf sys.like
\dSf sys.linefromtext
+\dSf sys.listdir
+\dSf sys.listdirpat
\dSf sys.masklen
\dSf sys.mbr
\dSf sys.mbroverlaps
@@ -145,6 +151,8 @@
\dSf sys.ms_str
\dSf sys.ms_stuff
\dSf sys.ms_trunc
+\dSf sys.netcdf_attach
+\dSf sys.netcdf_importvar
\dSf sys.netmask
\dSf sys.network
\dSf sys.newurl
@@ -157,6 +165,8 @@
\dSf sys.pointfromtext
\dSf sys.polyfromtext
\dSf sys.polygonfromtext
+\dSf sys.profiler_openstream
+\dSf sys.profiler_stethoscope
\dSf sys.quantile
\dSf sys.querycache
\dSf sys.querylog
@@ -167,10 +177,13 @@
\dSf sys.querylog_enable
\dSf sys.queue
\dSf sys.radians
+\dSf sys.rejects
\dSf sys.relate
\dSf sys.resume
\dSf sys.reuse
\dSf sys.reverse
+\dSf sys.right_shift
+\dSf sys.right_shift_assign
\dSf sys.sessions
\dSf sys.setmasklen
\dSf sys.setsession
@@ -185,9 +198,13 @@
\dSf sys.storagemodel
\dSf sys.storagemodelinit
\dSf sys.str_to_date
+\dSf sys.str_to_time
+\dSf sys.str_to_timestamp
\dSf sys.symdifference
\dSf sys.text
+\dSf sys.time_to_str
\dSf sys.times
+\dSf sys.timestamp_to_str
\dSf sys.touches
\dSf sys.tracelog
\dSf sys.uuid
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
@@ -504,6 +504,8 @@ create function buffer(a geometry, dista
-- Calculate Chi squared probability
create function sys.chi2prob(chi2 double, datapoints double)
returns double external name gsl."chi2prob";
+create procedure sys.clearrejects()
+external name sql.copy_rejects_clear;
-- The predicted storage footprint of the complete database
-- determines the amount of diskspace needed for persistent storage
-- and the upperbound when all possible index structures are created.
@@ -652,10 +654,27 @@ create function envelope(g geometry) ret
create function sys.environment()
returns table ("name" string, value string)
external name sql.sql_environment;
+-- This Source Code Form is subject to the terms of the Mozilla Public
+-- 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.
+
+-- assume milliseconds when converted to TIMESTAMP
+create function sys."epoch"(sec bigint) returns timestamp
+ external name timestamp."epoch";
+create function sys."epoch"(sec int) returns timestamp
+ external name timestamp."epoch";
+create function sys."epoch"(ts timestamp) returns int
+ external name timestamp."epoch";
+create function sys."epoch"(ts timestamp with time zone) returns int
+ external name timestamp."epoch";
-- ogc spatial relation methods
create function equals(a geometry, b geometry) returns boolean external name
geom."Equals";
create procedure sys.evalalgebra( ra_stmt string, opt bool)
external name sql."evalAlgebra";
+create procedure fitsattach(fname string) external name fits.attach;
+create procedure fitsload(tname string) external name fits.load;
-- fuse two (1-byte) tinyint values into one (2-byte) smallint value
create function fuse(one tinyint, two tinyint)
returns smallint external name udf.fuse;
@@ -792,6 +811,10 @@ create function sys.isauuid(u string)
returns uuid external name uuid."isaUUID";
create function isempty(g geometry) returns boolean external name
geom."IsEmpty";
create function issimple(g geometry) returns boolean external name
geom."IsSimple";
+create function "left_shift"(i1 inet, i2 inet) returns boolean
+ external name inet."<<";
+create function "left_shift_assign"(i1 inet, i2 inet) returns boolean
+ external name inet."<<=";
create function length(g geometry) returns float external name geom."Length";
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -802,6 +825,10 @@ create function length(g geometry) retur
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";
create function linefromtext(wkt string, srid smallint) returns linestring
external name geom."LineFromText";
+
+
+create procedure listdir(dirname string) external name fits.listdir;
+create procedure listdirpat(dirname string,pat string) external name
fits.listdirpattern;
create function "masklen" (p inet) returns int
external name inet."masklen";
-- currently we only use mbr instead of
@@ -885,6 +912,17 @@ end;
create function ms_trunc(num double, prc int)
returns double
external name sql.ms_trunc;
+-- gr_name is "GLOBAL" or "ROOT" for classic NetCDF files
+-- used for groups in HDF5 files
+-- global attributes have obj_name=""
+
+-- create function netcdfvar (fname varchar(256))
+-- returns int external name netcdf.test;
+
+create procedure netcdf_attach(fname varchar(256))
+ external name netcdf.attach;
+create procedure netcdf_importvar(fid integer, varnname varchar(256))
+ external name netcdf.importvariable;
create function "netmask" (p inet) returns inet
external name inet."netmask";
create function "network" (p inet) returns inet
@@ -930,6 +968,8 @@ create function pointfromtext(wkt string
create function polyfromtext(wkt string, srid smallint) returns polygon
external name geom."PolyFromText";
-- alias
create function polygonfromtext(wkt string, srid smallint) returns polygon
external name geom."PolyFromText";
+create procedure profiler_openstream(host string, port int) external name
profiler."openStream";
+create procedure profiler_stethoscope(ticks int) external name
profiler.stethoscope;
create aggregate quantile(val tinyint, q double) returns tinyint
external name "aggr"."quantile";
create aggregate quantile(val smallint, q double) returns smallint
@@ -1045,6 +1085,22 @@ external name sql.sysmon_queue;
create function radians(d double)
returns double
return d*pi()/180;
+-- This Source Code Form is subject to the terms of the Mozilla Public
+-- 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.
+
+-- COPY into reject management
+
+create function sys.rejects()
+returns table(
+ rowid bigint,
+ fldid int,
+ "message" string,
+ "input" string
+)
+external name sql.copy_rejects;
create function relate(a geometry, b geometry, pattern string) returns boolean
external name geom."Relate";
create procedure sys.resume(tag int)
external name sql.sysmon_resume;
@@ -1064,6 +1120,10 @@ create procedure reuse(sys string, tab s
-- Reverse a string
create function reverse(src string)
returns string external name udf.reverse;
+create function "right_shift"(i1 inet, i2 inet) returns boolean
+ external name inet.">>";
+create function "right_shift_assign"(i1 inet, i2 inet) returns boolean
+ external name inet.">>=";
create function sys.sessions()
returns table("user" string, "login" timestamp, "sessiontimeout" bigint,
"lastcommand" timestamp, "querytimeout" bigint, "active" bool)
external name sql.sessions;
@@ -1240,9 +1300,15 @@ end;
create function str_to_date(s string, format string) returns date
external name mtime."str_to_date";
+create function str_to_time(s string, format string) returns time
+ external name mtime."str_to_time";
+create function str_to_timestamp(s string, format string) returns timestamp
+ external name mtime."str_to_timestamp";
create function symdifference(a geometry, b geometry) returns geometry
external name geom."SymDifference";
create function "text" (p inet) returns clob
external name inet."text";
+create function time_to_str(d time, format string) returns string
+ external name mtime."time_to_str";
-- This Source Code Form is subject to the terms of the Mozilla Public
-- 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/.
@@ -1254,6 +1320,8 @@ create function "text" (p inet) returns
create procedure times()
external name sql.times;
+create function timestamp_to_str(d timestamp, format string) returns string
+ external name mtime."timestamp_to_str";
create function touches(a geometry, b geometry) returns boolean external name
geom."Touches";
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/clients/Tests/SQL-dump.stable.out.int128
b/clients/Tests/SQL-dump.stable.out.int128
--- a/clients/Tests/SQL-dump.stable.out.int128
+++ b/clients/Tests/SQL-dump.stable.out.int128
@@ -500,6 +500,8 @@ create function buffer(a geometry, dista
-- Calculate Chi squared probability
create function sys.chi2prob(chi2 double, datapoints double)
returns double external name gsl."chi2prob";
+create procedure sys.clearrejects()
+external name sql.copy_rejects_clear;
-- The predicted storage footprint of the complete database
-- determines the amount of diskspace needed for persistent storage
-- and the upperbound when all possible index structures are created.
@@ -650,10 +652,27 @@ create function envelope(g geometry) ret
create function sys.environment()
returns table ("name" string, value string)
external name sql.sql_environment;
+-- This Source Code Form is subject to the terms of the Mozilla Public
+-- 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.
+
+-- assume milliseconds when converted to TIMESTAMP
+create function sys."epoch"(sec bigint) returns timestamp
+ external name timestamp."epoch";
+create function sys."epoch"(sec int) returns timestamp
+ external name timestamp."epoch";
+create function sys."epoch"(ts timestamp) returns int
+ external name timestamp."epoch";
+create function sys."epoch"(ts timestamp with time zone) returns int
+ external name timestamp."epoch";
-- ogc spatial relation methods
create function equals(a geometry, b geometry) returns boolean external name
geom."Equals";
create procedure sys.evalalgebra( ra_stmt string, opt bool)
external name sql."evalAlgebra";
+create procedure fitsattach(fname string) external name fits.attach;
+create procedure fitsload(tname string) external name fits.load;
-- fuse two (1-byte) tinyint values into one (2-byte) smallint value
create function fuse(one tinyint, two tinyint)
returns smallint external name udf.fuse;
@@ -816,6 +835,10 @@ create function sys.isauuid(u string)
returns uuid external name uuid."isaUUID";
create function isempty(g geometry) returns boolean external name
geom."IsEmpty";
create function issimple(g geometry) returns boolean external name
geom."IsSimple";
+create function "left_shift"(i1 inet, i2 inet) returns boolean
+ external name inet."<<";
+create function "left_shift_assign"(i1 inet, i2 inet) returns boolean
+ external name inet."<<=";
create function length(g geometry) returns float external name geom."Length";
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -826,6 +849,10 @@ create function length(g geometry) retur
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";
create function linefromtext(wkt string, srid smallint) returns linestring
external name geom."LineFromText";
+
+
+create procedure listdir(dirname string) external name fits.listdir;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list