Skip site navigation (1) Skip section navigation (2)

Select with string that has a lone hyphen yields nothing

From: Beevee <brianvosburgh(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Select with string that has a lone hyphen yields nothing
Date: 2010-04-29 16:29:49
Message-ID: 8bfa2846-1804-42c3-a928-e054276a3ec8@r6g2000vbh.googlegroups.com (view raw or flat)
Thread:
Lists: pgsql-general
I have a product names table like this:

datab=# select product_id, name from table.product_synonyms where name
ilike '%%olympus e-pl1%%';
 product_id
|
name
------------
+---------------------------------------------------------------------------------------------------------------------------------------
       8736 | Olympus E-PL1
       8736 | Olympus E-PL1 Interchangeable Lens Type Live View
Digital Camera – Black (Body Only) (Call for pre-order. Available on:
2010-04-09)
       8736 | Olympus E-PL1 Interchangeable Lens Type Live View
Digital Camera – Blue (Body Only)
       8736 | Olympus E-PL1 Interchangeable Lens Type Live View
Digital Camera w/ ED 14-42mm f3.5-5.6 (champagne/gold)
(4 rows)

Any select statement prior to the hyphen yields a result, but from the
hyphen on yields nothing:

datab=# select product_id, name from table.product_synonyms where name
ilike '%%Olympus E-PL1 Interchangeable Lens Type Live View Digital
Camera -  Blue %%';
 product_id | name
------------+------
(0 rows)

Any ideas how to fix this?

Responses

pgsql-general by date

Next:From: Greg SmithDate: 2010-04-29 16:42:04
Subject: Re: Performance and Clustering
Previous:From: David WallDate: 2010-04-29 16:07:52
Subject: Re: Storing many big files in database- should I do it?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group