[sqlalchemy] Fwd: Query produced by SA runs in Postgres, but error in SA

2012-03-07 Thread Kirk Holland
Hi there, I have code that does this: Session.query(Region). \ filter(Region.deleted==False). \ filter(Region.region_id.in_(from_statement_query)) Where from_statement_query is explicit SQL that returns only a region id. The SQL that is produced by this code looks like: SELECT

Re: [sqlalchemy] Fwd: Query produced by SA runs in Postgres, but error in SA

2012-03-07 Thread Michael Bayer
On Mar 7, 2012, at 10:39 AM, Kirk Holland wrote: Hi there, I have code that does this: Session.query(Region). \ filter(Region.deleted==False). \ filter(Region.region_id.in_(from_statement_query)) Where from_statement_query is explicit SQL that returns only a region id. The SQL

Re: [sqlalchemy] Fwd: Query produced by SA runs in Postgres, but error in SA

2012-03-07 Thread Kirk Holland
Yes, you're right. Another developer was responsible for the under the hood configuration of the UDID type, so I wasn't aware of the need to coerce it in my case. Coercing the UDID into a string as a parameter to the from_statement works fine. Thanks for help. Kirk On 8 March 2012 04:20,