Re: NUMERIC private methods?

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NUMERIC private methods?
Date: 2014-12-16 09:01:47
Message-ID: 87tx0wm0w5.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Heikki" == Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:

Heikki> Looking at the weighed_stats code, this probably illustrates
Heikki> the hoops you had to jump through:

Actually that hoop-jumping expression is almost irrelevant.

The part that hurts (and yes, it's performance that's at issue here,
and not code aesthetics) is not being able to use NumericVar in the
aggregate's transition variable, because that means that every
computed intermediate value is palloc'd and pfree'd twice (once as the
digit buffer of a NumericVar and again as a Numeric datum).

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Satoshi Nagayasu 2014-12-16 09:23:04 Re: pg_rewind in contrib
Previous Message Petr Jelinek 2014-12-16 08:31:04 Re: TABLESAMPLE patch