On Thu, 5 Oct 2023 at 21:24, David Rowley <dgrowle...@gmail.com> wrote: > > On Thu, 5 Oct 2023 at 18:23, Michael Paquier <mich...@paquier.xyz> wrote: > > Ahem, well. Based on this argument my own argument does not hold > > much. Perhaps I'd still use a macro at the top of array_userfuncs.c > > and numeric.c, to avoid repeating the same pattern respectively two > > and four times, documenting once on top of both macros that this is a > > fake StringInfo because of the reasons documented in these code paths. > > I looked at the patch again and I just couldn't bring myself to change > it to that. If it were a macro going into stringinfo.h then I'd agree > with having a macro or inline function as it would allow the reader to > conceptualise what's happening after learning what the function does.
I've pushed this patch. I didn't go with the macros in the end. I just felt it wasn't an improvement and none of the existing code which does the same thing bothers with a macro. I got the idea you were not particularly for the macro given that you used the word "Perhaps". Anyway, thank you for having a look at this. David