Re: about client-side cursors - Mailing list psycopg

From Christophe Pettus
Subject Re: about client-side cursors
Date
Msg-id 9E627534-4E82-405E-AC6B-45D73C25989B@thebuild.com
Whole thread Raw
In response to Re: about client-side cursors  (Denis Laxalde <denis.laxalde@dalibo.com>)
List psycopg

> On Feb 4, 2021, at 08:38, Denis Laxalde <denis.laxalde@dalibo.com> wrote:
> Is this related to prepared statements in the extended query protocol?
> (Then, I'd argue that both preparation and execution steps would involve
> IO. But if it's not a cursor, we should use a different name, as
> postgresql doc does.)

No, this is separate from prepared statements or the extended protocol.  You can do single-row returns with either
basicor extended protocol. 

It's unfortunate that cursor as become overloaded, but I think that's something we just have to accept at this point.
Itsounds like the real issue is that it would be convenient to have a single async function that does the semantic
equivalentof: 

curs = connection.cursor()
curs.execute(query, *parameters)
for row in curs.fetchall():
   yield row
curs.close()
--
-- Christophe Pettus
   xof@thebuild.com




psycopg by date:

Previous
From: Denis Laxalde
Date:
Subject: Re: about client-side cursors
Next
From: Daniele Varrazzo
Date:
Subject: Latest developments in psycopg3