Changeset: 44fecd92d215 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=44fecd92d215
Added Files:
        sql/test/Tests/table_function.sql.src
        sql/test/table_function.sql
Modified Files:
        sql/test/Tests/All
Branch: default
Log Message:

Table returning functions error
Query 2 and 3 produce MAL type errors
Query 4 prodices a single result instead of 2.


diffs (36 lines):

diff --git a/sql/test/Tests/All b/sql/test/Tests/All
--- a/sql/test/Tests/All
+++ b/sql/test/Tests/All
@@ -81,6 +81,7 @@ coalesce
 round
 rank
 function_syntax
+table_functions
 procedure_syntax
 order_by_simple_exp
 order_by_complex_exp
diff --git a/sql/test/Tests/table_function.sql.src 
b/sql/test/Tests/table_function.sql.src
new file mode 100644
--- /dev/null
+++ b/sql/test/Tests/table_function.sql.src
@@ -0,0 +1,1 @@
+$RELSRCDIR/../tablefunctions.sql
diff --git a/sql/test/table_function.sql b/sql/test/table_function.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/table_function.sql
@@ -0,0 +1,14 @@
+CREATE FUNCTION f1(i int) RETURNS TABLE (j int) BEGIN RETURN TABLE(SELECT i); 
END;
+CREATE FUNCTION f2(i int) RETURNS TABLE (j int) BEGIN RETURN TABLE(SELECT i 
UNION SELECT 2 * i); END;
+CREATE FUNCTION f3(i bigint) RETURNS TABLE (j int) BEGIN RETURN TABLE(SELECT i 
UNION SELECT 2 * i); END;
+CREATE FUNCTION f4(i int) RETURNS TABLE (j int) BEGIN RETURN TABLE(SELECT i 
UNION SELECT i); END;
+
+SELECT * FROM f1(1);
+SELECT * FROM f2(3);
+SELECT * FROM f3(5);
+SELECT * FROM f4(7);
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP FUNCTION f3;
+DROP FUNCTION f4;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to