On 2010-2-11 12:13, Chris Withers wrote:
Hi All,

How can I get the actual sql executed by a:

session.execute(sql,subs)

?

I tried turning on echo in the engine, but that just shows %s where the
substitutions should happen.

Is there any way to get the post-substitution sql?

SQLAlchemy does not do the substitutions, the DB-API driver does that. So you'll need to look at your database driver to see if that supports logging of commands. You can make postgres log all its commands, perhaps that is an option for you.

Wichert.


--
Wichert Akkerman <wich...@wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.

--
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to