Re: NUMERIC private methods? - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: NUMERIC private methods?
Date
Msg-id 87tx0wm0w5.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: NUMERIC private methods?  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: NUMERIC private methods?  (David Fetter <david@fetter.org>)
List pgsql-hackers
>>>>> "Heikki" == Heikki Linnakangas <hlinnakangas@vmware.com> writes:
Heikki> Looking at the weighed_stats code, this probably illustratesHeikki> 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)



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: TABLESAMPLE patch
Next
From: Satoshi Nagayasu
Date:
Subject: Re: pg_rewind in contrib