Re: Use appendStringInfoString and appendPQExpBufferStr where possible
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: "Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-14T08:05:16Z
Lists: pgsql-hackers
Attachments
- fixup_some_appendStringInfo_calls.patch (text/plain) patch
On Mon, 28 Sep 2020 at 13:47, Hou, Zhijie <houzj.fnst@cn.fujitsu.com> wrote: > Thanks for your response, combined them as a single patchset now. I had a look over the three patches. All the changes look fine. Thanks for working on it. After a bit of grep work, I found about 6 times more calls that could be improved. These involved searching for appendStringInfo calls that could become appendStringInfoString calls and also appendPQExpBuffer that could be converted to appendPQExpBufferStr. I didn't really go hunting for any other calls that append a 1 char string that don't use the Char variant of the function. So perhaps there's more of those to be found. I've attached the patch I ended up with. I plan on pushing this in the next few days. David
Commits
-
Fixup some appendStringInfo and appendPQExpBuffer calls
- 110d81728a0a 14.0 landed