Re: primary key on lower(varchar)

Поиск
Список
Период
Сортировка
От
Тема Re: primary key on lower(varchar)
Дата
Msg-id 0d3101c6134b$50c858e0$0201a8c0@iwing
обсуждение исходный текст
Ответ на primary key on lower(varchar)  (<me@alternize.com>)
Ответы Re: primary key on lower(varchar)  (<operationsengineer1@yahoo.com>)
Re: primary key on lower(varchar)  (Charley Tiggs <ctiggs@xpressdocs.com>)
Список pgsql-novice
 > I don't really see the use-case for what you want anyway.  Why don't
> you just require the field to be all lower case, eg with a CHECK
> constraint?

simple case: lets say the table "translated_names" contains an foreign key,
the translated word and the language the word is in. obviously,
"Brotaufstrich" and "brotaufstrich" must relate to the same record. if i'm
just saving the records in lowercase (or uppercase) i'm loosing the proper
letter case...

the workaround of adding 2 word fields (word_lower, word_normal)  and
setting word_lower to primary key unfortunately wastes a lot of diskspace
espially when the table grows large...

- thomas



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: primary key on lower(varchar)
Следующее
От:
Дата:
Сообщение: Re: primary key on lower(varchar)