Merge rows based on Levenshtein distance - Mailing list pgsql-general

From mongoose
Subject Merge rows based on Levenshtein distance
Date
Msg-id 1417477721526-5828841.post@n5.nabble.com
Whole thread Raw
Responses Re: Merge rows based on Levenshtein distance
Re: Merge rows based on Levenshtein distance
List pgsql-general
I am new to PostgreSQL and I have the following table:

Name, City
"Alex", "Washington"
"Aleex1", "Washington"
"Bob", "NYC"
"Booob", "NYC"

I want to "merge" similar rows based on levenshtein distance between names
so that I have the following table:

id, Name, City
1,"Alex", "Washington"
1,"Aleex1", "Washington"
2,"Bob", "NYC"
2,"Booob", "NYC"

How could I do that on PostgreSQL? Is there an SQL command for this?
Thnsls




--
View this message in context: http://postgresql.nabble.com/Merge-rows-based-on-Levenshtein-distance-tp5828841.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: Melvin Davidson
Date:
Subject: Re: Irreversible SET ROLE
Next
From: Tom Lane
Date:
Subject: Re: Irreversible SET ROLE