| From: | Michal Politowski <mpol(at)charybda(dot)icm(dot)edu(dot)pl> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Best way to store case-insensitive data? |
| Date: | 2010-06-11 07:27:15 |
| Message-ID: | 20100611072715.GA31926@meep.pl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Thu, 10 Jun 2010 13:50:23 -0700, Mike Christensen wrote:
> I have a column called "email" that users login with, thus I need to
> be able to lookup email very quickly. The problem is, emails are
> case-insensitive. I want foo(at)bar(dot)com to be able to login with
> FOO(at)Bar(dot)com as well. There's two ways of doing this, that I can see:
NB: technically the local part in an email address can be case sensitive.
As RFC 5321 says:
The local-part of a mailbox MUST BE treated as case sensitive.
Therefore, SMTP implementations MUST take care to preserve the case
of mailbox local-parts. In particular, for some hosts, the user
"smith" is different from the user "Smith". However, exploiting the
case sensitivity of mailbox local-parts impedes interoperability and
is discouraged. Mailbox domains follow normal DNS rules and are
hence not case sensitive.
In practice I've yet to see a system having both smith and Smith
and them being different, but still it is theoretically posible.
--
Michał Politowski
Talking has been known to lead to communication if practiced carelessly.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Janning | 2010-06-11 07:28:19 | Re: checkpoint spikes |
| Previous Message | Mike Christensen | 2010-06-11 07:01:18 | Re: Best way to store case-insensitive data? |