pg-tsquery icon indicating copy to clipboard operation
pg-tsquery copied to clipboard

Ending or starting query in `'` character produces invalid syntax

Open tommoor opened this issue 2 years ago • 3 comments

With the { singleQuoteReplacement: "&" } option the search term one' or 'one

…produces the invalid syntax:

one&

…I think the rule is too simplistic here?

tommoor avatar Dec 04 '22 20:12 tommoor

Would using the option added in https://github.com/caub/pg-tsquery/issues/14 help here?

caub avatar Dec 04 '22 21:12 caub

Sorry, edited the report – the issue is caused by that option.

tommoor avatar Dec 04 '22 21:12 tommoor

We added this singleQuoteReplacement option lately, and I added a comment about it that it should not be a reserved word

For example does it work for you to use a space ' ' or a a '+'?

caub avatar Dec 27 '22 12:12 caub