Re: Precedence of %

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Precedence of %
Дата
Msg-id 200506041538.j54Fc5d18589@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Precedence of %  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> We could possibly fix this by fooling with the precedence of the
> productions for postfix '%', but I'm worried that that would have
> unintended side-effects.  What I'd like to propose instead is that
> we remove prefix and postfix '%' entirely --- and also '^', which
> is the only other hard-wired operator that appears in all three
> forms in the grammar.  There are no actual uses of prefix or postfix
> '^' in pg_operator, so that loses us nothing.  Prefix and postfix '%'
> exist, but only for the float8 datatype, not anything else; and I
> can't imagine a good reason to write those rather than trunc() or
> round().  (Quick: which is which, and how would you remember?)

Agreed. I didn't know we even supported unary % and ~, and I doubt
anyone else did either.  We just need to mark it as a non-backward
compatible change in CVS commit so I mention it in the release notes.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Precedence of %
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: Precedence of %