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.
Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/2ed193c904679a533d5e26a27c97119793bcae52 Modified Files -------------- contrib/dblink/dblink.c | 14 +++++----- contrib/dblink/expected/dblink.out | 2 -- contrib/postgres_fdw/connection.c | 14 ++-------- .../libpqwalreceiver/libpqwalreceiver.c | 30 +++++++++++----------- src/backend/utils/mmgr/mcxt.c | 14 ++++++++++ src/include/utils/palloc.h | 2 ++ 6 files changed, 40 insertions(+), 36 deletions(-) -- Sent via pgsql-committers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers
