print executed query

someone petshmidt at googlemail.com
Thu Apr 29 20:44:55 CEST 2010


On Apr 29, 7:23 pm, Miki <miki.teb... at gmail.com> wrote:
> > Is there a way to print a query for logging purpose as it was or will
> > be sent to database, if I don't escape values of query by myself?
> > ...
> > Im using psycopg2, btw
>
> http://initd.org/psycopg/docs/advanced.html#connection-and-cursor-fac...
>
> HTH,
> --
> Mikihttp://pythonwise.blogspot.com

thanks, I'm already passing  cursor_factory=RealDictCursor for results
as dicts. Will try combine both.



More information about the Python-list mailing list