Re: [SQL] Interval subtracting

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Dilger <pgsql(at)markdilger(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [SQL] Interval subtracting
Date: 2006-03-02 14:49:32
Message-ID: 2476.1141310972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches pgsql-sql

Mark Dilger <pgsql(at)markdilger(dot)com> writes:
> Tom Lane wrote:
>> 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.

Right. I don't want us to define things so that none of this
functionality is available in situations where the 30-day assumption is
untenable. justify_hours can still do something useful (ie, trim
oversize hours fields) without that.

justify_interval will probably be the new "normal" way to do things when
you are prepared to make both assumptions. I'm not entirely sure about
the use-case for justify_days, but seems we ought to keep it for reasons
of backwards compatibility.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew - Supernews 2006-03-02 14:58:37 Re: ACCESS EXCLUSIVE LOCK
Previous Message seth.m.green 2006-03-02 14:30:19 Re: ACCESS EXCLUSIVE LOCK

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew - Supernews 2006-03-02 14:58:37 Re: ACCESS EXCLUSIVE LOCK
Previous Message seth.m.green 2006-03-02 14:30:19 Re: ACCESS EXCLUSIVE LOCK

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-03-02 15:21:22 Re: dump with lo
Previous Message Aniko.Badzong 2006-03-02 14:26:44 FW: sql copy does not work