]> granicus.if.org Git - postgresql/commit
chomp PQerrorMessage() in backend uses
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 27 Feb 2017 13:30:06 +0000 (08:30 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 27 Feb 2017 13:54:51 +0000 (08:54 -0500)
commit2ed193c904679a533d5e26a27c97119793bcae52
tree20750d69786c8fc97f345e40521334e962221215
parent9fab40ad32efa4038d19eaed975bb4c1713ccbc0
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.
contrib/dblink/dblink.c
contrib/dblink/expected/dblink.out
contrib/postgres_fdw/connection.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/utils/mmgr/mcxt.c
src/include/utils/palloc.h