Returns the error message most recently generated by an operation on the connection.
Nearly all libpq functions will set a message for
PQerrorMessageif they fail. Note that by libpq convention, a nonemptyPQerrorMessageresult can consist of multiple lines, and will include a trailing newline. The caller should not free the result directly. It will be freed when the associated PGconn handle is passed toPQfinish. The result string should not be expected to remain the same across operations on thePGconnstructure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | conn |