Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Tom Lane
Allen Chen writes: >> That won't really help. The fundamental point here is that '1 day' is >> not the same concept as '24 hours', because of DST changes; and the >> interval type treats them as different. > I don't understand how DST changes matter for a time interval or how that > could even b

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Ben Chobot
On Jan 13, 2011, at 1:15 PM, John R Pierce wrote: > On 01/13/11 1:08 PM, Ben Chobot wrote: >> On Jan 13, 2011, at 11:03 AM, Tom Lane wrote: >> >>> If you don't care about that, you can use justify_hours (I think that's >>> the right function) to smash them to the same thing. >> I use justify_hour

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Adrian Klaver
On 01/13/2011 12:55 PM, Allen Chen wrote: That won't really help. The fundamental point here is that '1 day' is not the same concept as '24 hours', because of DST changes; and the interval type treats them as different. If you don't care about that, you can use justify_hours (

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Allen Chen
> > That won't really help. The fundamental point here is that '1 day' is > not the same concept as '24 hours', because of DST changes; and the > interval type treats them as different. > > If you don't care about that, you can use justify_hours (I think that's > the right function) to smash them

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread John R Pierce
On 01/13/11 1:08 PM, Ben Chobot wrote: On Jan 13, 2011, at 11:03 AM, Tom Lane wrote: If you don't care about that, you can use justify_hours (I think that's the right function) to smash them to the same thing. I use justify_hours, and I still get entries like '1 day 35:31:10' intermixed with

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Ben Chobot
On Jan 13, 2011, at 11:03 AM, Tom Lane wrote: > If you don't care about that, you can use justify_hours (I think that's > the right function) to smash them to the same thing. I use justify_hours, and I still get entries like '1 day 35:31:10' intermixed with the entires I'd expect like '2 days 03

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Tom Lane
Gary Chambers writes: >>> Why do some of the intervals show days broken out whereas others only >>> show hours? I have seen intervals left in hours even when the intervals >>> are more than two days long. FWIW, I would prefer if it was always left >>> in hours, but would be happy if it would ju

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread John R Pierce
On 01/13/11 9:34 AM, Allen Chen wrote: Has anyone else out there noticed inconsistencies in how pgsql formats time intervals over 1 day? For example, I have a query that returns a column of intervals and I get output like this: 30:30:00 1 day 03:02:47 1 day 01:38:34 26:25:29.50 Why do some

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Gary Chambers
Why do some of the intervals show days broken out whereas others only show hours? I have seen intervals left in hours even when the intervals are more than two days long. FWIW, I would prefer if it was always left in hours, but would be happy if it would just be consistent either way. I have

Re: [GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Ben Chobot
On Jan 13, 2011, at 9:34 AM, Allen Chen wrote: > Has anyone else out there noticed inconsistencies in how pgsql formats time > intervals over 1 day? > > For example, I have a query that returns a column of intervals and I get > output like this: > > 30:30:00 > 1 day 03:02:47 > 1 day 01:38:34 >

[GENERAL] Inconsistent time interval formatting

2011-01-13 Thread Allen Chen
Has anyone else out there noticed inconsistencies in how pgsql formats time intervals over 1 day? For example, I have a query that returns a column of intervals and I get output like this: 30:30:00 1 day 03:02:47 1 day 01:38:34 26:25:29.50 Why do some of the intervals show days broken out wherea