From: Karsten H. <Kar...@gm...> - 2003-06-26 20:07:36
|
Dear all, suppose I want to find occurrences of "test" in a column "data" in a table "testtable". SQL would be: select * from testtable where data='test'; Rewriting that for use with pyPgSQL: query = "select * from testtable where data=%s;" arg = "test" curs.execute(query, arg) Right ? However, this will produce the query: select * from testtable where data='test;' which is wrong. Is this a bug or am I not using pyPgSQL properly (if so it needs to be in the docs) ? Thanks, Karsten PS: I do know how to rewrite the query so it works. I am just wondering about the above behaviour. -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 |