Re: Duplicate Values or Not?!

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Duplicate Values or Not?!
Дата
Msg-id 20050917181402.GB11697@svana.org
обсуждение исходный текст
Ответ на Re: Duplicate Values or Not?!  (Mike Nolan <nolan@gw.tssi.com>)
Ответы Re: Duplicate Values or Not?!  (Greg Stark <gsstark@mit.edu>)
Список pgsql-general
On Sat, Sep 17, 2005 at 12:45:17PM -0500, Mike Nolan wrote:
> > I don't know if it's guarenteed by spec, but it certainly seems silly
> > for strings to compare equal when they're not. Just because a locale
> > sorts ignoring case doesn't mean that "sun" and "Sun" are the same. The
> > only real sensible rule is that strcoll should return 0 only if strcmp
> > would also return zero...
>
> I disagree.  Someone who wants true case independence (for whatever reason)
> needs all aspects of uniqueness such as selects, indexes and groups
> treating data the same way.
>
> This needs to be something the person who creates the instance or the
> database can control.

Such people need to be looking at citext [1]. My point is that the
*locale* should not be case-insensetive that way. Consider that if the
locale treats "sun" and "Sun" identically, then I can't have
case-sensetivity if I want it. If they are treated differently, I can
build case-insensetivity on top of it.

[1] http://gborg.postgresql.org/project/citext/projdisplay.php
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Вложения

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

Предыдущее
От: Mike Nolan
Дата:
Сообщение: Re: Duplicate Values or Not?!
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Duplicate Values or Not?!