From: | mark <dvlhntr(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | inconsistent interval normalization |
Date: | 2011-11-04 22:18:09 |
Message-ID: | CAKD=pjiVCFKJK=qqTJ3DMTE-GJzW_CDPi+pcj0ipnWOR25erEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-11-04 22:18:55 | Re: Strange problem with create table as select * from table; |
Previous Message | hubert depesz lubaczewski | 2011-11-04 21:57:21 | Re: Strange problem with create table as select * from table; |