Done! Stefano
On 06 Jun 2016, at 10:43, Stefan Manegold
wrote: Dear Stefano,
a segfault is always a bug. Please file a bug report via http://bugs.monetdb.org/
Thanks! Stefan
----- On Jun 6, 2016, at 10:38 AM, Stefano Fioravanzo fioravanzos@gmail.com wrote:
Hello,
I am trying to execute a loopback query in embedded python:
CREATE FUNCTION myfunc() RETURNS TABLE(n STRING) LANGUAGE PYTHON { res = _conn.execute("SELECT max(d) FROM mytable;")
result = dict() result['n'] = str(res) return result };
When accessing the object ‘res’, mserver5 outputs ‘segmentation fault’ and exits. I think that the issue is in using the max() function in the query, if I leave that out everything works fine. The function:
CREATE FUNCTION myfunc() RETURNS TABLE(n STRING) LANGUAGE PYTHON { res = _conn.execute("SELECT d FROM mytable;")
result = dict() result['n'] = str(res) return result };
outputs a correct dictionary.
Stefano _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) | _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list