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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Дата
Msg-id 2631427.1712451236@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs
Список pgsql-hackers
So what was really bothering me about this patchset was that I
didn't think marginal performance gains were a sufficient reason
to put a whole different operating mode into libpq.  However,
I've reconsidered after realizing that implementing FETCH_COUNT
atop traditional single-row mode would require either merging
single-row results into a bigger PGresult or persuading psql's
results-printing code to accept an array of PGresults not just
one.  Either of those would be expensive and ugly, not to mention
needing chunks of code we don't have today.

Also, it doesn't really need to be a whole different operating mode.
There's no reason that single-row mode shouldn't be exactly equivalent
to chunk mode with chunk size 1, except for the result status code.
(We've got to keep PGRES_SINGLE_TUPLE for the old behavior, but
using that for a chunked result would be too confusing.)

So I whacked the patch around till I liked it better, and pushed it.
I hope my haste will not come back to bite me, but we are getting
pretty hard up against the feature-freeze deadline.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Cluster::restart dumping logs when stop fails
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Streaming read-ready sequential scan code