From: Wei Weng <wweng@kencast.com>
To: pgsql-sql@postgresql.org
Subject: LIKE operator and string comparison
Date: Wed, 22 Sep 2004 18:54:46 -0400
Message-ID: <415202B6.7060903@kencast.com> (raw)
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.
Thanks!
Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: wweng@kencast.com
Subject: Re: LIKE operator and string comparison
In-Reply-To: <415202B6.7060903@kencast.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox