Re: Question about pattern matching

From: Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com>
To: dimitris(dot)sakellarios(at)telesuite(dot)gr
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about pattern matching
Date: 2008-12-23 18:06:34
Message-ID: 2f4958ff0812231006s2961d732wb52ac0bbb5a67f40@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

SELECT ... from ..... WHERE X LIKE pattern || '%' ORDER BY
length(pattern) DESC LIMIT 1;

???

basic prefix matching for telcos :P

--
GJ

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message dimitris.sakellarios 2008-12-23 18:11:24 Re: Question about pattern matching
Previous Message Julius Tuskenis 2008-12-23 17:37:02 Re: Question about pattern matching