Asynchronous work with PostgreSQL in C

Today, I wanted to write a short note on asynchronous work with PostgreSQL in C. The motives are simple: for a small utility, there was a need to implement such functionality, Google made no secret of clear and working examples (there was only an example in pqxx for C ++ - there is an asynchronous connection method and a pipeline -class for queries), and the official documentation on this issue, though very detailed, but not too structured, and the algorithm itself working with the libpq library in asynchronous mode has many pitfalls. Therefore, having understood the question, I want to share the ...
+ 0 -