chomp PQerrorMessage() in backend uses

Peter Eisentraut <peter_e@gmx.net>

Commit: 2ed193c904679a533d5e26a27c97119793bcae52
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2017-02-27T13:54:51Z
Releases: 10.0
chomp PQerrorMessage() in backend uses

PQerrorMessage() returns an error message with a trailing newline, but
in backend use (dblink, postgres_fdw, libpqwalreceiver), we want to have
the error message without that for emitting via ereport().  To simplify
that, add a function pchomp() that returns a pstrdup'ed string with the
trailing newline characters removed.

Files