| От | Tom Lane |
|---|---|
| Тема | Re: Precedence of % |
| Дата | |
| Msg-id | 23326.1117859855@sss.pgh.pa.us обсуждение |
| Ответ на | Precedence of % (Bruce Momjian <pgman@candle.pha.pa.us>) |
| Ответы |
Re: Precedence of %
|
| Список | pgsql-hackers |
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Does anyone understand why the precedence of % is strange:
> test=> select -25 % -10;
It's treating it as ((-25) %) - (10), which is probably not so
surprising given the relative precedence of % and - ... though
I have to admit I'm not totally clear why it's not (-(25 %)) - (10)
instead.
We could maybe hack the precedence of the productions for prefix/postfix
%, but I wonder if it wouldn't be smarter to remove 'em altogether
(along with the two existing unary % operators).
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера