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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
Дата
Msg-id CAB7nPqRg6ooKRD4pctS=bUDO6FMiewEHs49MOJRbo2mL5TO=4A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)  (Ryan Murphy <ryanfmurphy@gmail.com>)
Список pgsql-hackers
On Thu, Aug 18, 2016 at 9:30 AM, Ryan Murphy <ryanfmurphy@gmail.com> wrote:
(please avoid top-posting)

>> 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.
>
> That's a fair point Michael.  I would be willing to make such a change, but
> since c doesn't have optional function arguments I'm not sure the least
> intrusive way to do that.  Do you have a suggestion?

You could just add a boolean flag to appendShellString called for
example no_error that the code path of initdb sets to true, and the
other ones to false.
--
Michael



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

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