inconsistent interval normalization - Mailing list pgsql-general

From mark
Subject inconsistent interval normalization
Date
Msg-id CAKD=pjiVCFKJK=qqTJ3DMTE-GJzW_CDPi+pcj0ipnWOR25erEA@mail.gmail.com
Whole thread Raw
List pgsql-general
hi all,

pgsql version: 9.0.5
intervalstyle: postgres



I am stumped why I am seeing inconsistent interval normalization with
a given query.


select date_trunc('week', datetime_submitted), avg(datetime_modified -
datetime_submitted)
FROM interval_test
group by 1 order by 1;


returned rows that don't make sense to me are like:

2011-10-03 00:00:00-06 | 26:27:26.471216

I would expect these to be normalize into something like...
2011-10-03 00:00:00-06 | 1 day 02:24:26.471216


I do have other rows in the result set that are normalizing to "N days"



thoughts ? any ideas on how I can make the normalization consistent.



  (I can upload some dummy data and a dummy ddl if needed)

Mark

pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Strange problem with create table as select * from table;
Next
From: Tom Lane
Date:
Subject: Re: Strange problem with create table as select * from table;