Re: Best way to store case-insensitive data?

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема Re: Best way to store case-insensitive data?
Дата
Msg-id AANLkTil4SD8dTYD6DY_lidfiDeZnGX4tTTc7UBpSx90p@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Best way to store case-insensitive data?  (Michal Politowski <mpol@charybda.icm.edu.pl>)
Ответы Re: Best way to store case-insensitive data?  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Yea this is a valid point.  It's very possible my design won't work
for the long term, and at some point I'll have to store the email name
exactly as it was entered, and allow the lookup logic to be case
insensitive with a lowercase index.  However, I think the way I have
it now should not break any known email server heh.

Mike

2010/6/11 Michal Politowski <mpol@charybda.icm.edu.pl>:
> 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@bar.com to be able to login with
>> FOO@Bar.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.
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

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

Предыдущее
От: greigwise@comcast.net
Дата:
Сообщение: GSS Authentication
Следующее
От: Michael Leib
Дата:
Сообщение: libpq in Asynchronous mode and COPY