Should use variance() and stddev() rather than var_samp() and stddev_samp() on Postgresql < 8.2
|Reported by:||Richard Davies <richard.davies@…>||Owned by:|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
As per http://developer.postgresql.org/pgdocs/postgres/release-8-2.html , the aggregation functions var_pop(), var_samp(), stddev_pop(), and stddev_samp() were first introduced in Postgresql 8.2.
However, var_samp() and stddev_samp() were merely renamings of the pre-existing aggregates variance() and stddev(), so we could extend support to earlier versions of Postgresql by using those older function names where appropriate.