Re: operator suggest " interval / interval = numeric"

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Warren Turkal" <wturkal(at)gmail(dot)com>, Ilya А(dot) Кovalenko <shadow(at)oganer(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: operator suggest " interval / interval = numeric"
Date: 2008-01-10 06:44:35
Message-ID: 37ed240d0801092244w32e573efq7eccec1eb4306796@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jan 10, 2008 5:00 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The spec's approach to datetime operations in general is almost totally
> brain-dead, and so you won't find a lot of support around here for hewing
> to the straight-and-narrow-spec-compliance approach. If they have not
> even heard of daylight-savings time, how can anyone credit them with any
> meaningful contact with the real world? We'll cite the spec where it
> suits us, but in this area "the spec says you can't do that" carries
> very little weight.

It's true that the spec fails to consider DST, in that it doesn't
partition "day" and "second" intervals separately.

But is that really a reason to reject the concept of interval
partitioning altogether? It seems the spec has the right idea, it
just doesn't take it far enough to cover all the bases.

Whether the spec is braindead w.r.t intervals or not, Postgres is
clearly giving the wrong answer. A year interval is not 360 day
intervals long. A month interval is not shorter than 31 day
intervals. And, thanks to the geniuses who came up with DST, a day
interval is not the same as 24 hour intervals anymore. None of these
comparisons are sane.

Regards,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-10 07:06:19 Re: operator suggest " interval / interval = numeric"
Previous Message Tom Lane 2008-01-10 06:22:08 Re: operator suggest " interval / interval = numeric"