Re: Making aggregate deserialization (and WAL receive) functions slightly faster - Mailing list pgsql-hackers

From David Rowley
Subject Re: Making aggregate deserialization (and WAL receive) functions slightly faster
Date
Msg-id CAApHDvpvgH1axfCu96oJCnHPtkKc=Z=aEjNdxuqGnxnrLf5drw@mail.gmail.com
Whole thread Raw
In response to Re: Making aggregate deserialization (and WAL receive) functions slightly faster  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Making aggregate deserialization (and WAL receive) functions slightly faster
List pgsql-hackers
On Thu, 5 Oct 2023 at 21:24, David Rowley <dgrowleyml@gmail.com> wrote:
>
> On Thu, 5 Oct 2023 at 18:23, Michael Paquier <michael@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



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: pg16: XX000: could not find pathkey item to sort
Next
From: Amit Kapila
Date:
Subject: Re: PGDOCS - add more links in the pub/sub reference pages