Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 4 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

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;


share|improve this answer

If you can't find that extension, it's possible you didn't install postgres contrib.

for instance, on centos style os's:

yum install postgresql93-contrib
share|improve this answer

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

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

cat fuzzystrmatch.sql | psql {database name}
share|improve this answer
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

Your Answer


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.