pgdb.py fetching same row multiple times

Поиск
Список
Период
Сортировка
От Andrew Kuchling
Тема pgdb.py fetching same row multiple times
Дата
Msg-id E14kAbM-0000uW-00@ute.cnri.reston.va.us
обсуждение исходный текст
Список pgsql-interfaces
With the 7.1RC1 code, plus two unrelated fixes to pgdb.py that are in
the CVS, the .fetch() method of pgdbCursor always returns the first
row, not each successive row.  For example, this test program:

import pgdb
db = pgdb.connect('ute.cnri.reston.va.us:mems:akuchlin')

c = db.cursor()
c.execute('select * from fab_providers')
print c.fetchone()
print c.fetchone()
db.close()

will print the same row twice:

ute akuchlin>python /tmp/t.py
['CNF', 'Cornell Nanofabrication Facility', ... ]
['CNF', 'Cornell Nanofabrication Facility', ... ]
ute akuchlin>

The first column is a primary key, so the table doesn't actually
contain two duplicate rows.  

Has anyone else noted this?  Anyone have a fix?

(Note that this doesn't apply to the basic interface implemented by
pgmodule.c; the problem is only with the pgdb.py wrapper to provide a
DB-API interface.)

--amk




В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Grant
Дата:
Сообщение: Re: [PHP] postgresql array with PHP
Следующее
От: Jerry Asher
Дата:
Сообщение: trouble finding the object method driver....