For the record and for other people running into the same problem, here's a workaround that kills the cast by wrapping the column in a function that does nothing:
session.query(extract('epoch', func.timestamptz(database.TestTable.ts))) This of course will only work until sqlalchemy learns about all the builtin casts, but for now it's fine. Have a nice day, On Tuesday, June 4, 2013 10:53:22 AM UTC+2, Martijn van Oosterhout wrote: <snip> > I think it's a bug and if people agree I can file one. But is there a > workaround to suppress the cast? > > Thanks in advance, > -- > Martijn van Oosterhout <klep...@gmail.com> > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.