From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor logic to remove trailing CR/LF characters from strings
Date: Fri, 09 Aug 2019 02:12:16 +0000
Message-ID: <E1hvuO8-0000lN-DN@gemulon.postgresql.org> (raw)
Refactor logic to remove trailing CR/LF characters from strings
b654714 has reworked the way trailing CR/LF characters are removed from
strings. This commit introduces a new routine in common/string.c and
refactors the code so as the logic is in a single place, mostly.
Author: Michael Paquier
Reviewed-by: Bruce Momjian
Discussion: https://postgr.es/m/20190801031820.GF29334@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b8f2da0ac5a24f669c8d320c58646759b8fc69a5
Modified Files
--------------
src/backend/libpq/be-secure-common.c | 8 +++-----
src/bin/pg_ctl/pg_ctl.c | 10 +++-------
src/bin/pg_resetwal/pg_resetwal.c | 10 +++-------
src/bin/pg_upgrade/option.c | 20 +++++---------------
src/bin/psql/prompt.c | 10 +++++-----
src/common/string.c | 22 ++++++++++++++++++++++
src/include/common/string.h | 1 +
src/interfaces/libpq/fe-connect.c | 9 +++------
8 files changed, 45 insertions(+), 45 deletions(-)
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: michael@paquier.xyz
Subject: Re: pgsql: Refactor logic to remove trailing CR/LF characters from strings
In-Reply-To: <E1hvuO8-0000lN-DN@gemulon.postgresql.org>
References: <E1hvuO8-0000lN-DN@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