AW: [HACKERS] Implementing STDDEV and VARIANCE

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB
Тема AW: [HACKERS] Implementing STDDEV and VARIANCE
Дата
Msg-id 219F68D65015D011A8E000006F8590C603FDC215@sdexcsrv1.f000.d0188.sd.spardat.at
обсуждение исходный текст
Список pgsql-hackers
> 2. I am proposing the names stddev(x) and variance(x) for 
> population and 
> samplestddev(x) and
> samplevariance(x) for sample statistics. Any comments?

Other db's have:

stdev() for standard deviation  sample  (N-1)
variance() for variance computed from a sample (N-1)

> 3. I'm planning to implement this for types float4, float8 
> and numeric. Any 
> other types also? int[2,4,8] don't seem logical, as these 
> would introduce 
> serious rounding errors.

Integer would be good also. Do the arithmetic in numeric 
to avoid loss of precision.

Andreas


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeroen van Vianen
Дата:
Сообщение: Re: [HACKERS] Implementing STDDEV and VARIANCE
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: Re: [HACKERS] column aliases