From: | Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com> |
---|---|
To: | Вячеслав Блинников <slavmfm(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Asynchronous queries with callbacks. |
Date: | 2011-01-05 18:11:01 |
Message-ID: | AANLkTin21baDbZSMDNOvxQUtMn+zC4GJyzRY7+qYdMfD@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2011/1/5 Вячеслав Блинников <slavmfm(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Radosław Smogura | 2011-01-05 18:31:37 | Re: UUID column as pimrary key? |
Previous Message | Вячеслав Блинников | 2011-01-05 18:04:43 | Asynchronous queries with callbacks. |