PostgreSQL has a contrib module named pg_trgm. It is used to the fuzzy text search. It provides some functions and operators for determining the similarity of the given texts using trigram matching.
Sorry, I have forgotten to mark previous message with [PROPOSAL].
I think, you shouldn't mark thread as [PROPOSAL] since you're providing a full patch.