Re: Inconsistent time interval formatting - Mailing list pgsql-general

From Gary Chambers
Subject Re: Inconsistent time interval formatting
Date
Msg-id alpine.OSX.2.01.1101131341130.38157@localhost
Whole thread Raw
In response to Re: Inconsistent time interval formatting  (Ben Chobot <bench@silentmedia.com>)
Responses Re: Inconsistent time interval formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>> 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 have the same issue on 8.4. Fixing it is low on my task list, but I too
> would like to know why.

An interim fix might be to cast your output to interval(0) (or to whatever
degree of precision you might need).  I believe I encountered this behavior
some time ago and casting solved the problem for me.

-- Gary Chambers

pgsql-general by date:

Previous
From: Kenneth Buckler
Date:
Subject: Re: Optimal settings for embedded system running PostgreSQL
Next
From: John R Pierce
Date:
Subject: Re: Inconsistent time interval formatting