Inconsistent time interval formatting

From: Allen Chen <rocklob(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Inconsistent time interval formatting
Date: 2011-01-13 17:34:45
Message-ID: AANLkTinoyWQssJOAcph=6fC9En2Yvd=Dn9smt8Xk3V+s@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 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'm running PostgreSQL 8.3.12, but I have seen this in earlier versions I've
used too.

-Allen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jon Smark 2011-01-13 17:58:25 Re: Record with a field consisting of table rows
Previous Message Bruce Momjian 2011-01-13 17:32:47 Re: C++ keywords in headers (was Re: [GENERAL] #include <funcapi.h>)