Re: [sqlalchemy] Re: UNION howto

2014-10-02 Thread jo
It works. Thanks a lot, Jonathan. j Jonathan Vanasco wrote: I asked a similar question a few days ago; it's still on the front page of the group. Mike replied to that and gave some details Your query would be something like: class A(Base):

[sqlalchemy] Working with PostgreSQL functions that operate on selectables

2014-10-02 Thread Jon Rosebaugh
I'm having some trouble with the Postgresql function row_to_json. It's possible to use it on an entire table to turn each row from the table into a JSON object, like select row_to_json(t) as j from some_table as t. You can also use a subselect, and that's where the trouble lies. I want to