Re: operator suggest " interval / interval = numeric"

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: operator suggest " interval / interval = numeric"
Дата
Msg-id 37ed240d0801092033j675c4113s79a0de3968e67c8b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: operator suggest " interval / interval = numeric"  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: operator suggest " interval / interval = numeric"  ("Warren Turkal" <wturkal@gmail.com>)
Re: operator suggest " interval / interval = numeric"  ("Brendan Jurd" <direvus@gmail.com>)
Re: operator suggest " interval / interval = numeric"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Jan 10, 2008 2:17 AM, Tom Lane <tgl@sss.pgh.pa.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.

1 month is deemed equal to 30 days, 1 day is deemed equal to 24 hours
(although for some reason we ignore the issue of years vs. days).

I argued in a long-dead thread that we should disallow these kinds of
comparisons altogether, but I didn't manage to generate much
enthusiasm.  The overall sentiment seemed to be that the slightly
bogus results were more useful than no result at all.

That being the case, if we're comfortable making these kinds of
arbitrary definitions for comparison purposes, it doesn't seem like
much of a stretch to allow multiplication and division of intervals
using the same rules.

Regards,
BJ


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: operator suggest " interval / interval = numeric"
Следующее
От: "Warren Turkal"
Дата:
Сообщение: Re: operator suggest " interval / interval = numeric"