diff options
author | Federico Di Gregorio <fog@initd.org> | 2005-10-25 15:35:11 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2005-10-25 15:35:11 +0000 |
commit | ed23aeb37ca705c398078d5a40c1cddd7524811a (patch) | |
tree | 3f9b89c3624b7138710704cf983cacb4d86a0924 /examples/fetch.py | |
parent | ef3430d24f3a1580a994e6dec8b5926a752efaed (diff) | |
download | psycopg2-ed23aeb37ca705c398078d5a40c1cddd7524811a.tar.gz |
named cursors are working.
Diffstat (limited to 'examples/fetch.py')
-rw-r--r-- | examples/fetch.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/fetch.py b/examples/fetch.py index 67818d2..dab0a41 100644 --- a/examples/fetch.py +++ b/examples/fetch.py @@ -54,8 +54,9 @@ conn.commit() # (remember to always commit or rollback before a DECLARE) # # we don't need to DECLARE ourselves, psycopg now support named -# cursor (but we leave the code here, comments, as an example of +# cursors (but we leave the code here, comments, as an example of # what psycopg is doing under the hood) +# #curs.execute("DECLARE crs CURSOR FOR SELECT * FROM test_fetch") #curs.execute("FETCH 10 FROM crs") #print "First 10 rows:", flatten(curs.fetchall()) |