Search Postgresql Archives

Re: Best method to compare subdomains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/17/2013 1:12 AM, Sumit Raja wrote:
On 16 January 2013 20:23, Robert James <srobertjames@xxxxxxxxx> 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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux