| От | Tom Lane |
|---|---|
| Тема | Re: interval integer comparison |
| Дата | |
| Msg-id | 12754.1117554374@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | interval integer comparison (Havasvölgyi Ottó <h.otto@freemail.hu>) |
| Список | pgsql-general |
=?iso-8859-2?Q?Havasv=F6lgyi_Ott=F3?= <h.otto@freemail.hu> writes:
> Pg 8.0.3 allows me to compare interval with integer, but I cannot see any
> reasonable rule:
> 1 < '1 days'::interval
The reason that doesn't fail outright is that both integer and
interval have implicit coercions to text. So the only interpretation
the parser can find is to convert both sides to text and use the text <
operator. As text comparisons your answers all make sense.
I've been arguing for a long time that we need to cut down on the number
of implicit coercions to text...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера