summaryrefslogtreecommitdiff
path: root/examples/threads.py
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2005-03-12 06:39:47 +0000
committerFederico Di Gregorio <fog@initd.org>2005-03-12 06:39:47 +0000
commit9316c6af537b17d3ecfc70b81aa9183a7023a99b (patch)
tree197c635da0a0ed590f891707572b083e71af5e6c /examples/threads.py
parentc639b92bd9c277c5504fee6cc38bd8d94414e9b1 (diff)
downloadpsycopg2-9316c6af537b17d3ecfc70b81aa9183a7023a99b.tar.gz
Optimizations to type casting (in preparation to array support.)
Diffstat (limited to 'examples/threads.py')
-rw-r--r--examples/threads.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/threads.py b/examples/threads.py
index ca67104..d4b4fb2 100644
--- a/examples/threads.py
+++ b/examples/threads.py
@@ -81,7 +81,7 @@ def insert_func(conn_or_pool, rows):
conn = conn_or_pool.getconn()
c = conn.cursor()
try:
- c.execute("INSERT INTO test_threads VALUES (%s, %d, %f)",
+ c.execute("INSERT INTO test_threads VALUES (%s, %s, %s)",
(str(i), i, float(i)))
except psycopg.ProgrammingError, err:
print name, ": an error occurred; skipping this insert"