BUG #1367: Unique constraint fails with some values

From: "Hong Yuan" <hongyuan(at)homemaster(dot)cn>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1367: Unique constraint fails with some values
Date: 2004-12-30 02:52:51
Message-ID: 200412300252.iBU2qpaO021934@developer.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1367
Logged by: Hong Yuan
Email address: hongyuan(at)homemaster(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Magnus Hagander 2004-12-30 09:18:58 Re: German Win32 Setup (V8 RC2)
Previous Message Tom Lane 2004-12-30 00:20:05 Re: BUG #1364: using field names or table names with blanks