Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6U3cqf21107 for ; Sun, 29 Jul 2001 23:38:53 -0400 (EDT) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.10.1/8.10.1) id f6U3cMr25435; Sun, 29 Jul 2001 23:38:22 -0400 (EDT) From: Bruce Momjian Message-Id: <200107300338.f6U3cMr25435@candle.pha.pa.us> Subject: Re: Who do I make _ not a wildcard? In-Reply-To: "from Stephan Szabo at Jul 28, 2001 12:18:40 pm" To: Stephan Szabo Date: Sun, 29 Jul 2001 23:38:22 -0400 (EDT) CC: Roy Souther , pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL90 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200107/376 X-Sequence-Number: 4190 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