| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Brendan Jurd" <direvus(at)gmail(dot)com> |
| Cc: | Ilya А(dot) Кovalenko <shadow(at)oganer(dot)net>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: operator suggest " interval / interval = numeric" |
| Date: | 2008-01-10 06:22:08 |
| Message-ID: | 26393.1199946128@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> On Jan 10, 2008 2:17 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> You'd have to define exactly what that means, which seems a little
>> tricky for incommensurate intervals. For instance what is the
>> result of '1 month' / '1 day' ?
> Postgres has already made such definitions, to allow direct
> interval-interval comparison.
Sure. I was just twitting the OP for having not considered these
issues.
Given that you can get at that behavior by dividing extract(epoch)
results, I tend to think we should leave well enough alone. If someone
did come up with a brilliant definition of what interval division should
do, it would be pretty annoying to have already locked ourselves into a
not-so-brilliant definition ...
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Brendan Jurd | 2008-01-10 06:44:35 | Re: operator suggest " interval / interval = numeric" |
| Previous Message | Dann Corbit | 2008-01-10 06:05:14 | Re: operator suggest " interval / interval = numeric" |