Re: Interval->day proposal - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: Interval->day proposal
Date
Msg-id 200505300917.34846.josh@agliodbs.com
Whole thread Raw
In response to Interval->day proposal  (Michael Glaesemann <grzm@myrealbox.com>)
Responses Re: Interval->day proposal  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Interval->day proposal
Next
From: Tom Lane
Date:
Subject: Re: Interval->day proposal