libpq: why only one PQsendQuery per connection at a time? - Mailing list pgsql-general

From sftf-misc@mail.ru
Subject libpq: why only one PQsendQuery per connection at a time?
Date
Msg-id 1382056210.20150104220211@mail.ru
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Streaming replication - slave not getting promoted
Next
From: David G Johnston
Date:
Subject: Re: libpq: why only one PQsendQuery per connection at a time?