6 Jun
2016
6 Jun
'16
8:38 a.m.
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