Re: Interval->day proposal

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Interval->day proposal
Date: 2005-05-30 16:17:34
Message-ID: 200505300917.34846.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael,

> One advantage of this is that it would allow '1 day' to have a
> different meaning that '24 hours', which would be meaningful when
> crossing daylight saving time changes. For example, PostgreSQL
> returns the following results:

I've been stumping for this for years. See my arguments with Thomas Lockhart
in 2000. A "calendar day" is not the same as 24 hours, and DST behavior has
forced me to use TIMESTAMP WITHOUT TIME ZONE on many a calendaring
application.

Unfortunately, it appears that tri-partitioning INTERVAL ( year/month ;
week/day ; hour/minute/second ) is a violation of the SQL spec which has only
the two partitions ( year/month ; week/day/hour/minute/second ). Have they
changed this in SQL 2003? If not, do we want to do it anyway, perhaps
using a 2nd interval type?

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-05-30 16:40:02 Re: Interval->day proposal
Previous Message Tom Lane 2005-05-30 15:48:09 Re: Interval->day proposal