Best method to compare subdomains - Mailing list pgsql-general

From Robert James
Subject Best method to compare subdomains
Date
Msg-id CAGYyBgiSoKuO7ewt=7MGJ7sV5qFjxjec47RnkSE=QxoLVAE4qg@mail.gmail.com
Whole thread Raw
Responses Re: Best method to compare subdomains  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Best method to compare subdomains  (Steve Atkins <steve@blighty.com>)
Re: Best method to compare subdomains  (Sumit Raja <sumit.raja@raja-consulting.co.uk>)
List pgsql-general
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

There are many ways to do this (lowercase and reverse the string,
append a '.' if not there, append a '%', and do a LIKE).  But I'm
looking for one that will perform well when the master domain list is
an indexed field in a table, and when the possible subdomain is either
an individual value, or a field in a table for a join (potentially
indexed).


pgsql-general by date:

Previous
From: Marcel van Pinxteren
Date:
Subject: Re: Case insensitive collation
Next
From: Andrew Sullivan
Date:
Subject: Re: Best method to compare subdomains