Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
Дата
Msg-id CAB7nPqSnfQDt-NfiWeF1BO9Sjy4+PM56=TiPqnEwYqv8J5xPbA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)  (Ryan Murphy <ryanfmurphy@gmail.com>)
Ответы Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)  (Ryan Murphy <ryanfmurphy@gmail.com>)
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, Aug 18, 2016 at 12:21 AM, Ryan Murphy <ryanfmurphy@gmail.com> wrote:
> I have created a better patch (attached) that correctly escapes the shell
> arguments using PQExpBufferStr and the appendShellString function, as per
> Michael and Andres' suggestions.
>
> Further suggestions welcome of course.

As far as I know, it is perfectly possible to have LF/CR in a path
name (that's bad practice btw...), and your patch would make initdb
fail in such cases. Do we want to authorize that? If we bypass the
error checks in appendShellString with an extra option, and have
initdb use that, the generated command would be actually correct.
-- 
Michael



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: CLUSTER, reform_and_rewrite_tuple(), and parallelism
Следующее
От: Andres Freund
Дата:
Сообщение: Re: CLUSTER, reform_and_rewrite_tuple(), and parallelism