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 1wJwMQ-000QtZ-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 16:41:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wJwLN-0084cy-1t for pgsql-hackers@arkaria.postgresql.org; Mon, 04 May 2026 16:40:29 +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 1wJwLN-0084ci-0y for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 16:40:29 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wJwLJ-00000000Aj9-3gfV for pgsql-hackers@lists.postgresql.org; Mon, 04 May 2026 16:40:27 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 644GeJEN206323; Mon, 4 May 2026 12:40:19 -0400 From: Tom Lane To: Aleksander Alekseev cc: PostgreSQL Hackers , Nathan Bossart Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments In-reply-to: References: <7415F7DF-FA45-49E1-AC70-04868714DC8A@gmail.com> Comments: In-reply-to Aleksander Alekseev message dated "Mon, 09 Feb 2026 14:19:16 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <206321.1777912819.1@sss.pgh.pa.us> Date: Mon, 04 May 2026 12:40:19 -0400 Message-ID: <206322.1777912819@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Aleksander Alekseev writes: > Thanks, Nathan. Re-submitting v6 to make it visible by cfbot again and > in order to simplify the work of reviewers a bit. I tested the v6 patch by running it on current HEAD. Pretty nearly all the changes it makes are improvements, but it seems like there's still some work to be done. In particular, in src/port/inet_aton.c it produces this diff: --- a/src/port/inet_aton.c +++ b/src/port/inet_aton.c @@ -36,7 +37,8 @@ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. */ + * SUCH DAMAGE. + */ #include "c.h" in which not all the trailing whitespace has been removed from the first line, causing "git diff --check" to complain: $ git diff --check src/port/inet_aton.c:40: trailing whitespace. + * SUCH DAMAGE. In this case the problem is that the cleanup pattern only accounts for one trailing space. But a variant of this, which I think affects many of the steps in the patch, is that there could be tab(s) there. You should fix the patterns to allow any number of spaces/tabs at the spots where they currently expect just one space. This might result in finding cleanups they miss now. Another amusing diff I noticed: --- a/src/backend/partitioning/partbounds.c +++ b/src/backend/partitioning/partbounds.c @@ -5713,7 +5713,7 @@ check_parent_values_in_new_partitions(Relation parent, * 3. In case new partitions don't contain the DEFAULT partition and the * partitioned table does not have the DEFAULT partition, the following * should be true: the sum of the bounds of new partitions should be equal - & to the bound of the split partition. + * & to the bound of the split partition. * * parent: partitioned table * splitPartOid: split partition Oid Clearly, this is somebody's off-by-one-key typo, and the correct fix is s/&/*/. I suspect that fixing that manually is the most expedient answer, rather than trying to make pg_bsd_indent smart enough to DTRT. One other nitpick is that the patch itself needs to be run through pgperltidy (which has different opinions than your editor about tabs vs spaces, apparently). regards, tom lane