From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Stephan Szabo <sszabo@megazone23.bigpanda.com>
Cc: Roy Souther <roy@silicontao.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Who do I make _ not a wildcard?
Date: Sun, 29 Jul 2001 23:38:22 -0400 (EDT)
Message-ID: <200107300338.f6U3cMr25435@candle.pha.pa.us> (raw)
In-Reply-To: <Pine.BSF.4.21.0107281214450.89249-100000@megazone23.bigpanda.com>
I also think two underscores make a literal underscore. Same with %.
> On Sat, 28 Jul 2001, Roy Souther wrote:
>
> > In PG the _ is a wildcard that means any singal char. I need to do a search
> > for the actual _ char and not get back thousands of wrong matches. Is there
> > and escape char that I could use? This needs to work with PG 7.0.3 & 7.1.2.
>
> \\_ should work for a literal escape.
> At least on current sources you can do something like:
> like 'blah!_%' escape '!'
> where ! becomes the escape character for the string.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
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: pgman@candle.pha.pa.us, sszabo@megazone23.bigpanda.com, roy@silicontao.com
Subject: Re: Who do I make _ not a wildcard?
In-Reply-To: <200107300338.f6U3cMr25435@candle.pha.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