Re: Patch to improve a few appendStringInfo* calls

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch to improve a few appendStringInfo* calls
Date: 2015-12-21 23:28:22
Message-ID: CAKJS1f8acVwM-dsPn1rfOj+pmwLLXOBsPoUKteO4iURzuzfCTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22 December 2015 at 01:58, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

> On Thu, Jul 2, 2015 at 6:08 AM, David Rowley
> <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
> >> I left out the changes like
> >>
> >>> - appendStringInfoString(&collist, buf.data);
> >>> + appendBinaryStringInfo(&collist, buf.data, buf.len);
> >>
> >>
> >> because they're not an improvement in readablity, IMHO, and they were
> not
> >> in performance-critical paths.
> >
> > Perhaps we can come up with appendStringInfoStringInfo at some later
> date.
>
> concatenateStringInfo?
>
>
According to grep -rE "appendStringInfoString\(.*\.data\);" . we have 13
such matches. None of them seem to be in very performance critical places,
perhaps with the exception of xmlconcat().

Would you say that we should build a macro to wrap up a call
to appendBinaryStringInfo() or invent another function which looks similar?

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Haribabu Kommi 2015-12-21 23:35:18 Re: Parallel Aggregate
Previous Message Pavel Stehule 2015-12-21 21:42:43 Re: plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types