BUG #4446: Full text search cannot start with an apostrophe
The following bug has been logged online:
Bug reference: 4446
Logged by: Ryan Wallace
Email address: rywall@interchange.ubc.ca
PostgreSQL version: 8.3.4
Operating system: Windows XP SP2
Description: Full text search cannot start with an apostrophe
Details:
A tsquery cannot be created if the first character is an apostrophe:
eg.
SELECT * FROM text_search_vectors WHERE
text_search_vector @@ to_tsquery('''ksan&panel')
Error Generated:
ERROR: syntax error in tsquery: "'ksan&panel"
SQL state: 42601
"Ryan Wallace" <rywall@interchange.ubc.ca> writes:
A tsquery cannot be created if the first character is an apostrophe:
SELECT * FROM text_search_vectors WHERE
text_search_vector @@ to_tsquery('''ksan&panel')
That's not a bug, that's you not following the syntax rules for lexemes.
You'd need something like $$'''ksan' & panel$$ to represent a lexeme
with a quote in it.
regards, tom lane