Lists: | pgsql-bugs |
---|
From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | /contrib/soundex doesn't work. Version 7.0.2 |
Date: | 2000-09-29 05:57:25 |
Message-ID: | 200009290557.e8T5vP405709@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Edmar Wiggers (edmarw(at)yahoo(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
/contrib/soundex doesn't work. Version 7.0.2
Long Description
The code in /contrib/soundex doesn't work. It does compile though. I create the function in the database, but it always returns nothing (blank)!
It should be a small stupid mistake in the source code. I bet you can fix it within 5 minutes (as opposed to me, who would take about 5 hours). If you can look into it, please drop me a line.
Sample Code
No file was uploaded with this report
From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | edmarw(at)yahoo(dot)com, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: /contrib/soundex doesn't work. Version 7.0.2 |
Date: | 2000-09-29 14:51:51 |
Message-ID: | Pine.LNX.4.21.0009291641200.363-200000@peter |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
pgsql-bugs(at)postgresql(dot)org writes:
> The code in /contrib/soundex doesn't work. It does compile though. I
> create the function in the database, but it always returns nothing
> (blank)!
Hmm, while I can confirm that the soundex algorithm is implemented
incorrectly I never get blanks only. Check that you have defined the
function like this:
CREATE FUNCTION soundex(text) RETURNS text AS
'/some/where/soundex.so', 'text_soundex' LANGUAGE 'C';
(ignore the stuff in soundex.sql, it's broken).
To get a correct implementation of soundex, apply the attached patch.
You need to restart the server to get it to load the new object file.
Also note that there is a disagreement among experts over one particular
part of the algorithm. Check it out with your favourite search engine.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
Attachment | Content-Type | Size |
---|---|---|
soundex-patch | text/plain | 1006 bytes |