[HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread David Fetter
Kind people, I just ran across this, and was wondering whether it's worth a back-patch. The interval type has an aggregate for average (AVG), but not one for standard deviation (STDDEV) or variance (VARIANCE). Is this a bug? Is there some problem with defining variance over intervals? TIA for

Re: [HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread Peter Eisentraut
David Fetter wrote: I just ran across this, and was wondering whether it's worth a back-patch. New features are not back-patched. The interval type has an aggregate for average (AVG), but not one for standard deviation (STDDEV) or variance (VARIANCE). Is this a bug? No, it's a missing

Re: [HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread Tom Lane
David Fetter [EMAIL PROTECTED] writes: I just ran across this, and was wondering whether it's worth a back-patch. The interval type has an aggregate for average (AVG), but not one for standard deviation (STDDEV) or variance (VARIANCE). AFAICS, stddev/variance require the concept of

Re: [HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread Peter Eisentraut
Tom Lane wrote: AFAICS, stddev/variance require the concept of multiplying two input values together (square, and also square root, are in the formulas). I don't know what it means to multiply two intervals --- there's no such operator in Postgres, anyway. The problem is not much different

Re: [HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: The problem is that an interval datum already implies the units, so in order to allow interval * interval we would have to add a new type interval squared, which would probably be considered to be a bit foolish. Not only foolish but complicated.

Re: [HACKERS] Statistical Lacunae in Interval type

2004-07-12 Thread David Fetter
On Mon, Jul 12, 2004 at 11:10:34AM -0400, Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: The problem is that an interval datum already implies the units, so in order to allow interval * interval we would have to add a new type interval squared, which would probably be considered