[snip] On 14/02/11 15:49, William Dode wrote: > I would like to see the query after the binding. For example with > msaccess "insert into t (a), (?)", (True,) will insert -1 with > postgresql it will insert 1 > > Also i would like to can copy and paste the query for debugging. For > example with msaccess, if a field is misswritted the error will not show > wich field is it. If i copy-paste it on msaccess it will say me wich > field is it. > > I thought maybe ado could show me this. If not i will do it by hand for > debugging and of course use the params for the real query.
If the python library sends the query+parameters you can't because it is the backend that will build the final query. Currently psycopg does all argument escaping and quoting on the client so we have the final query ready for inspection. Anyway, if the client library sends query+parameters to the backend it is possible to build a "fake" query for logging/debugging purpuse. For example, we plan to move psycopg .executemany() to prepared queries and even in that case .mogrify() will return the full query, but in that case it will be not the one we sent to the db. federico -- Federico Di Gregorio f...@initd.org There's no greys, only white that's got grubby. I'm surprised you don't know that. And sin, young man, is when you treat people as things. Including yourself. -- Granny Weatherwax
signature.asc
Description: OpenPGP digital signature
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig