Wei Weng <wweng@kencast.com> writes:
> What about in regular strings? I do need to use backslash to escape the
> other backslash in order to get the '\'. Why isn't that the case in LIKE
> operation?
It is. You write four backslashes in order to describe a string
constant value containing two backslashes. When the LIKE code sees
that, it interprets it as one quoted backslash.
See LIKE ... ESCAPE if you'd like to use a different escape character
in the LIKE pattern.
regards, tom lane