Comments on Coefficient of Variation Function in PostgreSQL
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
.
Philipp Rautenberg said:
What exactly is
float8_accum
doing?