Re: libpq - lack of support to set the fetch size

Поиск
Список
Период
Сортировка
От Marko Kreen
Тема Re: libpq - lack of support to set the fetch size
Дата
Msg-id 20140312093001.GA13049@gmail.com
обсуждение исходный текст
Ответ на Re: libpq - lack of support to set the fetch size  (matshyeq <matshyeq@gmail.com>)
Ответы Re: libpq - lack of support to set the fetch size  (matshyeq <matshyeq@gmail.com>)
Список pgsql-general
On Tue, Mar 11, 2014 at 12:39:12PM +0000, matshyeq wrote:
> - when using PQsetSingleRowMode() function - does it give an option to
> define how many rows to cache on client's side (like JDBC setFetchSize()
> does) or leaves it at pqlib's discretion?

This option would not make sense as you are not "fetching" anything,
full resultset is being streamed from server over TCP connection.

> - is it/would it be possible to add corresponding option to pgAdmin to
> limit initially (and each subsequently) returned rows in Query Tool by
> custom defined max value?

It could close connection in the middle of resultset but that seems like
bad idea.  LIMIT N or FETCH N are better for such task.

--
marko



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

Предыдущее
От: Peter Mogensen
Дата:
Сообщение: Re: Plan rows - 1 or many
Следующее
От: Marko Kreen
Дата:
Сообщение: Re: libpq - lack of support to set the fetch size