Re: LIKE operator and string comparison

From: Wei Weng <wweng(at)kencast(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: LIKE operator and string comparison
Date: 2004-09-22 23:19:30
Message-ID: 41520882.6020702@kencast.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom Lane wrote:

> Wei Weng <wweng(at)kencast(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2004-09-22 23:20:48 Re: LIKE operator and string comparison
Previous Message Tom Lane 2004-09-22 23:09:44 Re: LIKE operator and string comparison