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 1655990.1712076614@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  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> Updated patches are attached.

I started to look through this, and almost immediately noted

- <sect1 id="libpq-single-row-mode">
-  <title>Retrieving Query Results Row-by-Row</title>
+ <sect1 id="libpq-chunked-results-modes">
+  <title>Retrieving Query Results in chunks</title>

This is a bit problematic, because changing the sect1 ID will
change the page's URL, eg

https://www.postgresql.org/docs/current/libpq-single-row-mode.html

Aside from possibly breaking people's bookmarks, I'm pretty sure this
will cause the web docs framework to not recognize any cross-version
commonality of the page.  How ugly would it be if we left the ID
alone?  Another idea could be to leave the whole page alone and add
a new <sect1> for chunked mode.

But ... TBH I'm not convinced that we need the chunked mode at all.
We explicitly rejected that idea back when single-row mode was
designed, see around here:

https://www.postgresql.org/message-id/flat/50173BF7.1070801%40Yahoo.com#7f92ebad0143fb5f575ecb3913c5ce88

and I'm still very skeptical that there's much win to be had.
I do not buy that psql's FETCH_COUNT mode is a sufficient reason
to add it.  FETCH_COUNT mode is not something you'd use
non-interactively, and there is enough overhead elsewhere in psql
(notably in result-set formatting) that it doesn't seem worth
micro-optimizing the part about fetching from libpq.

(I see that there was some discussion in that old thread about
micro-optimizing single-row mode internally to libpq by making
PGresult creation cheaper, which I don't think anyone ever got
back to doing.  Maybe we should resurrect that.)

            regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: On disable_cost
Следующее
От: Tom Lane
Дата:
Сообщение: Re: On disable_cost