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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Patch: initdb: "'" for QUOTE_PATH (non-windows)
Дата
Msg-id 24410.1471553064@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>)
Список pgsql-hackers
Ryan Murphy <ryanfmurphy@gmail.com> writes:
> On Thu, Aug 18, 2016 at 3:22 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>>>> +        { /* pg_ctl command w path, properly quoted */
>>>> +            PQExpBuffer pg_ctl_path = createPQExpBuffer();
>>>> +            printfPQExpBuffer(pg_ctl_path, "%s%spg_ctl",

>> I think it's worth reducing the scope of variables when that's as
>> simple as putting them inside a block that you have to create anyway,
>> but I'm skeptical about the idea that one would create a block just to
>> reduce the scope of the variables.  I don't think that's our usual
>> practice, and I would expect the compiler to detect where the variable
>> is referenced first and last anyway.

> I enjoy adding the blocks for explicit variable scoping and for quick
> navigation in vim (the % key navigates between matching {}'s).  But I want
> to fit in with the style conventions of the project.

Another point here is that code like this will look quite a bit different
after pgindent gets done with it --- that comment will not stay where
you put it, for example.  Some of our worst formatting messes come from
code wherein somebody adhered to their own favorite layout style without
any thought for how it would play with pgindent.
        regards, tom lane



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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: [WIP] [B-Tree] Keep indexes sorted by heap physical location
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: WIP: About CMake v2