From: | m w <mttf2000(at)yahoo(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Like vs '=' |
Date: | 2001-01-30 02:54:01 |
Message-ID: | 20010130025401.79555.qmail@web12406.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I have a function to transform text into a
pseudo-metaphone variable, take this
example:
cddbsql=# select song, metatext(song) from cdsongs
where metatext(song) like
metatext('born to run') limit 3 ;
song | metatext
-------------+----------
Born To Run | brntorn
Born To Run | brntorn
Born To Run | brntorn
(3 rows)
Here is the problem: Depending on whether there is an
index or not, 'like'
behaves differently. Here is a transcript:
cddbsql=# select song, metatext(song) from cdsongs
where metatext(song) like
metatext('born to run') limit 1 ;
song | metatext
-------------+----------
Born To Run | brntorn
(1 row)
cddbsql=# create index cdsongs_meta_song on cdsongs
(metatext(song)) ;
CREATE
cddbsql=# select song, metatext(song) from cdsongs
where metatext(song) like
metatext('born to run') limit 1 ;
song | metatext
------+----------
(0
rows)
This happens in both 7.0 and
7.1.
__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2001-01-30 03:17:59 | Re: Can PyGreSQL be updated? |
Previous Message | m w | 2001-01-30 01:34:37 | Subject: like vs '=' |