chomp PQerrorMessage() in backend uses

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: chomp PQerrorMessage() in backend uses
Date: 2017-02-08 14:36:04
Message-ID: aaa2ad35-93f9-bd65-6361-c53365120e9a@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is a patch to systematically trim the trailing newlines off
PQerrorMessage() results in backend uses (dblink, postgres_fdw,
libpqwalreceiver).

I noticed that there are some inconsistent assumptions about whether
PQerrorMessage() can ever return NULL. From the code, I think that
should not be possible, but some code appears to be prepared for it.
Other code is not. What is correct?

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-chomp-PQerrorMessage-in-backend-uses.patch text/x-patch 11.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2017-02-08 14:52:40 Re: One-shot expanded output in psql using \gx
Previous Message Ashutosh Sharma 2017-02-08 14:25:23 Re: pageinspect: Hash index support