Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
От
Andres Freund
Тема
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
Дата
Msg-id
20160818201525.g5nthmdqtqwecxry@alap3.anarazel.de
Ответ на
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) (Robert Haas)
Список
Дерево обсуждения
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>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@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) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Andres Freund <andres@anarazel.de>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Ryan Murphy <ryanfmurphy@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Andres Freund <andres@anarazel.de>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Robert Haas <robertmhaas@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Andres Freund <andres@anarazel.de>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Robert Haas <robertmhaas@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Ryan Murphy <ryanfmurphy@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Tom Lane <tgl@sss.pgh.pa.us>
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) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Tom Lane <tgl@sss.pgh.pa.us>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Ryan Murphy <ryanfmurphy@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@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) Ryan Murphy <ryanfmurphy@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@gmail.com>
Re: Patch: initdb: "'" for QUOTE_PATH (non-windows) Michael Paquier <michael.paquier@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>
On 2016-08-18 16:11:27 -0400, Robert Haas wrote:
> On Wed, Aug 17, 2016 at 11:18 PM, Andres Freund wrote:
> > On August 17, 2016 8:15:56 PM PDT, Michael Paquier wrote:
> >
> >>+ { /* pg_ctl command w path, properly quoted */
> >>+ PQExpBuffer pg_ctl_path = createPQExpBuffer();
> >>+ printfPQExpBuffer(pg_ctl_path, "%s%spg_ctl",
> >>+ bin_dir,
> >>+ (strlen(bin_dir) > 0) ? DIR_SEP : ""
> >>+ );
> >>+ appendShellString(start_db_cmd, pg_ctl_path->data);
> >>+ destroyPQExpBuffer(pg_ctl_path);
> >>+ }
> >>
> >>This is not really project-style to have an independent block. Usually
> >>those are controlled by for, while or if.
> >
> > Besides the comment positioning I'd not say that that is against the usual style, there's a number of such blocks already. Don't think it's necessarily needed here though...
>
> Really? I'd remove such blocks before committing anything, or ask for
> them to be removed, unless there were some special reason for having
> them.
Well, reducing the scope of variables *can* be such a reason, no? As I
said, I don't see any reason here, but in general, it's imo a reasonable
tool on one's belt.
В списке pgsql-hackers по дате отправления