Re: print executed query

2010-05-04 Thread someone
On 4 Mai, 07:01, Fred C wrote: > On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > > > > > > On Apr 29, 2010, at 12:01 PM, someone wrote: > > >> Hello! > > >> 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

Re: print executed query

2010-05-03 Thread Fred C
On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > On Apr 29, 2010, at 12:01 PM, someone wrote: > >> Hello! >> >> 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? >> >> cursor.execute(query, [id, s

Re: print executed query

2010-05-03 Thread Fred C
On Apr 29, 2010, at 9:49 AM, Philip Semanchuk wrote: > > On Apr 29, 2010, at 12:01 PM, someone wrote: > >> Hello! >> >> 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? >> >> cursor.execute(query, [id, s

Re: print executed query

2010-04-29 Thread someone
On Apr 29, 7:23 pm, Miki 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, >

Re: print executed query

2010-04-29 Thread Miki
> 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-factories HTH, -- Miki http://pythonwise.blogspot.com -- ht

Re: print executed query

2010-04-29 Thread Philip Semanchuk
On Apr 29, 2010, at 12:01 PM, someone wrote: Hello! 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? cursor.execute(query, [id, somestring]) I could print query and values separate, but it would be great,

print executed query

2010-04-29 Thread someone
Hello! 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? cursor.execute(query, [id, somestring]) I could print query and values separate, but it would be great, if I could see how query is constructed and can t