Re: Simplify the way of appending comma to stringInfo
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Chao Li <li.evan.chao@gmail.com>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-08T15:09:15Z
Lists: pgsql-hackers
Heikki Linnakangas <hlinnaka@iki.fi> writes: > On 08/12/2025 10:37, Chao Li wrote: >> The old patterns are used in a lot of places, and there are some usages >> of the new pattern as well. Instead of creating a big cleanup patch, I >> just applied the new pattern to a single file for now to see if the >> hacker group likes this change. > It's a matter of taste, but I personally prefer the "old" pattern with > an explicit if() statement more. And I don't think it's worth the code > churn to change existing code either way. Yeah, the "code churn" objection is a big one in my mind. Any cosmetic change like this creates merge hazards for back-patching bug fixes in nearby code. Of course any one such change has only a very low risk of causing back-patching pain, but if you are proposing to do it in dozens or hundreds of places then the risk becomes much greater. Cosmetic changes also make it more painful to identify the origin of code segments via "git blame". I don't think this is such a huge improvement as to justify those costs. regards, tom lane