Re: request a new feature in fuzzystrmatch - Mailing list pgsql-hackers

From Liming Hu
Subject Re: request a new feature in fuzzystrmatch
Date
Msg-id CAE-MfPuz8FPXaAQShi0J_qoGhAf=0f_BaOMvXMy4HPVC5gQE_A@mail.gmail.com
Whole thread Raw
In response to Re: request a new feature in fuzzystrmatch  (Atri Sharma <atri.jiit@gmail.com>)
Responses Re: request a new feature in fuzzystrmatch  (Atri Sharma <atri.jiit@gmail.com>)
List pgsql-hackers
On Fri, May 17, 2013 at 9:39 PM, Atri Sharma <atri.jiit@gmail.com> wrote:
>
>
> Sent from my iPad
>
> On 18-May-2013, at 10:00, Liming Hu <dawninghu@gmail.com> wrote:
>
>> On 5/17/2013 9:10 PM, Atri Sharma wrote:
>>> On Sat, May 18, 2013 at 9:27 AM, Liming Hu <dawninghu@gmail.com> wrote:
>>>> On 5/17/2013 12:39 PM, Liming Hu wrote:
>>>>> On Fri, May 17, 2013 at 12:06 PM, Josh Berkus <josh@agliodbs.com> wrote:
>>>>>>> Can we add Levenshtein-Damerau edit distance since it is used in
>>>>>>> spelling checker
>>>>>>> instead of levenshtein edit distance?
>>>>>> Patches welcome!  You, too, can be a PostgreSQL contributor.
>>>>>>
>>>>>> However, you will need to preserve the ability of users to use the old
>>>>>> levenshtien algorithm as well, for backwards-compatibility.  Shouldn't
>>>>>> be hard, just add a new function called levenshtiend().
>>>>> I am working on it, I will make it this weekend project.
>>>>
>>>> I have done that. and put the code at github:
>>>> https://github.com/liminghu/fuzzystrmatch
>>>>
>>>> liming@liming-UX31A:~/Downloads/postgresql-9.1.9/contrib/fuzzystrmatch$
>>>> sudo cp fuzzystrmatch.so
>>>> /usr/lib/postgresql/9.1/lib/fuzzystrmatch.so
>>>> liming@liming-UX31A:~/Downloads/postgresql-9.1.9/contrib/fuzzystrmatch$
>>>> sudo /etc/init.d/postgresql restart
>>>>
>>>>  * Restarting PostgreSQL 9.1 database server
>>>>
>>>>    [ OK ]
>>>>
>>>>
>>>> select dameraulevenshteinnocompatible('cta', 'cat',1,1,1,1);
>>>> CREATE EXTENSION fuzzystrmatch;
>>>>
>>>> ********** Error **********
>>>>
>>>> ERROR: could not load library
>>>> "/usr/lib/postgresql/9.1/lib/fuzzystrmatch.so":
>>>> /usr/lib/postgresql/9.1/lib/fuzzystrmatch.so: undefined symbol:
>>>> damerau_levenshtein_internal_noncompatible
>>>>
>>>> Any one can help me on this? Thanks.
>>> The system is not able to find the required library, and I dont think
>>> using cp to place the library is a very good idea.Did you run Make
>>> Install after you added your work in the Makefile?
>>
>> I did not run make install. I am running a stable postgresql in my laptop, I do not
>> want to reinstall everything, just want to try this contribution.  I am afraid
>> reinstall it will destroy my configurations, and databases, just do not want to mess up.
>> did you see any thing wrong:
>> https://github.com/liminghu/fuzzystrmatch/blob/master/fuzzystrmatch--1.0.sql
>> https://github.com/liminghu/fuzzystrmatch/blob/master/fuzzystrmatch--unpackaged--1.0.sql
>> https://github.com/liminghu/fuzzystrmatch/blob/master/fuzzystrmatch.c
>> https://github.com/liminghu/fuzzystrmatch/blob/master/dameraulevenshtein.c
>> https://github.com/liminghu/fuzzystrmatch/blob/master/
>
>
>
> You need not reinstall your entire database for installing/re installing an extension.Running make install from the
extension'sdirectory(after placing it in /contrib of a postgres database source directory) will install the extension
inyour current database without breaking anything. 

You mean:
liming@liming-UX31A:~/Downloads/postgresql-9.1.9/contrib/fuzzystrmatch$
make install
?


>
> Regards,
>
> Atri
>>



--
Liming Hu
cell: (435)-512-4190
Seattle Washington



pgsql-hackers by date:

Previous
From: Atri Sharma
Date:
Subject: Re: request a new feature in fuzzystrmatch
Next
From: Atri Sharma
Date:
Subject: Re: request a new feature in fuzzystrmatch