[Tutor] Dynamic inserts into postgresql

Peter Brown peterabrown at froggy.com.au
Sat Sep 6 14:38:14 EDT 2003

Dear Tutor,

I feel like a dummy for asking this, but I have been working on it for 2
days without resolution.

I'm using pygresql module pg (not pgdb) to communicate to PostgreSQL I can
connect, open cursor, insert static data, select etc.

But what I can't do is insert data that is not fixed ie using variables. eg
statement = " INSERT INTO target VALUES (a, b)" ; res = db.query(statement)

Any help would be greatly accepted


More information about the Tutor mailing list