From: | Christophe Pettus <xof(at)thebuild(dot)com> |
---|---|
To: | Denis Laxalde <denis(dot)laxalde(at)dalibo(dot)com> |
Cc: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, psycopg(at)postgresql(dot)org |
Subject: | Re: about client-side cursors |
Date: | 2021-02-04 16:44:31 |
Message-ID: | 9E627534-4E82-405E-AC6B-45D73C25989B@thebuild.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
> On Feb 4, 2021, at 08:38, Denis Laxalde <denis(dot)laxalde(at)dalibo(dot)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 basic or extended protocol.
It's unfortunate that cursor as become overloaded, but I think that's something we just have to accept at this point. It sounds like the real issue is that it would be convenient to have a single async function that does the semantic equivalent of:
curs = connection.cursor()
curs.execute(query, *parameters)
for row in curs.fetchall():
yield row
curs.close()
--
-- Christophe Pettus
xof(at)thebuild(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Daniele Varrazzo | 2021-02-04 16:55:21 | Latest developments in psycopg3 |
Previous Message | Denis Laxalde | 2021-02-04 16:38:52 | Re: about client-side cursors |