Re: [SQL] Interval subtracting - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: [SQL] Interval subtracting
Date
Msg-id 440647D4.9060601@markdilger.com
Whole thread Raw
In response to Re: [SQL] Interval subtracting  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [SQL] Interval subtracting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Mark Dilger <pgsql@markdilger.com> writes:
> 
>>Tom Lane wrote:
>>
>>>If so, one function or the other is cheating.
> 
> 
>>That depends what you mean by cheating.  The justify_hours function
>>looks to see what answer justify_days would give, but does not
>>actually change the data.  I described this all earlier and I still
>>don't see why there is anything wrong with it.
> 
> 
> The problem is that you can't determine "what answer justify_days would
> give" without using the assumption "1 month == 30 days", which is an
> assumption that justify_hours must not depend on.

Ahhh.  So the fact that justify_days already makes the 1 month == 30 days 
assumption is ok in that function but can't be propagated to justify_hours.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Interval subtracting
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: ipcclean in 8.1 broken?