Re: Multiple queries in transit

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Multiple queries in transit
Дата
Msg-id CAHyXU0yPOqDfnbej+JNLBBYNaPJgduB3PGWTBTrSJu4doGgr8w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Multiple queries in transit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Multiple queries in transit
Список pgsql-hackers
On Mon, Oct 31, 2011 at 12:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> On 31.10.2011 17:44, Mark Hills wrote:
>>> Could libpq be reasonably modified to allow this?
>
>> I believe it's doable in theory, no-one has just gotten around to it.
>> Patches are welcome.
>
> Can't you do that today with a multi-command string submitted to
> PQsendQuery, followed by multiple calls to PQgetResult?

Multi command string queries don't support parameterization.  The way
I do it is to keep an application managed stack of data (as an array
of record types) to send that is accumulated when the last stack is in
transit.  Then when the last response comes in you repeat.

Of course, if you could parameterize a multi command string statement,
that might be a better way to go.

merlin


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Multiple queries in transit
Следующее
От: Mark Hills
Дата:
Сообщение: Re: Multiple queries in transit