Re: Best method to compare subdomains

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: Best method to compare subdomains
Дата
Msg-id 50F7C2CB.1000500@hogranch.com
обсуждение исходный текст
Ответ на Re: Best method to compare subdomains  (Sumit Raja <sumit.raja@raja-consulting.co.uk>)
Список pgsql-general
On 1/17/2013 1:12 AM, Sumit Raja wrote:
On 16 January 2013 20:23, Robert James <srobertjames@gmail.com> wrote:
Is there a recommended, high performance method to check for subdomains?

Something like:
- www.google.com is subdomain of google.com
- ilikegoogle.com is not subdomain of google.com
...
Maybe the ltree extension will suit what you are trying to do? http://www.postgresql.org/docs/9.2/static/ltree.html

that would work great, if you reversed the word order ...   so (one of my domains),  www.astronomy.santa-cruz.ca.us. becomes .us.ca.santa-cruz.astronomy.www

I half expected to a see a function that would reverse the order of a ltree's elements, ah well.


В списке pgsql-general по дате отправления:

Предыдущее
От: Sumit Raja
Дата:
Сообщение: Re: Best method to compare subdomains
Следующее
От: Albe Laurenz
Дата:
Сообщение: String comparison and the SQL standard