pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
encoding error
2+ messages / 2 participants
[nested] [flat]

* encoding error
@ 2005-12-13 21:03  Ulrich Wisser <liste@publisher.de>
  0 siblings, 1 reply; 2+ messages in thread

From: Ulrich Wisser @ 2005-12-13 21:03 UTC (permalink / raw)
  To: pgsql-admin

Hello,

I try to insert some japanese text in my database. But it fails with 
duplicate value error, although I use two different values. My database 
is set up with UNICODE, I even tried a SQL_ASCII set up where I do all 
conversion manual, but nothing worked, the error persists. Please find 
the smallest possible example attached below.

I verified it in 7.4.7 and 8.1.

Any ideas welcome!

TIA

Ulrich


createdb test -E unicode

in psql:

create table kw(keyword varchar(256) primary key);

insert into kw (keyword) values 
('ã\202­ã\203£ã\203©ã\203¡ã\203«ã\202\222è³¼å\205¥ã\201\231ã\202\213');
insert into kw (keyword) values 
('ã\202¬ã\203\212ã\203\203ã\202·ã\203¥ã\202\222è³¼å\205¥ã\201\231ã\202\213');
ERROR:  duplicate key violates unique constraint "kw_pkey"




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: encoding error
@ 2005-12-14 03:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Ulrich Wisser <liste@publisher.de>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2005-12-14 03:40 UTC (permalink / raw)
  To: Ulrich Wisser <liste@publisher.de>; +Cc: pgsql-admin

Ulrich Wisser <liste@publisher.de> writes:
> I try to insert some japanese text in my database. But it fails with 
> duplicate value error, although I use two different values. My database 
> is set up with UNICODE,

and what locale? On what platform?

There are a lot of locale definitions out there that fail badly on data
that is not encoded per the encoding they expect.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-12-14 03:40 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13 21:03 encoding error Ulrich Wisser <liste@publisher.de>
2005-12-14 03:40 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox