Re: OR tsquery

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: OR tsquery
Date: 2010-01-16 16:05:57
Message-ID: 7205.1263657957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> writes:
> to_tsquery and plainto_tsquery produce AND tsquery
> 'apple banana orange' -> 'apple' & 'banana' & 'orange'

Only the latter. Try to_tsquery again:

regression=# select to_tsquery('foo bar');
ERROR: syntax error in tsquery: "foo bar"
regression=# select to_tsquery('foo & bar');
to_tsquery
---------------
'foo' & 'bar'
(1 row)

regression=# select to_tsquery('foo | bar');
to_tsquery
---------------
'foo' | 'bar'
(1 row)

regards, tom lane

In response to

  • OR tsquery at 2010-01-16 14:32:06 from Ivan Sergio Borgonovo

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2010-01-16 16:10:45 Re: OR tsquery
Previous Message Ivan Sergio Borgonovo 2010-01-16 14:32:06 OR tsquery