Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

Next:From: dimitris.sakellariosDate: 2008-12-23 18:11:24
Subject: Re: Question about pattern matching
Previous:From: Julius TuskenisDate: 2008-12-23 17:37:02
Subject: Re: Question about pattern matching

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group