| От | Tom Lane |
|---|---|
| Тема | Re: Cast has higher precedence than - |
| Дата | |
| Msg-id | 24974.1430700848@sss.pgh.pa.us обсуждение |
| Ответ на | Cast has higher precedence than - (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
| Список | pgsql-hackers |
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
> The problem is that :: binds more tightly than -
This is well known, and even well documented.
> Is this by design? If not, any ideas how bad it'd be to fix?
It is by design. The core argument for doing it is that '-' might have
type-dependent semantics that would not be reproduced by negating first
and casting afterwards.
Even if you could convince people that that concern is baseless, there
would be a backwards-compatibility problem. For a comparison point,
note the hurdles I had to jump to persuade people that we should change
the precedence of comparison operators --- something that has clear
support in the standard, as this change would not.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера