Re: about client-side cursors

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: about client-side cursors
Дата
Msg-id 3BA6B9FE-9A00-4F04-9C0B-263EE4301985@thebuild.com
обсуждение исходный текст
Ответ на Re: about client-side cursors  (Denis Laxalde <denis.laxalde@dalibo.com>)
Ответы Re: about client-side cursors  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Re: about client-side cursors  (Denis Laxalde <denis.laxalde@dalibo.com>)
Список psycopg

> On Feb 4, 2021, at 07:02, Denis Laxalde <denis.laxalde@dalibo.com> wrote:
>
> If "cursor" is a real database cursor, I agree.

But it's not just CURSORs that have this behavior.  libpq allows the client to the send the query, and then make
separaterequests for each row, even without a database cursor; this maps almost exactly to .execute() and .fetchone().
Itdoesn't seem a good idea to guarantee forever that .execute() will *never* do I/O without a database-side cursor. 

Having a single convenience method on the connection object that does the equivalent of a .execute() and a .fetchall()
mightbe useful, though. 
--
-- Christophe Pettus
   xof@thebuild.com




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

Предыдущее
От: Denis Laxalde
Дата:
Сообщение: Re: about client-side cursors
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: about client-side cursors