function for longest common substring?

From: Ben <bench(at)silentmedia(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: function for longest common substring?
Date: 2006-09-25 23:14:57
Message-ID: Pine.LNX.4.64.0609251612270.21293@GRD.cube42.tai.silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Does anybody have a stored proc they'd like to share that computes the
longest common substring for a set of strings? Wikipedia defines the
problem nicely:

http://en.wikipedia.org/wiki/Longest_common_substring_problem

Basically, given "abcba" and "abdba", the algorithm should return "ab" and
"ba" as equally valid answers.

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2006-09-25 23:45:22 Re: getting dates in the past
Previous Message Brandon Aiken 2006-09-25 22:42:46 Re: Timestamp with timezone query