From: | "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Do we need multiple forms of the SQL2003 statistics |
Date: | 2006-07-29 19:36:39 |
Message-ID: | Pine.LNX.4.64.0607292325330.26646@lnfm1.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 29 Jul 2006, Peter Eisentraut wrote:
> Sergey E. Koposov wrote:
>> I think since we are supporting the numeric type as a special
>> high-precision type, Postgres must have the high-precision
>> versions of all computational functions. Just my opinion.
>
> Another way to look at it is whether you want to have accurate
> computations (numeric) or approximate computations (float). I'm not a
> statistician, so I don't know what most of these functions are used
> for. From a mathematician's point of view, however, some of these
> functions normally produce irrational numbers anyway, so it seems
> unlikely that numeric will be useful. But looking at the definition
> of, say, regr_avgx(Y, X), if all the input values are integers, it
> might be useful if I could get an exact integer or rational number as
> output, instead of a float, that is.
Exactly from the statistical point of view, there is no need to have the
integer output of those 2-arg. aggregates. For example corr(), regr_*()
are by definition not integer (they just don't have any sense as
integers...)( -1<= corr(Y,X)<=1 ) (for example the stddev(int) do
not produce int also, because it does not have any sense)
So it's perfectly fine that they are producing only floating numbers...
Regards,
Sergey
*******************************************************************
Sergey E. Koposov
Max Planck Institute for Astronomy/Sternberg Astronomical Institute
Tel: +49-6221-528-349
Web: http://lnfm1.sai.msu.ru/~math
E-mail: math(at)sai(dot)msu(dot)ru
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2006-07-29 19:56:46 | Re: Formulating an sql query with CTID |
Previous Message | korryd@enterprisedb.com | 2006-07-29 19:35:08 | Re: [HACKERS] Possible explanation for Win32 stats |