Re: Best way to store case-insensitive data?
| От | Lew |
|---|---|
| Тема | Re: Best way to store case-insensitive data? |
| Дата | |
| Msg-id | hv2vo1$sop$1@news.albasani.net обсуждение исходный текст |
| Ответ на | Re: Best way to store case-insensitive data? (Mike Christensen <mike@kitchenpc.com>) |
| Список | pgsql-general |
Please don't top-post. Mike Christensen wrote: > Ah, I should probably upgrade to 8.4. However, I'll probably just > wait for 9.0 to come out. So it seems like citext will be about the > same as casting both sides to LOWER(), plus putting an index on the > lowercase version of the text. I'd probably use that if it were out > of the box, but I'm trying to stay away from adding too many > dependencies.. I think I'll stick with my original approach of only > storing lowercase data in the DB, and perhaps put a CHECK constraint > on there to ensure no upper case letters sneak in. If your db contains international text there are some corner cases where lower( upper( val )) != val or upper( lower( val )) != val. Or there should be, because that's what happens in certain languages. For example, upper-case 'ß' should be 'SS' in German. Lower-case 'SS' is 'ss'. -- Lew
В списке pgsql-general по дате отправления: