Unverified Commit a701e78b authored by Dimitri Fontaine's avatar Dimitri Fontaine Committed by GitHub
Browse files

Switch to using libpq async API. (#488)

* Switch to using libpq async API.

The easy to use API PQexec() and PQexecParams() are blocking, which means
those functions could fail to detect when a Postgres connection has been
lost, and now wait an indefinite amount of time.

Switch to using the async API PQsendQuery() or PQsendQueryParams() with the
PQgetResult() function, all with some lower-level socket API calls such as
select(2) and PQconsumeInput() and PQisBusy().

Note that when the server is no longer busy computing the result, we should
loop over all the available results... apparently.

* Code cleanup, add another check for interrupts.

* Remove extra check for interrupts.
parent cc702401
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment