Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Daniel Verite <daniel@manitou-mail.org>
From: "Daniel Verite" <daniel@manitou-mail.org>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers
<pgsql-hackers@postgresql.org>,
Robert Haas <robertmhaas@gmail.com>,
Jakub Wartak <jakub.wartak@enterprisedb.com>
Date: 2023-07-07T17:42:57Z
Lists: pgsql-hackers
Attachments
- psql-fetchcount-single-row-mode-v3.diff (text/x-patch) patch v3
Tom Lane wrote: > This gives me several "-Wincompatible-pointer-types" warnings > [...] > I think what you probably ought to do to avoid all that is to change > the arguments of PrintQueryResult and nearby routines to be "const > PGresult *result" not just "PGresult *result". The const-ness issue that I ignored in the previous patch is that while C is fine with passing T* to a function expecting const T*, it's not okay with passing T** to a function expecting const T**, or more generally converting T** to const T**. When callers need to pass arrays of PGresult* instead of const PGresult*, I've opted to remove the const qualifiers for the functions that are concerned by this change. PFA an updated patch. Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite
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