Re: LIKE operator and string comparison - Mailing list pgsql-sql

From Wei Weng
Subject Re: LIKE operator and string comparison
Date
Msg-id 41520882.6020702@kencast.com
Whole thread Raw
In response to Re: LIKE operator and string comparison  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: LIKE operator and string comparison
List pgsql-sql
Tom Lane wrote:

> Wei Weng <wweng@kencast.com> writes:
> 
>>But if I choose to use string comparison, instead of 4 escape characters, I 
>>only need 2.
> 
> 
>>Why is that?
> 
> 
> Backslash is an escape character for LIKE.
> 
>             regards, tom lane
> 
> 

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?

Thanks

Wei



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: LIKE operator and string comparison
Next
From: Tom Lane
Date:
Subject: Re: LIKE operator and string comparison