Question about pattern matching

From: dimitris(dot)sakellarios(at)telesuite(dot)gr
To: pgsql-general(at)postgresql(dot)org
Subject: Question about pattern matching
Date: 2008-12-23 16:05:08
Message-ID: 20081223180508.lvrj5tv7uoskk4kw@zeus.netdynamics.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

TABLENAME

id Candidate pattern
-------------------------
1 0089258068520
2 008925806852
3 00892580685
4 0089258068
5 008925806
6 00892580
7 0089258
8 008925
9 00892
10 0089
11 008
12 00
13 0

PATTERN
-------
0089257000000

QUESTION
--------
Pls let me know which is the best way to match the
following pattern against this table and Receive id = 8
that is the longest matching pattern from left to right.

BR,
Sakellarios Dimitris.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emanuel Calvo Franco 2008-12-23 16:09:35 Donwload 8.4
Previous Message Herouth Maoz 2008-12-23 14:43:56 Re: Copy/delete issue