On Sun, Aug 3, 2025 at 9:40 PM Tender Wang <tndrw...@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. >> > > About this, you can check this commit > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=aadf7db66ef5a8a723eb3362e2c8b460738f1107 > . > 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.