On 14-02-2011, Federico Di Gregorio wrote: > This is an OpenPGP/MIME signed message (RFC 2440 and 3156) > --===============1638910873== > Content-Type: multipart/signed; micalg=pgp-sha1; > protocol="application/pgp-signature"; > boundary="------------enig8B948CD4F063A9F68C5802DF" > > This is an OpenPGP/MIME signed message (RFC 2440 and 3156) > --------------enig8B948CD4F063A9F68C5802DF > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: quoted-printable > > [snip] > On 14/02/11 15:49, William Dode wrote: >> I would like to see the query after the binding. For example with=20 >> msaccess "insert into t (a), (?)", (True,) will insert -1 with=20 >> postgresql it will insert 1 >>=20 >> Also i would like to can copy and paste the query for debugging. For=20 >> example with msaccess, if a field is misswritted the error will not sho= > w=20 >> wich field is it. If i copy-paste it on msaccess it will say me wich=20 >> field is it. >>=20 >> I thought maybe ado could show me this. If not i will do it by hand for= >=20 >> 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.
I understand, i will do myself a fake query for logging/debugging... -- William Dodé - http://flibuste.net Informaticien Indépendant _______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig