Closes Match - Mailing list pgsql-sql

From Christian Rusa
Subject Closes Match
Date
Msg-id 42E521DF.4000804@rusa.at
Whole thread Raw
Responses Re: Closes Match
List pgsql-sql
Hi there,

I want to match a string against the database and get the closest 
(shorter) match.
I was asking myself if its possible to realise this in SQL.

So if the string is:
abcdefg

And in the database are entries like:
a
ab
abc

I just want to get back 'abc'.

I looked around in the internet and the documentation but found no solution.

Cheers Christian

pgsql-sql by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: update vs unique index
Next
From: Bruno Wolff III
Date:
Subject: Re: Closes Match