Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group