Re: UNIQUE INDEX difference between 7.2 and 7.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: UNIQUE INDEX difference between 7.2 and 7.3
Дата
Msg-id 15774.1060717468@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: UNIQUE INDEX difference between 7.2 and 7.3  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Ответы Re: UNIQUE INDEX difference between 7.2 and 7.3  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-bugs
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> Okay, I see it with en_US.UTF-8, but not with C locale, nor with
> en_US or en_US.iso885915.  It looks like the comparison rules are
> different between the locales (and I'm not sure if SQL_ASCII encoding
> and a UTF8 locale makes sense in practice).

I'd think not --- the byte sequence is most likely not a valid string in
UTF8 encoding.  I'm not sure what strcoll() would do when comparing
illegal byte sequences, but failing to detect that they're different is
certainly not too implausible.

This brings up once again the question of whether initdb ought to accept
the locale it finds in the environment.  I had not realized that Red Hat
9 is defaulting to en_US.UTF-8.  That is an actively evil choice for us
(unless we change the default database encoding to match).

IIRC we were about evenly split between changing or not changing
initdb's behavior, but if this really is a typical RHL9 setup, I think
that has got to affect the decision.

Comments?

            regards, tom lane

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

Предыдущее
От: Kevin Houle
Дата:
Сообщение: Re: UNIQUE INDEX difference between 7.2 and 7.3
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: UNIQUE INDEX difference between 7.2 and 7.3