Re: A little cosmetic to convert_VALUES_to_ANY()

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: A little cosmetic to convert_VALUES_to_ANY()
Дата
Msg-id CAKFQuwbcqBMPG-O=9ni_J9KL63Jo-BvpX5hh2vY_DK7ORu68pA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A little cosmetic to convert_VALUES_to_ANY()  (Tender Wang <tndrwang@gmail.com>)
Список pgsql-hackers
On Sun, Aug 3, 2025 at 9:40 PM Tender Wang <tndrwang@gmail.com> wrote:

Also, add a brace for better/more consistent style in the attached patch.

Should try and avoid oh-by-the-way fixes like this in behavior patches.

This specific one also doesn't seem warranted. Or, at least, the original style is indeed de facto acceptable; if-blocks containing a single executing statement do not get braces but rely on indentation alone.  I don't think that every other if-block in the region being multi-statement supports an exception.

Add brace for better/more consistent style.
 

OK...I only agree with one of those changes and the overall patch is basically a code style patch and a single function affected - neither of which applied here.  I'd probably have done the else-if block too; but there is nothing wrong or definitely better about the initial guard being braced and I'd argue the brace-less version is subjectively superior.  Not enough to go back and change again but still the original choice was better IMO.

David J.

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