Re: new function for tsquery creartion
Aleksander Alekseev <a.alekseev@postgrespro.ru>
From: Aleksander Alekseev <a.alekseev@postgrespro.ru>
To: Dmitry Ivanov <d.ivanov@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@enterprisedb.com>, Aleksandr Parfenov <a.parfenov@postgrespro.ru>, David Steele <david@pgmasters.net>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-03-28T09:21:15Z
Lists: pgsql-hackers
Hello Dmitry,
> A few gotchas:
>
> I haven't touched gettoken_tsvector() yet. As a result, the following
> queries produce errors:
>
> select websearch_to_tsquery('simple', '''');
> ERROR: syntax error in tsquery: "'"
>
> select websearch_to_tsquery('simple', '\');
> ERROR: there is no escaped character: "\"
>
> Maybe there's more. The question is: should we fix those, or it's fine as it
> is? I don't have a strong opinion about this.
It doesn't sound right to me to accept any input as a general rule but
sometimes return errors nevertheless. That API would be complicated for
the users. Thus I suggest to accept any garbage and try our best to
interpret it.
--
Best regards,
Aleksander Alekseev
Commits
-
Add websearch_to_tsquery
- 1664ae1978bf 11.0 landed
-
Add psql variables to track success/failure of SQL queries.
- 69835bc89888 11.0 cited
-
Wording improvements
- f5f1355dc4dc 8.3.0 cited