summaryrefslogtreecommitdiff
path: root/examples/cursor.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/cursor.py
parentc639b92bd9c277c5504fee6cc38bd8d94414e9b1 (diff)
downloadpsycopg2-9316c6af537b17d3ecfc70b81aa9183a7023a99b.tar.gz
Optimizations to type casting (in preparation to array support.)
Diffstat (limited to 'examples/cursor.py')
-rw-r--r--examples/cursor.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/cursor.py b/examples/cursor.py
index 2205278..607ce18 100644
--- a/examples/cursor.py
+++ b/examples/cursor.py
@@ -26,7 +26,6 @@ if len(sys.argv) > 1:
DSN = sys.argv[1]
print "Opening connection using dsn:", DSN
-
conn = psycopg.connect(DSN)
print "Encoding for this connection is", conn.encoding
@@ -51,7 +50,7 @@ class Cursor(psycopg.extensions.cursor):
raise NoDataError("no more data")
return d
-curs = conn.cursor(factory=Cursor)
+curs = conn.cursor(cursor_factory=Cursor)
curs.execute("SELECT 1 AS foo")
print "Result of fetchone():", curs.fetchone()