DROP FUNCTION test(text); CREATE FUNCTION test(a text) RETURNS table(SOMEFIELD date) BEGIN IF a is NULL THEN return table( select cast(sdate as date) from quotes limit 10 ); ELSE return table( select cast(sdate as date) from quotes limit 10 ); END IF; END;
-- ****** OR ******
CREATE FUNCTION test(a text) RETURNS table(SOMEFIELD double) BEGIN declare table t(f double); select 0.0 into t; return t; END;-- ****** OR ******CREATE FUNCTION test(a text) RETURNS table(SOMEFIELD double) BEGIN declare table t(f double); set t = table (select 0.0); return t; END;
When submit (not even execute) -> segfault
Bug: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3699
Thanks,
Vasili