Re: [HACKERS] Bug in LIKE ?

From: Vince Vielhaber <vev(at)michvhf(dot)com>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Daniele Orlandi <daniele(at)orlandi(dot)com>, pgsql-hackers(at)hub(dot)org, The Hermit Hacker <scrappy(at)hub(dot)org>
Subject: Re: [HACKERS] Bug in LIKE ?
Date: 1999-06-07 16:11:57
Message-ID: Pine.BSF.4.05.9906071205450.12948-100000@paprika.michvhf.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 7 Jun 1999, Thomas Lockhart wrote:

> > Sure there is: \%. Of course, defaulting to ESCAPE \ rather than no
> > escape is not standards-compliant either, but it's a lot closer than
> > inventing a meaning for %% ...
>
> OK.

I thought I had seen something before about this. In the Sybase 4.9
quick reference on page 21 it says:

To use %,_,[], or [^] as literal characters in a like match string rather
than as wildcards, use square brackets as escape characters for the
percent sign, the underscore and the open bracket. Use the close bracket
but itself. Use the dash as the first character inside a set of brackets.

like "5%" 5 followed by any string of 0 or more characters
like "5[%]" 5%
like "_n" an, in, on, etc.
like "[_]n" _n
like "[a-cdf]" a, b, c, d, or f
like "[-acdf]" -, a, c, d, or f
like "[[]" [
like "]" ]

Wildcards without like have no special meaning.

That help any?

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH email: vev(at)michvhf(dot)com flame-mail: /dev/null
# include <std/disclaimers.h> TEAM-OS2
Online Campground Directory http://www.camping-usa.com
Online Giftshop Superstore http://www.cloudninegifts.com
==========================================================================

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-07 16:21:04 Re: [HACKERS] Re: [COMMITTERS] [WEBMASTER] 'www/html/docs Pg.pm.htmlfaq-dev-english.html faq-english.html faq-hpux.html faq-iri
Previous Message Vince Vielhaber 1999-06-07 16:04:06 Re: [HACKERS] Re: [COMMITTERS] [WEBMASTER] 'www/html/docs Pg.pm.htmlfaq-dev-english.html faq-english.html faq-hpux.html faq-irix.h