Re: Fixup some appendStringInfo and appendPQExpBuffer calls - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Fixup some appendStringInfo and appendPQExpBuffer calls
Date
Msg-id 26903d83-974a-08d3-3b84-7707cd41c922@enterprisedb.com
Whole thread Raw
In response to Re: Fixup some appendStringInfo and appendPQExpBuffer calls  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On 02.06.21 12:57, Alvaro Herrera wrote:
>> In the latest HEAD branch, I found some places were using
>> appendStringInfo/appendPQExpBuffer() when they could have been using
>> appendStringInfoString/ appendPQExpBufferStr() instead. I think we'd better
>> fix these places in case other developers will use these codes as a reference,
>> though, it seems will not bring noticeable performance gain.
> 
> hmm why didn't we get warnings about the PENDING DETACH one?  Maybe we
> need some decorator in PQExpBuffer.

I don't think there is anything wrong with the existing code there. 
It's just like using printf() when you could use puts().

(I'm not against the proposed patch, just answering this question.)



pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: pg_stat_progress_create_index vs. parallel index builds
Next
From: Bruce Momjian
Date:
Subject: Re: Support for CREATE MODULE?