Re: ArchiveEntry optional arguments refactoring

Поиск
Список
Период
Сортировка
От Dmitry Dolgov
Тема Re: ArchiveEntry optional arguments refactoring
Дата
Msg-id CA+q6zcUhr+jODQ_NjqQZhDc=Zkq445_QW148pgAKuWEach=JWQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: ArchiveEntry optional arguments refactoring  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: ArchiveEntry optional arguments refactoring  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
> On Fri, Feb 1, 2019 at 12:33 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>
> pgindent didn't like your layout with two-space indents for the struct
> members :-(  I thought it was nice, but oh well.  This means we can do
> away with the newline at each callsite, and I didn't like the trailing
> comma (and I have vague recollections that some old compilers might
> complain about them too, though maybe we retired them already.)

Oh, ok. In fact I did this almost automatically without thinking too much (a
formatting habit from other languages), so if pgindent doesn't like it, then
fine.

> > * Use NULL as a default value where it was an empty string before (this
> >   required few minor changes for some part of the code outside ArchiveEntry)
>
> I would rename the function to sanitize_line() and put those comments there
> (removing them from the callsites), then the new argument I suggest would not
> be completely out of place.

Yes, sounds pretty reasonable for me.

> (Also for some reason I decided to go with "hyphen" instead of "dash" in the
> argument name.  Not sure if anybody cares strongly about using the right
> terminology there (I don't know which it is).

Just out of curiosity I did some search and could find few examples of using
both "dash" and "hyphen" across the code, but I guess indeed it doesn't really
matter.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: LD_LIBRARY_PATH_RPATH
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Delay locking partitions during INSERT and UPDATE