Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have installed postgresql according to this, but I also need fuzzy string match functions, but I have no idea how to install these.

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

For the Mac, the .sql files are in a folder such as /Library/PostgreSQL/8.3/share/postgresql/contrib

share|improve this answer
    
For me, it was in /Library/PostgresPlus/8.3/share/contrib . –  Clinton Blackmore Jun 10 '09 at 23:31
add comment

If you are looking for levenshtein or other functions in fuzzystrmatch package in postgresql 9.1, just do this:

# Login with postgres user and:
psql my_database -U postgres
# Enter the postgres password and type in the psql shell:
CREATE EXTENSION fuzzystrmatch;

Done.

share|improve this answer
add comment

Usually with a sql file full of functions, it is something like this:

cat fuzzystrmatch.sql | psql {database name}
share|improve this answer
1  
the problem is, where can I get that file?, it isn't in my system. –  Alex. S. May 20 '09 at 15:07
    
Ask the guys from "PostgreSQL for Mac". –  Milen A. Radev May 21 '09 at 8:59
add comment

Based on the answer here in the context of a Rails migration, all it takes is:

create extension fuzzystrmatch;
create extension pg_trgm;
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.