Re: No stddev() for interval?

From: "Nikolay Samokhvalov" <samokhvalov(at)gmail(dot)com>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: No stddev() for interval?
Date: 2006-05-20 22:21:51
Message-ID: e431ff4c0605201521t7fa65934t53e1e6025739d76c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 5/21/06, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
>
> Well if you're willing to accept that for the purposes of computing the
> aggregates, an interval "month" is equal to 30 days (which is how
> avg(interval) already works), then an interval is reducable to a single
> quantity -- a number of seconds -- which can be squared.
>

Let me make a correction. Internally, intervals are stored as separate
values of months and days (and even seconds, for daylight saving
purposes). So, in almost all cases everything is OK. But it isn't so
when we should multiply or devide such 'hetorogenious intevals'
("select interval '1 month 1 day';" gives us '15 days 12:00:00')...

--
Best regards,
Nikolay

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ivan Zolotukhin 2006-05-20 22:31:44 Re: No stddev() for interval?
Previous Message Bob Pawley 2006-05-20 22:11:20 Read Write