Re: [HACKERS] Precedence of new phrase search tsquery operator

2016-06-22 Thread Teodor Sigaev
Attached patch changes a precedences of operations to |, &, <->, | in ascending order. BTW, it simplifies a bit a code around printing and parsing of tsquery. |, &, <->, ! of course -- Teodor Sigaev E-mail: teo...@sigaev.ru

Re: [HACKERS] Precedence of new phrase search tsquery operator

2016-06-21 Thread Teodor Sigaev
On Wed, Jun 8, 2016 at 7:13 PM, Tom Lane wrote: 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 &

Re: [HACKERS] Precedence of new phrase search tsquery operator

2016-06-08 Thread Oleg Bartunov
On Wed, Jun 8, 2016 at 7:13 PM, Tom Lane wrote: > 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 &

Re: [HACKERS] Precedence of new phrase search tsquery operator

2016-06-08 Thread Oleg Bartunov
On Wed, Jun 8, 2016 at 7:13 PM, Tom Lane wrote: > 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 &

[HACKERS] Precedence of new phrase search tsquery operator

2016-06-08 Thread Tom Lane
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