Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Verite <daniel@manitou-mail.org>,
Jakub Wartak <jakub.wartak@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2023-01-04T17:38:17Z
Lists: pgsql-hackers
On Wed, Jan 4, 2023 at 11:36 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > As you well know, psql's FETCH_COUNT mechanism is far older than > single-row mode. I don't think anyone's tried to transpose it > onto that. I agree that it seems like a good idea to try. > There will be more per-row overhead, but the increase in flexibility > is likely to justify that. Yeah, I was vaguely worried that there might be more per-row overhead, not that I know a lot about this topic. I wonder if there's a way to mitigate that. I'm a bit suspicious that what we want here is really more of an incremental mode than a single-row mode i.e. yeah, you want to fetch rows without materializing the whole result, but maybe not in batches of exactly size one. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Further review for re-implementation of psql's FETCH_COUNT feature.
- c21d4c416ad6 17.0 landed
-
Re-implement psql's FETCH_COUNT feature atop libpq's chunked mode.
- 90f5178211cd 17.0 landed
-
Support retrieval of results in chunks with libpq.
- 4643a2b265e9 17.0 landed
-
Attempt to fix newly added Memoize regression test
- a3a836fb5e51 17.0 cited