Search Postgresql Archives

inconsistent interval normalization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux