From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best method to compare subdomains |
Date: | 2013-01-17 09:22:19 |
Message-ID: | 50F7C2CB.1000500@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 1/17/2013 1:12 AM, Sumit Raja wrote:
> On 16 January 2013 20:23, Robert James <srobertjames(at)gmail(dot)com
> <mailto:srobertjames(at)gmail(dot)com>> wrote:
>
> Is there a recommended, high performance method to check for
> subdomains?
>
> Something like:
> - www.google.com <http://www.google.com> is subdomain of
> google.com <http://google.com>
> - ilikegoogle.com <http://ilikegoogle.com> is not subdomain of
> google.com <http://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.
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2013-01-17 09:25:57 | String comparison and the SQL standard |
Previous Message | Sumit Raja | 2013-01-17 09:12:01 | Re: Best method to compare subdomains |