Thread: Mix characters with utf-8 characters on the same query

Mix characters with utf-8 characters on the same query

From
Daniel Vázquez
Date:
Hi guys!

There's a way to mix characters with utf-8 characters on the same query. Some thing like this:

Character: "." (dot)
UTF-8: \u002E

(requisite can't use regex)

For this normal query:
  select * from foo where email like 'email@company.com '
Some thing like this:
  select * from foo where email like 'email@company\u002ecom '
But really I need on Full Text Search query:
  select * from foo where (full_text_search_vector) @@ (to_tsquery('spanish', 'email@company\u002ecom:*'))

Please don't think about why we're trying to match a simple dot in this way. 

Thx!