Re: BUG #1367: Unique constraint fails with some values

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #1367: Unique constraint fails with some values
Дата
Msg-id 1487.1104466158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #1367: Unique constraint fails with some values  ("Hong Yuan" <hongyuan@homemaster.cn>)
Список pgsql-bugs
"Hong Yuan" <hongyuan@homemaster.cn> writes:
> I found that the unique constraint fails sometimes when the varchar column
> contain some specific Chinese characters. Here is an example:

The usual cause of this sort of thing is that you've selected a database
encoding that is not compatible with the locale setting you used during
initdb, causing strcoll() to produce bogus answers --- and since varchar
comparisons depend on strcoll(), that makes everything go south.

It would be good if we could enforce consistency between the two
settings, but at the moment it's on the user's shoulders to get it right
:-(

            regards, tom lane

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

Предыдущее
От: "Hong Yuan"
Дата:
Сообщение: BUG #1367: Unique constraint fails with some values
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: BUG #1367: Unique constraint fails with some values