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 1vU5vN-00Gser-1x for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 16:23:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vU5vM-008iZs-1N for pgsql-hackers@arkaria.postgresql.org; Fri, 12 Dec 2025 16:23:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vU5vM-008iZk-0Q for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 16:23:20 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vU5vK-000Neu-0o for pgsql-hackers@lists.postgresql.org; Fri, 12 Dec 2025 16:23:20 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-455af5758fdso432493b6e.1 for ; Fri, 12 Dec 2025 08:23:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765556596; x=1766161396; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=u6OBWgiOn6FWtjSKOGZwQJPItMqz4b6hUvFppBBRfw8=; b=K06D3Wl384Bfn8Et1Ajs60VLXRpNXmdu5DFJLTOQg3GEvp1I/ja0H8Q3XbYzURtXs5 2kbl0gj+p3HQsMTqDZ7bv4Fz4WxweoYJgXhmNjMEltVnxOMarK7I/Rj6I/2mtlBf/EF9 96KtXxg8TumovN1O8rY7QkNzXeMqD2+SYaKLzPypIMmmHYH3iDpdFmeQPc72gywrAO1t 75gjeykf1RwC2rHVv0SGOwbHiKQnqzm4A8THVzNwTeypFJAHJnA1SJ6CJLgh+ubQ1o0q dtMApdkxJKpueHU3kDcWVdMhZera1PCt88nRoSn8RiQz1VPZ0xIXEhCTXceQaqoFkYmJ jPYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765556596; x=1766161396; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u6OBWgiOn6FWtjSKOGZwQJPItMqz4b6hUvFppBBRfw8=; b=RvsFPO/Mg6BUpaooDWdt5r2PpHR1+iHZv4aMUvm+RFElAh/SqddkW//YD5UUfhWnuH 7hE5Mr4VvGlpz+GL/ipAbtF7Ug8yN9PhyqS+i1eMfZICIs4kkkgxJVGugDZifVS6c7Nb 0Lm69dfWemM2xu8pEFl8UfJ/J5hY8q7YlGij+3x9O/KjeLOpMOaNaeKkS03BUf8XfDw2 /xcC6xFireUIiQRef3WqueKv/TBc1zkBxuec6k/amnbkOMYcWDwlY6cqKiftKz1h4ywf 1eruV5SGWTziZMpH57z6lyZmLjwyaUydxLQmttGxOvhzNEG0zjPQAoQomuE5A/pNpcMh 0/nA== X-Forwarded-Encrypted: i=1; AJvYcCUTUwWKpJvkmwayIojj6UZxZESRFh8Q/Qbwq0jXHcAyu7LeMUZWL8+lo//Y1ZnCKaGNLXJolDwMn+33mpri@lists.postgresql.org X-Gm-Message-State: AOJu0Yy2jy7mSRzGK8AbnOXbOFZrJOoGh6Ey4XzXI2y7rkLmUbBGAXeO mJ4E0Y63c1uLyjx67ewch/7NzfrLkhLvhmrohmlubT2o1eKC0ApLa6Sk X-Gm-Gg: AY/fxX5RFdkjMG52iopdSrSmb3FUiCLqAPzya/bQs5jC9pJ+MNoALHnmQBc3qz8saCO czXg1OHthb7J+LodxEbsV+vuKpoXn7Qo4vSnKybzSGYbDaAZ3LZkVMuTW9xe4BECVl6kl3miokE nzDuNzkxmWD7V3/W4FoWNctfAMKf5wK3BC2z5jEcKvmf8PJLAcEamhJ0kWj6mFNOBtU5vqx7XeH JSVVA/QyMIds6z2dWmJBK/VjWMP1oQddnOVrBpCqzuWHo/PAcacDK1sGunl0/lnaLSQ4CypUlJj +g9jVJ9AqS8ndq+5/TvsnYy5wD8YxtobkhK5e1j1YzqccNvZLmYIX3TKJgMpjMdqDBrPgr7kPHe TMp5wQ4XjVoiBJr42KxzerYLXO9qFDrbldabZDhL4Pmi//xKCm/vtrnslVnNyL0I/uorIbuZVF3 A6tcxiO6zzYLIIT+hqujlYI1X66YxwefjpJZ0bbgzwDWxHtM6d1NVgM6seByI+9zPbGD0ho5RF5 i5d X-Google-Smtp-Source: AGHT+IG4xBsQdRIT1yaxq4mXENy2ZaMCP43XEk9rr5j8Ra1AVsaLx0LkD/fmfLC1yRbhmjI1mbmKTQ== X-Received: by 2002:a05:6808:3186:b0:450:c456:10df with SMTP id 5614622812f47-455ac9d16a9mr1317573b6e.55.1765556596630; Fri, 12 Dec 2025 08:23:16 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 5614622812f47-45598d6cbb2sm2806255b6e.21.2025.12.12.08.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Dec 2025 08:23:16 -0800 (PST) Date: Fri, 12 Dec 2025 10:23:14 -0600 From: Nathan Bossart To: Tom Lane Cc: =?utf-8?Q?=C3=81lvaro?= Herrera , Aleksander Alekseev , PostgreSQL Hackers , Chao Li , Arseniy Mukhin , Bruce Momjian , Michael Paquier Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments Message-ID: References: <202512121547.dwkzxcs56227@alvherre.pgsql> <1000974.1765556221@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1000974.1765556221@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Dec 12, 2025 at 11:17:01AM -0500, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: >> It's strange to see this thread go on about messing with the Perl script >> because we're too afraid of pg_bsd_indent. Maybe we should take >> ownership of that code -- improve its own indentation to our >> conventions, add comments, rename unclear variables, and so on until we >> have something we can work with, and fix these weird bugs and >> idiosincratic behaviors we don't like. I just found out this code dates >> back from 1976. > > I've worked with that code a little bit, and it's mostly unreadable > spaghetti :-(. If somebody wants to make an effort to make it not > so awful, that'd be great, but I fear it's a very nontrivial project. Yeah, I tried to find a bug in it recently and could do little more than trial-and-error in the areas that seemed vaguely close (with no success). I'm generally critical of efforts to rewrite things from scratch, but this might be a case where it's the better option. -- nathan