Simple question that probably has a very simple answer. I am writing date strings of the format "2012-06-10" to a TEXT column from a Python script.
e.g.
cur.execute("CREATE TABLE tbl(date TEXT, ...)")
cur.execute('INSERT INTO tbl VALUES(%s)' % (str(date[i])), ...)
The script is actually evaluating the date string, so "2012-06-10" gets written into the table as "1996". From reading the docs, I'm guessing this has something to do with type affinity, but I can't figure how to override or even why the string would be evaluated.