From: | Mark Dilger <pgsql(at)markdilger(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [SQL] Interval subtracting |
Date: | 2006-03-01 23:49:46 |
Message-ID: | 4406331A.6080307@markdilger.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches pgsql-sql |
Bruce Momjian wrote:
> Even if we had people do:
>
> justify_hours(justify_days(justify_hours()))
>
> I don't think that would do what we want in all cases. Consider '1 mon
> -1 hour'. That should be '29 days 23 hours' but neither existing
> function, even if modified, will allow us to return that. Only
> something like justify_interval() could do it.
>
justify_days(justify_hours(...)) fixes *everything* in the most recently
submitted patch, regardless of the convoluted case you invent. There is no data
for which it won't work. There is no need for justify_interval(...), except as
syntactic sugar.
Since the backward compatibility argument didn't convince you, then we should go
with the existing patch as-is. Whether we introduce the new function
justify_interval(...) could be treated as a separate question, though I don't
mind putting that in the patch and resubmitting.
mark
From | Date | Subject | |
---|---|---|---|
Next Message | seth.m.green | 2006-03-01 23:55:26 | ACCESS EXCLUSIVE LOCK |
Previous Message | Mark Dilger | 2006-03-01 23:43:58 | Re: [SQL] Interval subtracting |
From | Date | Subject | |
---|---|---|---|
Next Message | seth.m.green | 2006-03-01 23:55:26 | ACCESS EXCLUSIVE LOCK |
Previous Message | Mark Dilger | 2006-03-01 23:43:58 | Re: [SQL] Interval subtracting |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-01 23:58:25 | Re: [SQL] Interval subtracting |
Previous Message | Andreas Joseph Krogh | 2006-03-01 23:47:53 | Re: Problem with query on history table |