BUG #1367: Unique constraint fails with some values

Поиск
Список
Период
Сортировка
От Hong Yuan
Тема BUG #1367: Unique constraint fails with some values
Дата
Msg-id 200412300252.iBU2qpaO021934@developer.pgadmin.org
обсуждение исходный текст
Ответы Re: BUG #1367: Unique constraint fails with some values
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1367
Logged by:          Hong Yuan
Email address:      hongyuan@homemaster.cn
PostgreSQL version: 8.0
Operating system:   Windows XP Chinese Simplified
Description:        Unique constraint fails with some values
Details:

I found that the unique constraint fails sometimes when the varchar column
contain some specific Chinese characters. Here is an example:

CREATE TABLE test
(
  col1 varchar(10),
  CONSTRAINT col1 UNIQUE (col1)
)
WITHOUT OIDS;

insert into test values('大');
insert into test values('大');
insert into test values('大');

While the second and third inserts should fail, they do not. With some other
Chinese characters, the constraint is observed.

The character '大' has utf-8 encoding '\xe5\xa4\xa7'.

The database is created with UNICODE encoding. The problem is present with
version 8.0.0-rc2.

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

Предыдущее
От: Theodore Petrosky
Дата:
Сообщение: Re: RC2 on OS X can not make check
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1367: Unique constraint fails with some values