pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: chomp PQerrorMessage() in backend uses
Date: Mon, 27 Feb 2017 13:58:06 +0000
Message-ID: <E1ciLoU-0007qb-LB@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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 (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1ciLoU-0007qb-LB@gemulon.postgresql.org>
Permalink:  ../E1ciLoU-0007qb-LB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ciLoU-0007qb-LB@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter_e@gmx.net
  Subject: Re: pgsql: chomp PQerrorMessage() in backend uses
  In-Reply-To: <E1ciLoU-0007qb-LB@gemulon.postgresql.org>
  References: <E1ciLoU-0007qb-LB@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox