Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
От | Ryan Murphy |
---|---|
Тема | Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) |
Дата | |
Msg-id | CAHeEsBdkLnu796oAtvHVBYR2Kd__-437b6+vPfY24sjWujXRkA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
|
Список | pgsql-hackers |
That's a fair point Michael. I would be willing to make such a change,<span></span> but since c doesn't have optional functionarguments I'm not sure the least intrusive way to do that. Do you have a suggestion?<br /><br />On Wednesday, August17, 2016, Michael Paquier <<a href="mailto:michael.paquier@gmail.com">michael.paquier@gmail.com</a>> wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu,Aug 18, 2016 at 12:21 AM, Ryan Murphy <<a href="javascript:;">ryanfmurphy@gmail.com</a>> wrote:<br /> > I havecreated a better patch (attached) that correctly escapes the shell<br /> > arguments using PQExpBufferStr and theappendShellString function, as per<br /> > Michael and Andres' suggestions.<br /> ><br /> > Further suggestionswelcome of course.<br /><br /> As far as I know, it is perfectly possible to have LF/CR in a path<br /> name (that'sbad practice btw...), and your patch would make initdb<br /> fail in such cases. Do we want to authorize that? Ifwe bypass the<br /> error checks in appendShellString with an extra option, and have<br /> initdb use that, the generatedcommand would be actually correct.<br /> --<br /> Michael<br /></blockquote>
В списке pgsql-hackers по дате отправления: