Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Unicode Character as Primary Key

Status
Not open for further replies.

gloonie

MIS
Dec 5, 2002
6
US
Hi,

I am encountering a problem with unicode in PostgreSQL 7.3.2 in creating a primary key consisting of of a one-character Unicode column. Definitions work, but when I try to INSERT rows with values higher than u'FB50, PostgreSQL starts rejecting the rows as Duplicates, even though the values are different. Is this a bug in PostgreSQL? It doesn't matter if I define the column as "text" or char(1) - the rows are still rejected. columns with more than 1 character in the value work fine.

Definition:
create table xp_char (
unicode_char char(1) not null,
descr text not null,
constraint xpchar_pkey primary key (unicode_char)
);

Sample inserts:

INSERT INTO xp_char (unicode_char_id, descr, unicode_char)
VALUES ('ۻ','ARABIC LETTER DAD WITH DOT BELOW');
INSERT INTO xp_char (unicode_char, descr)
VALUES ('ۼ',ARABIC LETTER GHAIN WITH DOT BELOW');




Has anyone else had this problem?

TIA,

Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top