Re: Streaming LIBPQ? Sliding Window in LIBPQ?

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Streaming LIBPQ? Sliding Window in LIBPQ?
Дата
Msg-id b42b73150711280932h4106a4b6pfa8ef2e7a8a13dc@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Streaming LIBPQ? Sliding Window in LIBPQ?  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
On Nov 28, 2007 10:51 AM, Martijn van Oosterhout <kleptog@svana.org> wrote:
> The trick was to set non-blocking mode and send an async query. Then
> PQisBusy() would return false when any data had been received, not just
> when all data had been received. At that point you could call
> PQgetResult to get those rows. You would get a zero-length result when
> you reached the end of data.
>
> Admittedly, I havn't tested it on recent versions. The program I posted
> a while back that tested if the locks blocked as documented drove two
> connections simultaneously this way.
>
> http://archives.postgresql.org/pgsql-hackers/2005-08/msg01073.php
> http://archives.postgresql.org/pgsql-general/2006-07/msg00806.php

aiui, PQgetResult does not allow streaming of partial results. it does
however allow returning multiple results for multiple queries sent in
a batch...so, a 'kinda sorta' streaming could be rigged in certain
cases if the big query could be split to multiple queries and chained.
 pulling back and using a piece of a single result is not possible,
and never has been.  also, there is always the cursor technique which
i only find appealing in very special circumstances.

merlin

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

Предыдущее
От: mgainty@hotmail.com
Дата:
Сообщение: Re: PostgresSQL vs. Informix
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Linux v.s. Mac OS-X Performance