Precedence of new phrase search tsquery operator

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Precedence of new phrase search tsquery operator
Дата
Msg-id 32260.1465402409@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Precedence of new phrase search tsquery operator  (Oleg Bartunov <obartunov@gmail.com>)
Re: Precedence of new phrase search tsquery operator  (Oleg Bartunov <obartunov@gmail.com>)
Список pgsql-hackers
It appears that the new <-> operator has been made to have exactly the
same grammatical precedence as the existing & (AND) operator.  Thus,
for example, 'a & b <-> c'::tsquery means something different from
'b <-> c & a'::tsquery:

regression=# select 'a & b <-> c'::tsquery;             tsquery              
-----------------------------------( 'a' <-> 'c' ) & ( 'b' <-> 'c' )
(1 row)

regression=# select 'b <-> c & a'::tsquery;       tsquery        
-----------------------( 'b' <-> 'c' ) & 'a'
(1 row)

I find this surprising.  My intuitive feeling is that <-> ought to
bind tighter than & (and therefore also tighter than |).  What's
the reasoning for making it act like this?
        regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Reviewing freeze map code
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: Precedence of new phrase search tsquery operator