Re: Question on string value expression wildcarding
От | Stephan Szabo |
---|---|
Тема | Re: Question on string value expression wildcarding |
Дата | |
Msg-id | Pine.BSF.4.10.10008241142100.32930-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Question on string value expression wildcarding (Steve Wampler <swampler@noao.edu>) |
Список | pgsql-sql |
Do you have any odd locale settings or anything and what's the table definition for the table in question? It seems to do what I expect under my 7.0.2 system: create table kp (name text); insert into kp values ('kp.dhs.a'); insert into kp values ('kp.dhs.'); insert into kp values ('kp.dhs,d'); select * from kp where name like 'kp.dhs.%'; name ----------kp.dhs.akp.dhs. (2 rows) select * from kp where name like 'kp.dhs%'; name ----------kp.dhs.akp.dhs.kp.dhs,d (3 rows) Stephan Szabo sszabo@bigpanda.com On Thu, 24 Aug 2000, Steve Wampler wrote: > > 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."?
В списке pgsql-sql по дате отправления: