Re: Adding an alternate syntax for Phrase Search - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Adding an alternate syntax for Phrase Search
Date
Msg-id CAKFQuwYhxhJ1vSX1sJJcUR=bRpL6M5ow__+BAbHY2o8872NUZA@mail.gmail.com
Whole thread Raw
In response to Re: Adding an alternate syntax for Phrase Search  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On Sun, May 22, 2016 at 6:53 PM, Teodor Sigaev <teodor@sigaev.ru> wrote:

to_tsquery(' Berkus & "PostgreSQL Version 10.0" ')

... would be equivalent to:

to_tsquery(' Berkus & ( PostgreSQL <-> version <-> 10.0 )')

select to_tsquery('Berkus') && phraseto_tsquery('PostgreSQL Version 10.0');
does it as you wish

​Sure, but I imagine (not having used it myself), that in cases involving user input said text treated somewhat holistically and it wouldn't be all that easy, or desirable, to choose between the two forms at runtime.

David J.​
 

pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Changed SRF in targetlist handling
Next
From: Tom Lane
Date:
Subject: Re: 9.4 failure on skink in _bt_newroot/XLogCheckBuffer