| От | Tom Lane |
|---|---|
| Тема | Re: operator suggest " interval / interval = numeric" |
| Дата | |
| Msg-id | 26393.1199946128@sss.pgh.pa.us обсуждение |
| Ответ на | Re: operator suggest " interval / interval = numeric" ("Brendan Jurd" <direvus@gmail.com>) |
| Список | pgsql-hackers |
"Brendan Jurd" <direvus@gmail.com> writes:
> 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.
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
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера