Re: numeric/decimal docs bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: numeric/decimal docs bug?
Date
Msg-id 27340.1018621955@sss.pgh.pa.us
Whole thread Raw
In response to Re: numeric/decimal docs bug?  (Thomas Lockhart <lockhart@fourpalms.org>)
List pgsql-hackers
Thomas Lockhart <lockhart@fourpalms.org> writes:
> I've been wanting to ask: we have in a few cases moved aggregate
> calculations from small, fast data types to using numeric as the
> accumulator.

Which ones are you concerned about?  As of 7.2, the only ones that use
numeric accumulators for non-numeric input types are
aggname  |  basetype   |     aggtransfn      |  transtype
----------+-------------+---------------------+-------------avg      | int8        | int8_accum          | _numericsum
   | int8        | int8_sum            | numericstddev   | int2        | int2_accum          | _numericstddev   | int4
     | int4_accum          | _numericstddev   | int8        | int8_accum          | _numericvariance | int2        |
int2_accum         | _numericvariance | int4        | int4_accum          | _numericvariance | int8        | int8_accum
        | _numeric
 

All of these seem to have good precision/range arguments for using
numeric accumulators, or to be enough off the beaten track that it's
not worth much angst to optimize them.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.3 schedule
Next
From: Thomas Lockhart
Date:
Subject: Re: numeric/decimal docs bug?