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