From: Tom Lane <tgl@sss.pgh.pa.us>
To: Phuong Ma <pma@commandprompt.com>
Cc: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] inconsistent functionality with LIKE operator
Date: Thu, 29 Mar 2001 11:43:43 -0500
Message-ID: <22657.985884223@sss.pgh.pa.us> (raw)
In-Reply-To: <3AC2F17A.BFC50830@commandprompt.com>
References: <3AC2F17A.BFC50830@commandprompt.com>
Phuong Ma <pma@commandprompt.com> writes:
> I'm using PostgreSQL version 7.1, and I'm having trouble with the LIKE
> statement. How would I find the value "a\bc"? I tried using the
> backslash to escape it: LIKE 'a\\b%';
I think you need four backslashes. The string-literal parser eats one
level of backslashes, but you need the pattern that arrives at LIKE
to look like "a\\b%".
BTW, "PostgreSQL version 7.1" does not exist yet.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, pma@commandprompt.com, pgsql-general@postgresql.org
Subject: Re: [SQL] inconsistent functionality with LIKE operator
In-Reply-To: <22657.985884223@sss.pgh.pa.us>
References: <3AC2F17A.BFC50830@commandprompt.com> <22657.985884223@sss.pgh.pa.us>
* 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