Re: Add hint for function named "is"

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add hint for function named "is"
Дата
Msg-id CA+TgmoaCt+JdWYfd4BDH-0EiPyBrVxyWFjHJQdvksJB7eKROLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add hint for function named "is"  (Greg Stark <stark@mit.edu>)
Ответы Re: Add hint for function named "is"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Aug 12, 2016 at 9:40 AM, Greg Stark <stark@mit.edu> wrote:
> On Thu, Aug 11, 2016 at 10:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> I think what is happening
>> in the trouble case is that since IS has lower precedence than Op, the
>> grammar decides it ought to resolve || as a postfix operator, and then
>> it effectively has
>>         ('x' ||) IS ...
>> which leaves noplace to go except IS NULL and other IS-something syntaxes.
>
> I wonder whether it's really worth keeping postfix operators. They
> seem to keep causing these kinds of headaches and I wonder how much
> the grammar tables would be simplified by removing them.

I've wondered the same thing at other times.  The only postfix
operator we ship in core is numeric_fac, and frankly it doesn't seem
worth it just for that.  If we decided that factorial(n) was adequate
notation for that case, and that we didn't care about any hypothetical
user-defined postfix operators either, I think we simplify or improve
a number of things.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Fwd: [BUG] Print timing statistics of trigger execution under turned off timing option of EXPLAIN ANALYZE
Следующее
От: Kisung Kim
Дата:
Сообщение: Re: Btree Index on PostgreSQL and Wiredtiger (MongoDB3.2)