David Fetter <david@fetter.org> 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 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.
You could possibly approximate the behavior you want with something
likestddev(extract(epoch from interval_col))
which mashes the intervals down to seconds.
regards, tom lane