Re: Use appendStringInfoString and appendPQExpBufferStr where possible - Mailing list pgsql-hackers

From David Rowley
Subject Re: Use appendStringInfoString and appendPQExpBufferStr where possible
Date
Msg-id CAApHDvoOEV=GzN8ereeXZNGFOi646=rN=Gma2+ikmjFOqyz_Tg@mail.gmail.com
Whole thread Raw
In response to RE: Use appendStringInfoString and appendPQExpBufferStr where possible  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Responses Re: Use appendStringInfoString and appendPQExpBufferStr where possible  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2