Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-04 Thread Tom Lane
David Rowley writes: > I did happen to find one other in mcv.c which dates back to 2019. I > was wondering if we should bother with that one since it's already out > there in PG13. Maybe not. Per Peter's point, it's just cosmetic really. regards, tom lane

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-04 Thread David Rowley
On Thu, 3 Jun 2021 at 16:17, Tom Lane wrote: > > David Rowley writes: > > There are quite a few other places in that file that should be using > > DatumGetCString() instead of DatumGetPointer(). > > Should we fix those too for PG14? > > +1. I'm surprised we are not getting compiler warnings. I

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-03 Thread Peter Eisentraut
On 03.06.21 06:17, Tom Lane wrote: David Rowley writes: There are quite a few other places in that file that should be using DatumGetCString() instead of DatumGetPointer(). Should we fix those too for PG14? +1. I'm surprised we are not getting compiler warnings. Well, DatumGetPointer() ret

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread David Rowley
On Thu, 3 Jun 2021 at 16:17, Tom Lane wrote: > > David Rowley writes: > > There are quite a few other places in that file that should be using > > DatumGetCString() instead of DatumGetPointer(). > > Should we fix those too for PG14? > > +1. I'm surprised we are not getting compiler warnings. I'

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread David Rowley
On Thu, 3 Jun 2021 at 15:06, David Rowley wrote: > > On Thu, 3 Jun 2021 at 15:01, Michael Paquier wrote: > > As you already did > > 110d817, perhaps you would prefer taking care of it? > > Ok. I'll take care of it. Pushed. David

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread Tom Lane
David Rowley writes: > There are quite a few other places in that file that should be using > DatumGetCString() instead of DatumGetPointer(). > Should we fix those too for PG14? +1. I'm surprised we are not getting compiler warnings. regards, tom lane

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread David Rowley
On Thu, 3 Jun 2021 at 15:06, David Rowley wrote: > > On Thu, 3 Jun 2021 at 15:01, Michael Paquier wrote: > > As you already did > > 110d817, perhaps you would prefer taking care of it? > > Ok. I'll take care of it. I looked at this and couldn't help but notice how the following used DatumGetPoin

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread David Rowley
On Thu, 3 Jun 2021 at 15:01, Michael Paquier wrote: > As you already did > 110d817, perhaps you would prefer taking care of it? Ok. I'll take care of it. Thanks David

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread Michael Paquier
On Thu, Jun 03, 2021 at 01:53:34PM +1200, David Rowley wrote: > I think it would be good to fix at least the instances that are new > code in PG14 before we branch for PG15. They all seem low enough risk > and worth keeping the new-to-PG14 code as close to the same as > possible between major vers

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread Tom Lane
David Rowley writes: > On Wed, 2 Jun 2021 at 16:29, Michael Paquier wrote: >> Indeed, that's the same thing as 110d817 to make all those calls >> cheaper. No objections from me to do those changes now rather than >> later on HEAD. > I think it would be good to fix at least the instances that ar

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread David Rowley
On Wed, 2 Jun 2021 at 16:29, Michael Paquier wrote: > > On Wed, Jun 02, 2021 at 01:37:51AM +, houzj.f...@fujitsu.com wrote: > > In the latest HEAD branch, I found some places were using > > appendStringInfo/appendPQExpBuffer() when they could have been using > > appendStringInfoString/ appendP

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread Peter Eisentraut
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

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-02 Thread Alvaro Herrera
On 2021-Jun-02, houzj.f...@fujitsu.com wrote: > Hi, > > 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 d

Re: Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-01 Thread Michael Paquier
On Wed, Jun 02, 2021 at 01:37:51AM +, houzj.f...@fujitsu.com 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

Fixup some appendStringInfo and appendPQExpBuffer calls

2021-06-01 Thread houzj.f...@fujitsu.com
Hi, 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 s