Re: Anyone have example C code for Asynchronous Command Processing?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Anyone have example C code for Asynchronous Command Processing?
Дата
Msg-id 4165.1078761060@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Anyone have example C code for Asynchronous Command Processing?  (reina_ga@hotmail.com (Tony Reina))
Ответы Re: Anyone have example C code for Asynchronous Command Processing?  ("Marcus Andree S. Magalhaes" <marcus.magalhaes@vlinfo.com.br>)
Список pgsql-novice
reina_ga@hotmail.com (Tony Reina) writes:
> I'm using libpq to dump some text files into a PostgreSQL database.
> It's just a bunch of "INSERT INTO" calls, but they block one another
> waiting for the INSERT command to return. I think I can speed things
> up by using asynchronous command processing (e.g. PQsendQuery,
> PQgetResult).

No you can't, because you can't have multiple commands pending over a
single connection.

You would get significantly more speedup by using COPY, anyway.

            regards, tom lane

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

Предыдущее
От: reina_ga@hotmail.com (Tony Reina)
Дата:
Сообщение: Anyone have example C code for Asynchronous Command Processing?
Следующее
От: "Marcus Andree S. Magalhaes"
Дата:
Сообщение: Re: Anyone have example C code for Asynchronous Command Processing?