According to
http://www.postgresql.org/docs/9.2/static/libpq-async.html"Even when PQresultStatus indicates a fatal error, PQgetResult should be called
until it returns a null pointer, to allow libpq to process the error information completely."
In libpq/fe-exec.c:PQexecFinish() error messages merges if more than one error
retrieved from the backend.
Can you please explain, in what cases the backend returns multiple error reports,
and is it guaranteed that all of them with the same SQLSTATE code? If it is, I would
also like to know, what a reason for sending the same error in multiple error
reports?