Re: appendBinaryStringInfo stuff - Mailing list pgsql-hackers

From David Rowley
Subject Re: appendBinaryStringInfo stuff
Date
Msg-id CAApHDvrEFqv1J14Hd41ySFxztPEoLzPQBvSPGaQaQmcXZdwW5g@mail.gmail.com
Whole thread Raw
In response to Re: appendBinaryStringInfo stuff  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: appendBinaryStringInfo stuff
Re: appendBinaryStringInfo stuff
List pgsql-hackers
On Tue, 20 Dec 2022 at 09:23, Peter Eisentraut
<peter.eisentraut@enterprisedb.com> wrote:
> AFAICT, the code in question is for the text output of the jsonpath
> type, which is used ... for barely anything?

I think the performance of a type's output function is quite critical.
I've seen huge performance gains in COPY TO performance from
optimising output functions in the past (see dad75eb4a and aa2387e2f).
It would be good to see some measurements to find out how much adding
the strlen calls back in would cost us. If we're unable to measure the
change, then maybe the cleanup patch would be nice. If it's going to
slow COPY TO down 10-20%, then we need to leave this or consider the
inline function mentioned by Andres or the macro trick mentioned by
me.

David



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: meson files copyright
Next
From: Tom Lane
Date:
Subject: Re: appendBinaryStringInfo stuff