libpq: why only one PQsendQuery per connection at a time?

Поиск
Список
Период
Сортировка
От sftf-misc@mail.ru
Тема libpq: why only one PQsendQuery per connection at a time?
Дата
Msg-id 1382056210.20150104220211@mail.ru
обсуждение исходный текст
Ответы Re: libpq: why only one PQsendQuery per connection at a time?  (David G Johnston <david.g.johnston@gmail.com>)
Re: libpq: why only one PQsendQuery per connection at a time?  (Dmitry Igrishin <dmitigr@gmail.com>)
Список pgsql-general
Hello!
Question generally to (libpq) developers.

According to http://www.postgresql.org/docs/9.4/static/libpq-async.html:
"PQsendQuery cannot be called again (on the same connection) until PQgetResult
has returned a null pointer, indicating that the command is done."

As I guess this is also true for all PQsend* functions, like PQsendQueryPrepared,
although this is not explicitly stated in the documentation.

So question is why this limitaion exists?

Why PQgetResult(PGconn *conn) operates on connection,
and not on some unique handler that each "PQsend*" could return.

Is it limitaion of libpq or architecture of postgresql backend or backend-frontend protocol?



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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Streaming replication - slave not getting promoted
Следующее
От: David G Johnston
Дата:
Сообщение: Re: libpq: why only one PQsendQuery per connection at a time?