pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Wampler <swampler@noao.edu>
To: postgres-sql <pgsql-sql@postgresql.org>
Subject: Question on string value expression wildcarding
Date: Thu, 24 Aug 2000 11:15:42 -0700
Message-ID: <39A5664E.CC23534C@noao.edu> (raw)


I have LIKE expressions:

	(a)	name LIKE 'kp.dhs.%'
        (b)     name LIKE 'kp.dhs%'

where the name column contains strings prefixed with "kp.dhs.".

I'm using postgresql  7.0.2.

Expression (a) fails to match any names while (b) matches
all strings prefixed with "kp.dhs", including (as expected)
those prefixed with "kp.dhs.".

So I take it that ".%" has some special meaning in wildcarding,
but my (limited) SQL references don't mention this case.
Is this To Be Expected SQL behavior?  If so, what
expression can be used to match only strings prefixed with
"kp.dhs."?

Thanks!
--
Steve Wampler-  SOLIS Project, National Solar Observatory
swampler@noao.edu



view thread (2+ messages)  latest in thread

Message-ID: <39A5664E.CC23534C@noao.edu>
Permalink:  ../39A5664E.CC23534C@noao.edu/
Also on:    postgresql.org/message-id/39A5664E.CC23534C@noao.edu

 · 

reply

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: swampler@noao.edu
  Subject: Re: Question on string value expression wildcarding
  In-Reply-To: <39A5664E.CC23534C@noao.edu>
  References: <39A5664E.CC23534C@noao.edu>

* 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