I used the following SQL code to match '\foo\bar'
SELECT text FROM test WHERE text LIKE '\\\\foo\\\\%'
But if I choose to use string comparison, instead of 4 escape characters, I
only need 2.
SELECT text FROM test WHERE text = '\\foo\\bar'
Why is that?
I am using PostgreSQL 7.4, and the SQL code was entered through psql.
pgsql-sql by date
|Next:||From: Tom Lane||Date: 2004-09-22 23:09:44|
|Subject: Re: LIKE operator and string comparison |
|Previous:||From: Josh Berkus||Date: 2004-09-22 17:16:02|
|Subject: Re: Porting problem from Informix to Postgres...|