I’ve a problem with LIKE operator in PostgreSQL. It does not match patterns that contain the - character. I’ve tried to escape these characters using the ESCAPE option, but it still does not work.
Query:
select * from footable where trascrizione like '% [---]is Abraam %';
Sample data (contents of column trascrizione):
[---]is Abraam [e]t Ise[---] / ((crux quadrata))
How can I solve this problem?
That pattern would not match because there is no space before
[---]is Ambraam. There is a space in your pattern, between the%and[characters, and it’s requiring that space to be in your data. TryLIKE '%[---]is Abraam %'.