pgsql: Make initdb's suggested "pg_ctl start" command line more reliabl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make initdb's suggested "pg_ctl start" command line more reliabl
Дата
Msg-id E1bbBaE-0001j6-Gz@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Allow empty queries in pgbench.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: initdb now needs to reference libpq include files in MSVC builds