Thomas Munro <thomas.munro@gmail.com> writes:
> So you want to match only strings that contain U&'\+003436' *not*
> followed by a variation selector (as we also discussed at [1]). I'm
> pretty sure that everything in PostgreSQL considers variation
> selectors to be separate characters.
There might be something that doesn't, but LIKE certainly isn't it.
I don't believe plain LIKE is collation-aware at all, it just sees
characters to match or not match. ILIKE is a little collation-aware,
but it's still not going to consider a combining sequence as one
character. The same for the regex operators.
Maybe it would help if you run the strings through normalize() first?
I'm not sure if that can combine combining characters.
regards, tom lane