Skip site navigation (1) Skip section navigation (2)

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

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Hong Yuan" <hongyuan(at)homemaster(dot)cn>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1367: Unique constraint fails with some values
Date: 2004-12-31 15:19:36
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4764A1@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-bugs
>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.


UNICODE encoding is not properly supported on Win32 at this time. 

//Magnus

pgsql-bugs by date

Next:From: Michiel TasDate: 2005-01-02 00:05:08
Subject: BUG #1368: initdb fails
Previous:From: Tom LaneDate: 2004-12-31 04:09:18
Subject: Re: BUG #1367: Unique constraint fails with some values

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group