Re: LATIN2 'bssz' and 'bszsz' fails on unique index - Mailing list pgsql-bugs

From CoL
Subject Re: LATIN2 'bssz' and 'bszsz' fails on unique index
Date
Msg-id c8l7eh$g4r$1@news.hub.org
Whole thread Raw
In response to Re: LATIN2 'bssz' and 'bszsz' fails on unique index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
hi,

Tom Lane wrote:
> Sün <sun@true.hu> writes:>>>If you use Latin2 encoding, you can not have 'bssz' and 'bszsz' in an>>unique column in
thesame time.>>> AFAICS this means that your locale definition considers these strings> equal.>> It is possible that
thereal problem comes from using an encoding that's> not compatible with what the locale setting expects.  Locales
generally>do require a specific character set encoding, though this is poorly> documented :-(> 

#createdb -U postgres -E=SQL_ASCII test
#psql test
test=# \encoding
SQL_ASCII
test=# \l
List of databases    Name     |   Owner    | Encoding
-------------+------------+----------- test         | postgres   | SQL_ASCII

test=#  create TEMP table lala (string varchar(20));
CREATE TABLE
test=# CREATE UNIQUE INDEX lala_idx on lala (string);
CREATE INDEX
test=# insert INTO lala values ('bssz');
INSERT 757927 1
test=# insert INTO lala values ('bszsz');
ERROR:  duplicate key violates unique constraint "lala_idx"

How? Ok, its locale "bug" (not just int LATIN2, LATIN1), but why?

thx
C.


pgsql-bugs by date:

Previous
From: Martin Pitt
Date:
Subject: Re: Fwd: Bug#249083: postgresql: Postgres SIGSEGV if wins in nsswitch.conf
Next
From: PAviles@its.co.cr
Date:
Subject: A memory leak. Postgres 7.4. Mac OS. X Server