Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

Alexander Law <exclusion@gmail.com>

From: Alexander Lakhin <exclusion@gmail.com>
To: Daniel Verite <daniel@manitou-mail.org>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, Jakub Wartak <jakub.wartak@enterprisedb.com>
Date: 2024-04-08T15:00:00Z
Lists: pgsql-hackers
Hello Daniel and Tom,

08.04.2024 17:25, Daniel Verite wrote:
>
>> So I whacked the patch around till I liked it better, and pushed it.
> Thanks for taking care of this!

Now that ExecQueryUsingCursor() is gone, it's not clear, what does
the following comment mean:?
    * We must turn off gexec_flag to avoid infinite recursion.  Note that
    * this allows ExecQueryUsingCursor to be applied to the individual query
    * results.

Shouldn't it be removed?

Best regards,
Alexander



Commits

  1. Further review for re-implementation of psql's FETCH_COUNT feature.

  2. Re-implement psql's FETCH_COUNT feature atop libpq's chunked mode.

  3. Support retrieval of results in chunks with libpq.

  4. Attempt to fix newly added Memoize regression test