search=# select to_tsquery('foo bar');
ERROR: syntax error
Might want to enhance that message to include the information that it's
parsing the tsquery that's failing? I originally had it as part of a
much larger query, and it took me a while to remember that it's tsearch
that spits out that very generic error message.
//Magnus