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 1wKdeT-001CkR-1o for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 14:55:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wKdeR-00HShq-0E for pgsql-hackers@arkaria.postgresql.org; Wed, 06 May 2026 14:55:03 +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 1wKdeQ-00HShi-2W for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 14:55:02 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wKdeO-00000000q8Z-3FjE for pgsql-hackers@lists.postgresql.org; Wed, 06 May 2026 14:55:02 +0000 Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-902deb2412fso277080485a.3 for ; Wed, 06 May 2026 07:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778079299; x=1778684099; 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=DyuyN06+OCNfssIjUDLLStI2LlqfigUmDTWBBeFGFSE=; b=KP/XYVXZeSlnm1zyBfoqTyKhS8Kwptnc4KtM7iF1rPyQHZzUcF4ZDwXqORAQEyqWTd AQOPo31Txbah84cTY+4t+t7J2oXWfXUB12uNucEuPdkw9/U+Mlzh1D/kSRBDyeHHAVbo BEyTcJHW6JMaera6aflfbV4TOnkMRkVeJ8poIOTE3mZKXUYK7PmESiPPhGIwnO7nrFK/ LVu3mZf7Mr4iqkvNX4gN53jPH7ql1LAIT72yMyAncI1F43aE4VJas7cyZ46Dcdj5/kYG EUjhxyHziUaOR54GEwU2dzcMW/1APiI/dx+sHSsJf09WWQ/wv0br0vD5j3BaF0OoBFJv 7cmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778079299; x=1778684099; 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=DyuyN06+OCNfssIjUDLLStI2LlqfigUmDTWBBeFGFSE=; b=VzM5/JYefZUOKbtqt2LqOLzmyCh3xQrTWAYj7//J6EAc7kvjaLJpGOzgIsrpwSl+Z/ ckjcHXUxflZ034+lMLTEZq77no4xYbTeCu7CsSXa2HQcAkqQi3iUMk7Kn/Spv0fHElzq LWpotWcorVpDl2TfFmCHRFtooslVd8bv81gvH1oXuiV6OCrh/T1HFqbGeZxz+rYcp2W5 CrDZ0BTxi+0Ogk7uj9TJRDW5Lnh5J/A7w+IHrvRMC7wXHykdRcmYGKhS1gcn1LJwUDiP pzxaIwoRksnni3LkNCQQm3973Kp4VxM+NCZ3CdYd23oEgFphOWz/UJknoctzszoJa6gJ 0AIw== X-Gm-Message-State: AOJu0YzYosrP8GgZ6wzRvu7ROXjW8hm4YoPgFVROgPr7eLh9kV6nGj3z hoaJZYdyvggBisrET8agTUkM1vyjkTPeXXwrKAuuE9yMLuF1hnvPsnck X-Gm-Gg: AeBDiesi9Y59owsMqnAByewrui3hQpQo5mhMuHTKcR5PcstkycNuIklpLXNSrD8wqKX mHbS4Pj6Zhmx+OuxhAbj6bkKF4TxMy6u8JHEiPjjJ8Pf2V1YaCNZqacXc/vfcg3Ml3r98LwfqZZ u5iuN51xsRt5Vt8BAeq06y2DESulo3vlDK38QYmDHakSEPNW1RIA0uRkuN27e2wxeXv+zZvX1Mq tILQUwdlPAHqUnpYOh9Ny0LmX7AZHvcyA/xPcsAsc80g/36EDkmrzcypY2UFotvSewhLmJtk+2b 72ucuIShZhtZ/8CKm0tjwxavK0dF0VHo5V7mnEXcGf3ZKkEQGuQof+Jq71fS307OusWOI0RIcl5 HqWC0y3f/VWr2YAb6P0Pgv1Hvv9hPa2GtzzPApStBIPfVuIwGTBbu8TDNhU758y1E+7THfJWyFg xhs8Gt/h+4xp8pdnsHRKMamTO+R63maNucjT+Iq3e2+f+lsLOFFTNfnAmQ6K0IBNFZNRnjs9pmR 90mPfeJZQTIjSRtigL2YTLHdBL+PUhPyUr7OM1nV9Q= X-Received: by 2002:a05:620a:29cc:b0:8d6:2958:ec16 with SMTP id af79cd13be357-904d6fcb06cmr527102585a.60.1778079298653; Wed, 06 May 2026 07:54:58 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8fc2c91cd89sm1696969685a.35.2026.05.06.07.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 07:54:56 -0700 (PDT) Date: Wed, 6 May 2026 09:54:54 -0500 From: Nathan Bossart To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Prepping for annual pgindent run Message-ID: References: <669384.1778006390@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <669384.1778006390@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, May 05, 2026 at 02:39:50PM -0400, Tom Lane wrote: > One thing to be done is to update src/tools/pgindent/typedefs.list > from the canonical list constructed by the buildfarm. We've been > pretty good about maintaining that file manually, but not perfect, > so this has a few small effects --- see attached for what that > would look like today. Seems fine. > I also propose applying the pgindent patches discussed in [1] and [2], > which would have rather larger effects. [1] improves formatting of > multiline comment blocks. 99% of the changes it would cause look like In general, +1. > @@ -933,7 +933,8 @@ _PG_init(void) > MarkGUCPrefixReserved("isn"); > } > > -/* isn_out > +/* > + * isn_out > */ > PG_FUNCTION_INFO_V1(isn_out); > Datum > > While that's not that big a deal, it improves style uniformity since > most of our multiline comments do not have any text on the first line. Yeah, this seems like a good change, provided we've minimized all the unintended side-effects. I know there was some discussion about whether this change should be made in the Perl script, but I really can't blame anyone for not touching the pg_bsd_indent source code. > [2] adds a space between comma and an immediately following period, > which mostly affects variadic functions: > > @@ -147,7 +147,7 @@ px_set_debug_handler(void (*handler) (const char *)) > } > > void > -px_debug(const char *fmt,...) > +px_debug(const char *fmt, ...) > { > va_list ap; > > > It also helps a few struct constructors: > > @@ -62,7 +62,7 @@ struct RBTree > > static RBTNode sentinel = > { > - .color = RBTBLACK,.left = RBTNIL,.right = RBTNIL,.parent = NULL > + .color = RBTBLACK, .left = RBTNIL, .right = RBTNIL, .parent = NULL > }; > > I don't see any places where it makes anything worse, and the > improvement in variadic functions is quite pleasing IMO. > So I think we should do that too. I read through that patch and it LGTM. -- nathan