Re: Statistical Lacunae in Interval type - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Statistical Lacunae in Interval type
Date
Msg-id 200407121657.45512.peter_e@gmx.net
Whole thread Raw
In response to Re: Statistical Lacunae in Interval type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Statistical Lacunae in Interval type
List pgsql-hackers
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 than recording temperature 
measurements in a numeric column and then taking the standard 
deviation.  Kelvin squared does not make much sense, but it's only an 
intermediate quantity.

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.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Statistical Lacunae in Interval type
Next
From: Tom Lane
Date:
Subject: Re: Statistical Lacunae in Interval type