Re: Asynchronous queries with callbacks.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Asynchronous queries with callbacks.
Дата
Msg-id AANLkTin21baDbZSMDNOvxQUtMn+zC4GJyzRY7+qYdMfD@mail.gmail.com
обсуждение исходный текст
Ответ на Asynchronous queries with callbacks.  (Вячеслав Блинников <slavmfm@gmail.com>)
Список pgsql-general
2011/1/5 Вячеслав Блинников <slavmfm@gmail.com>:
> I intended to put queries into queue (along with callback and param data)
> and after fetching each result via "PQgetResult()" obtain callback and param
> from the queue, but documentation says that "PQexec can return only one
> PGresult structure. If the submitted query string contains multiple SQL
> commands, all but the last PGresult are discarded by PQexec." so it is
> impossible to organize a queries queue because some queries will return more
> than one results and it will shift the "callbacks and params" queue.
> Is it possible to implement? Or there is only one way - send queries
> one-by-one?

I suggest you take a look at libpqxx's pipeline class.


--
Regards,
Peter Geoghegan

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

Предыдущее
От: Вячеслав Блинников
Дата:
Сообщение: Asynchronous queries with callbacks.
Следующее
От: Вячеслав Блинников
Дата:
Сообщение: Asynchronous queries with bound data.