I'm going to say it outright I don't think this should be supported. I don't think this should be considered a backwards compatibility problem, because you're not using the DAL API you're just sending SQL in a string. If you put that "GROUP_CONCAT" in a pyDAL Expression and that doesn't work then I would agree it's a problem. Try this:
from pydal.objects import Expression dialect = db._adapter.dialect def group_concat(first, second, query_env={}): return "GROUP_CONCAT(%s, '%s')" % (dialect.expand(first, query_env), second) rischi_della_mansione = Expression(db, group_concat, db.RISCHI.id, ', ', 'string') We need to define that the proper way to put custom SQL mixed with DAL code is using Expression and document how to use it. SQL in strings isn't acceptable, for that you use executesql. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.