On Wed, Jan 4, 2023 at 10:22 AM Daniel Verite <dan...@manitou-mail.org> wrote: > A solution would be for psql to use PQsetSingleRowMode() to retrieve > results row-by-row, as opposed to using a cursor, and then allocate > memory for only FETCH_COUNT rows at a time. Incidentally it solves > other problems like queries containing multiple statements, that also > fail to work properly with cursors, or UPDATE/INSERT... RETURNING.. on > large number of rows that could also benefit from pagination in > memory.
Is there any reason that someone hasn't, like, already done this? Because if there isn't, we should really do this. And if there is, like say that it would hurt performance or something, then we should come up with a fix for that problem and then do something like this. -- Robert Haas EDB: http://www.enterprisedb.com