Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6C1f-0042uK-2i for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 18:35:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w6C1e-00BJYo-0s for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 18:35:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w6C1Y-00BJYd-2L for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 18:35:18 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w6C1W-00000001Mbo-2Ddl for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 18:35:12 +0000 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-89a0ecbc713so27565666d6.1 for ; Fri, 27 Mar 2026 11:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umbc.edu; s=google; t=1774636508; x=1775241308; darn=lists.postgresql.org; h=to:date:message-id:subject:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=552r58KTs/H7x7oaWE+9DspnksKIYxCn3pvDspBh1Jo=; b=j34BYzMj0dBikCnsizYSKx0W1iRY6L4bsXfR+eoE7DV08iz9JZ0TaxCd4+8rMk+eTQ itywXdz1sWCkmLlYfijQQzBMazcGffW15S9NOVL9PS2g+Qj0nBxHnP96HtgyQDQS06wQ Gd/DEJkBxn7BXI/D/DYvbeVsA7CU0m2oNOEu0xzX/CVQko6ngBNQqICq59A9S0DZ4KBS 87hNX5erUz/Xkr1nKIhaphyNblH58043/TLk18odZkMfWd34VzRlju6FqIp12p3wF3hR xsxoE1cGlhwCZr1QEQ1/eivnSvai5FkTjbBvLSwUy67l4FtMbkkKerichnHjFpLHGkpK G57Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774636508; x=1775241308; h=to:date:message-id:subject:mime-version:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=552r58KTs/H7x7oaWE+9DspnksKIYxCn3pvDspBh1Jo=; b=pEE5G2SmUgx6cy56SDE2ito0Z6yVxxAes5lhvGJbseW/8J60k9vwYCHmhxERfJYWRz vTHGVnKnWb3UknYJKTxcjl455gwcFYtRA7eLRWj/lJE29Y4r9xJTy7oen9hx3hIugxld HbUjwe0L6l6hYqBJyMj9iL0TboGhG9xIGOt3UH/DIWBIiBR+ZvJMDgAmlg2RDlLVc2xg adtnuiFlV57isAUUKgQ2JLA4DnjSFmS5voUifElu6gaIwd4cgecYiNWxCtrNykyJhRCX fuVSeo6nxEyHLyBhC1p5Y9N2jf/zjqS3vBkkNIhoc3lHXmI45iMGuh1gqaZtqwY9hJHP WZZg== X-Gm-Message-State: AOJu0YwUutFtg1B2rjYS6ixo3RrkCSbrifXQ7OBfYuZvQDWvXyp3v8wy 7LcfxE35MGZdgcG52HayRi8UDceln7FE1iAZnFMA2U/omzkeOWtarH51tt6ep2EmGy99c+de3bj krEUeycrghKQdFwKsklPJwiV5Su4trxrv9zX1QlcMY6yVtHfDveZb/Mx0onD3YNRue3tatlZ9Zb dCsOy5lOyM4UrqMPxcPbwjTJV/YrjU0iBDlLfuR7KNELsfyfPUQpHKGPw4QKICFIhe1bf7q7PJz 905k5QlxZqgIa9ctuLuuq4F/5r2dakZ5qABgEheyg== X-Gm-Gg: ATEYQzzuyFpLCTN52nz/4VFwxEu9BBEXmb7kBUJgKs2lrbeJyDmrs/kzIxdh88Enn84 2or9wDrh1DgrmiJ2dvoL8Zoj3E/HNGh1p+89e6BDuxNlemzH3OqRztUjXt0hiXjYAYzZhnVlWU+ 5A5E4Pa4Rx/Buoavp3NU+q1wcVE0fNGR8qSIpcggafC9zX4Qo7WbGeZsGCER3rBr371R5OxsJV+ /X90J34Vfq1BvBZOB8y7HESRFj0hetyClBtA1Bw09YxE7Di89jUoNUOyZEtvZzBKTFt/t/uNIq1 9+KaXRpH0AjkHIOBkIqlufR/t7L9lYUo7EFWP3zxAq27NW8PDmaJEm4ianM6yOscmOsUIOaD8// ULzwCfZFeUXByFBle4NoqDhf/3uUajhwkOnO1re+UPQNl0H6EM/cPUj0jCUcw2WQrKsrjhJwO8k 0etaiw65Q8SC/7wg5+q2shaeLsjRVyQ4fsvZg84jxW7aen4y48cw== X-Received: by 2002:a05:6214:268d:b0:899:fa7f:7144 with SMTP id 6a1803df08f44-89cddf122eemr99515216d6.26.1774636508207; Fri, 27 Mar 2026 11:35:08 -0700 (PDT) Received: from smtpclient.apple ([2601:14d:4080:9d40:1d75:5d96:466b:2ad3]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89cd5a22711sm67780306d6.27.2026.03.27.11.35.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2026 11:35:07 -0700 (PDT) From: Payal Singh Content-Type: multipart/alternative; boundary="Apple-Mail=_A3E748A9-1076-4D5D-8202-A47C61DEEAA6" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Review - Patch for pg_bsd_indent: improve formatting of multiline comments Message-Id: Date: Fri, 27 Mar 2026 14:34:56 -0400 To: pgsql-hackers@lists.postgresql.org X-Mailer: Apple Mail (2.3864.400.21) X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: umbc,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_A3E748A9-1076-4D5D-8202-A47C61DEEAA6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii This is a review of the pgindent multiline comments patch: = https://www.postgresql.org/message-id/attachment/189778/v6-0001-pgindent-i= mprove-formatting-of-multiline-comments.patch Contents & Purpose =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D This patch adds a `postprocess_multiline_comment()` function to pgindent that reformats multiline comments to put `/*` on its own line: Before: /* This is line 1 * This is line 2 */ After: /* * This is line 1 * This is line 2 */ The patch correctly excludes Doxygen (`/**`), compat flag (`/*-`), and separator patterns (`/* =3D=3D=3D`, `/* ---`). Initial Run =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The patch applies cleanly to HEAD. I tested with various comment styles and all cases passed: - Basic multiline: reformatted correctly - Doxygen/compat: left unchanged (correct) - Separator lines: preserved (correct) - Single-line comments: left unchanged (correct) - Already-correct format: left unchanged (correct) The validation logic at line 303 correctly requires `/*` on its own line and ` */` on its own line before processing. Comments that don't match this pattern are returned unchanged. Performance =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Tested on a 74KB C file: 0.038 seconds. Negligible impact; the regex only runs on comments. Nitpicking & Conclusion =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Minor: The regex notation in the report (line 85) shows `!` as part of the pattern when it's actually the delimiter. The code itself is = correct. The validation description could be clearer that it returns early (skips processing) when conditions aren't met, rather than "requires" them. Otherwise this is a clean, minimal patch (36 lines) that fits well with existing pgindent patterns. Single file change, no build system modifications, developer tool only.= --Apple-Mail=_A3E748A9-1076-4D5D-8202-A47C61DEEAA6 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii

