Thomas Lockhart <[EMAIL PROTECTED]> 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          | _numeric
 sum      | int8        | int8_sum            | numeric
 stddev   | int2        | int2_accum          | _numeric
 stddev   | int4        | int4_accum          | _numeric
 stddev   | int8        | int8_accum          | _numeric
 variance | int2        | int2_accum          | _numeric
 variance | int4        | int4_accum          | _numeric
 variance | 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

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to