Fixup some appendPQExpBuffer() calls

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fixup some appendPQExpBuffer() calls
Date: 2025-04-14 07:39:51
Message-ID: CAApHDvoARMvPeXTTC0HnpARBHn-WgVstc8XFCyMGOzvgu_1HvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In a similar effort to what I did in [1], there's a bunch of
appendPQExpBuffer() calls that could use appendPQExpBufferStr() or
appendPQExpBufferChar(). With [1], I've been keeping those
appendStringInfo calls in check at this time of year for a few years
now. With appendPQExpBuffer I've not been, so a bunch of the changes
in 0002 touch code that's older than master. In one case as old as
v11.

See the attached summary.txt for details on when each of these first
appeared. The 0001 patch is the method I used to find these (which is
a bit cruddy and not for commit)

I'm now wondering if:

1) I should commit the attached 0002 patch now, or;
2) Should commit only the new-to-v18 ones now, or;
3) do nothing.

I think #3 isn't a good option as we (or I) have made efforts in the
past to keep these in check. Also, for me, #2 isn't ideal as if I do
this next year for v19, I'll need to ignore the older inconsistencies,
and I'd rather not have to do that, so I vote for #1.

Any other opinions?

David

[1] https://postgr.es/m/CAApHDvqJnNjueb=Eoj8K+8n0g7nj_AcPWSiCj5RNV4fDejAfqA@mail.gmail.com

Attachment Content-Type Size
summary.txt text/plain 540 bytes
v1-0001-Adjust-code-to-highlight-appendStringInfo-misusag.patch application/octet-stream 15.9 KB
v1-0002-Fixup-various-usages-of-appendPQExpBuffer.patch application/octet-stream 13.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-04-14 07:46:22 Support for runtime parameters in injection points, for AIO tests
Previous Message Dmitry Dolgov 2025-04-14 07:20:44 Re: Changing shared_buffers without restart