Обсуждение: inconsistent interval normalization

Поиск
Список
Период
Сортировка

inconsistent interval normalization

От
mark
Дата:
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