Re: libpq PQresultErrorMessage vs PQerrorMessage API issue

2021-02-16 Thread Tom Lane
Craig Ringer writes: > This morning for the the umpteenth time I saw: > some error message: [blank here] > output from a libpq program. > That's because passing a NULL PGresult to PQgetResultErrorMessage() returns > "". But a NULL PGresult is a normal result from PQexec when it fails to > submit

libpq PQresultErrorMessage vs PQerrorMessage API issue

2021-02-15 Thread Craig Ringer
Hi all This morning for the the umpteenth time I saw: some error message: [blank here] output from a libpq program. That's because passing a NULL PGresult to PQgetResultErrorMessage() returns "". But a NULL PGresult is a normal result from PQexec when it fails to submit a query due to an inval