Re: [PATCH] Phrase search ported to 9.6 - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: [PATCH] Phrase search ported to 9.6
Date
Msg-id 56FE7067.30200@sigaev.ru
Whole thread Raw
In response to Re: [PATCH] Phrase search ported to 9.6  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [PATCH] Phrase search ported to 9.6  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
> Well, I noticed that the docs talk about an operator that can be used in
> SQL (outside the tsquery parser), as well as an operator that can be
Just to join 2 tsquery with operator FOLLOWED BY

> used inside tsquery.  Inside tsquery anything would be usable, but
> outside that it would be good to keep in mind the rest of SQL operators;
> and <> means "different from", so using it for FOLLOWED BY seems odd to
> me.
previous rule was: duplicate operation character to join tsqueries.
Ellipsis is forbidden to use as operator name:
#  create operator ... (procedure = 'int2and');
ERROR:  syntax error at or near ".."
LINE 1: create operator ... (procedure = 'int2and');
What is your suggestion for joining operator name?

> My suggestion of ... (ellipsis) is because that's already known as
> related to text, used for omissions of words, where the surrounding
> words form a phrase.  It seems much more natural to me.
Yes, agree for omission. But for reason above its'n a good name although I don't 
have a strong objections.

may be <=>? it isn't used anywhere yet.

select 'fat'::tsquery <=> 'cat';
select 'fat <=> cat'::tsquery;
select 'fat <3> cat'::tsqyery; -- for non-default distance.


-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: SSL indicator in psql prompt
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] Phrase search ported to 9.6