This is a review of the pgindent multiline comments patch:

https://www.postgresql.org/message-id/attachment/189778/v6-0001-pgindent-improve-formatting-of-multiline-comments.patch


Contents & Purpose

==================

This patch adds a `postprocess_multiline_comment()` function to pgindent

that reformats multiline comments to put `/*` on its own line:


  Before: /* This is line 1

   * This is line 2

   */


  After:  /*

   * This is line 1

   * This is line 2

   */


The patch correctly excludes Doxygen (`/**`), compat flag (`/*-`), and

separator patterns (`/* ===`, `/* ---`).


Initial Run

===========

The patch applies cleanly to HEAD. I tested with various comment styles

and all cases passed:


- Basic multiline: reformatted correctly

- Doxygen/compat: left unchanged (correct)

- Separator lines: preserved (correct)

- Single-line comments: left unchanged (correct)

- Already-correct format: left unchanged (correct)


The validation logic at line 303 correctly requires `/*` on its own

line and ` */` on its own line before processing. Comments that don't

match this pattern are returned unchanged.


Performance

===========

Tested on a 74KB C file: 0.038 seconds. Negligible impact; the regex

only runs on comments.


Nitpicking & Conclusion

=======================

Minor: The regex notation in the report (line 85) shows `!` as part of

the pattern when it's actually the delimiter. The code itself is correct.


The validation description could be clearer that it returns early (skips

processing) when conditions aren't met, rather than "requires" them.


Otherwise this is a clean, minimal patch (36 lines) that fits well with

existing pgindent patterns. Single file change, no build system

modifications, developer tool only.

--Apple-Mail=_A3E748A9-1076-4D5D-8202-A47C61DEEAA6--