Comments on Coefficient of Variation Function in PostgreSQL

Post Comment

Philipp Rautenberg said:

What exactly is float8_accum doing?

23 Mar 2011 12:34 GMT (#1 of 2 comments)

Susam Pal said:

The float8_accum is the aggregate state transition function which maintains an internal state which changes for every new float8 input value.

It requires a three-element array, not just two elements, because it accumulates the sum of squares as well as the sum and count of the inputs. This is so that it can be used for some other aggregates besides avg.

23 Mar 2011 19:03 GMT (#2 of 2 comments)
Post Comment