Thread: Can anyone explain?

Can anyone explain?

From
"Abraham, Danny"
Date:
set standard_conforming_strings=on;

select 'abcd\efg' like 'abcd\efg' ==> F (I expected it to be T)

select 'abcd\efg' like 'abcd\\efg' ==> T (I expected it to be F)

Thanks

Danny Abraham
BMC Software
CTM&D Business Unit
972-52-4286-513
danny_abraham@bmc.com


Re: Can anyone explain?

From
Tom Lane
Date:
"Abraham, Danny" <danny_abraham@bmc.com> writes:
> set standard_conforming_strings=on;
> select 'abcd\efg' like 'abcd\efg' ==> F (I expected it to be T)
> select 'abcd\efg' like 'abcd\\efg' ==> T (I expected it to be F)

Backslash is the default LIKE escape character.

            regards, tom lane