diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-10-15 00:58:32 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2018-10-15 00:58:32 +0100 |
commit | b205764fdde4549c48c27841aa17e6c7f499e808 (patch) | |
tree | 1475eb57dc854ea4a1dc93c1c6a567e6fc584e5c /sandbox/iter.py | |
parent | e7227ce87b8da75fef1a3376ebb47e2bf20f6063 (diff) | |
parent | 7a5edff6c66a0410d6fecd4445980aabafc3ab4a (diff) | |
download | psycopg2-errors-module.tar.gz |
Merge branch 'master' into errors-moduleerrors-module
Diffstat (limited to 'sandbox/iter.py')
-rw-r--r-- | sandbox/iter.py | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/sandbox/iter.py b/sandbox/iter.py deleted file mode 100644 index c8becca..0000000 --- a/sandbox/iter.py +++ /dev/null @@ -1,13 +0,0 @@ -import psycopg2 -import psycopg2.extras - -conn = psycopg2.connect("dbname=test") -curs = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) - -curs.execute("SELECT '2005-2-12'::date AS foo, 'boo!' as bar") -for x in curs.fetchall(): - print(type(x), x[0], x[1], x['foo'], x['bar']) - -curs.execute("SELECT '2005-2-12'::date AS foo, 'boo!' as bar") -for x in curs: - print(type(x), x[0], x[1], x['foo'], x['bar']) |