Re: SQL compliant interval implementation

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: josh(at)agliodbs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQL compliant interval implementation
Date: 2006-05-23 22:43:48
Message-ID: 200605232243.k4NMhmf29441@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd wrote:
> On 5/24/06, Josh Berkus <josh(at)agliodbs(dot)com> wrote:
> > Brendan,
> >
> > > There are two classes of intervals. One class, called year-month
> > > intervals, has an express or implied datetime precision that includes
> > > no fields other than YEAR and MONTH, though not both are required. The
> > > other class, called day-time intervals, has an express or implied
> > > interval precision that can include any fields other than YEAR or
> > > MONTH.
> >
> > Yeah, we used to do that. It sucked. In fact, most developers of
> > applications which were calendar-heavy ended up using custom data types to
> > work around the SQL-spec INTERVAL limitations. And that benefits nobody.
> >
>
> Could you elaborate on how it sucked? Apart from the issue of
> daylight savings which Tom has mentioned, what are these limitations
> that needed to be worked around?
>
> I've been searching through the archives for discussions relating to
> intervals, but haven't come across the one you're describing. Most
> probably because there have been a LOT of discussions relating to
> intervals.

Well, it seems to just eliminate the 30-day problem by disallowing it,
and creating two data types. I don't see how that is better than what
we have now.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Rodrigo Hjort 2006-05-23 23:11:17 LIKE, leading percent, bind parameters and indexes
Previous Message Brendan Jurd 2006-05-23 22:37:18 Re: SQL compliant interval implementation