Improve a few appendStringInfo calls new to v18

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Improve a few appendStringInfo calls new to v18
Date: 2025-04-10 03:51:15
Message-ID: CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Looks like v18 has grown a few appendStringInfo misusages, e.g. using
appendStringInfo() when no formatting is needed or just using format
"%s" instead of using appendStringInfoString().

I've attached a couple of patches. The 0001 is just my method for
finding these, not for commit. 0002 contains the fixes to commit.

Any objections to doing this soonish? Or in a few weeks?

David

Attachment Content-Type Size
v1-0001-Adjust-code-to-highlight-appendStringInfo-misusag.patch application/octet-stream 9.4 KB
v1-0002-Improve-various-appendStringInfo-calls-that-are-n.patch application/octet-stream 9.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2025-04-10 04:26:24 Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding
Previous Message Sami Imseih 2025-04-10 03:42:31 Re: n_ins_since_vacuum stats for aborted transactions