From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Make initdb's suggested "pg_ctl start" command line more reliabl
Date: Sat, 20 Aug 2016 19:05:30 +0000
Message-ID: <E1bbBaE-0001j6-Gz@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Make initdb's suggested "pg_ctl start" command line more reliable.
The original coding here was not nearly careful enough about quoting
special characters, and it didn't get corner cases right for constructing
the pg_ctl path either. Use join_path_components() and appendShellString()
to do it honestly, so that the string will more likely work if blindly
copied-and-pasted.
While at it, teach appendShellString() not to quote strings that clearly
don't need it, so that the output from initdb doesn't become uglier than
it was before in typical cases where quoting is not needed.
Ryan Murphy, reviewed by Michael Paquier and myself
Discussion: <CAHeEsBeAe1FeBypT3E8R1ZVZU0e8xv3A-7BHg6bEOi=jZny2Uw@mail.gmail.com>
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/a00c58314745772f6c6a49b6d02a9572cd600bda
Modified Files
--------------
src/bin/initdb/Makefile | 3 +++
src/bin/initdb/initdb.c | 43 ++++++++++++++++++++++++++++---------------
src/fe_utils/string_utils.c | 17 +++++++++++++++--
3 files changed, 46 insertions(+), 17 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Make initdb's suggested "pg_ctl start" command line more reliabl
In-Reply-To: <E1bbBaE-0001j6-Gz@gemulon.postgresql.org>
References: <E1bbBaE-0001j6-Gz@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