On Thu, 2007-10-18 at 19:53 +0200, Hrvoje Niksic wrote:
> Don't
> forget to also use a bind variable, something like:
> 
> cursor.execute("INSERT INTO cache2 VALUES (?)", a)

I second the advice, but that code won't work. The bind parameters must
be a sequence, and psycopg2 (unfortunately) uses %s for parameter
markers, instead of the SQL standard question mark. So the actual code
would be

cursor.execute("INSERT INTO cache2 VALUES (%s)", (a,) )

HTH,

-- 
Carsten Haese
http://informixdb.sourceforge.net


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to