Question about pattern matching - Mailing list pgsql-general

From dimitris.sakellarios@telesuite.gr
Subject Question about pattern matching
Date
Msg-id 20081223180508.lvrj5tv7uoskk4kw@zeus.netdynamics.gr
Whole thread Raw
Responses Re: Question about pattern matching  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Re: Question about pattern matching  (Craig Ringer <craig@postnewspapers.com.au>)
Re: Question about pattern matching  (Julius Tuskenis <julius.tuskenis@gmail.com>)
Re: Question about pattern matching  ("Grzegorz Jaśkiewicz" <gryzman@gmail.com>)
Re: Question about pattern matching  (hubert depesz lubaczewski <depesz@depesz.com>)
List 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.


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Copy/delete issue
Next
From: "Scott Marlowe"
Date:
Subject: Re: Question about pattern matching