I used PostgreSQL 7.2.1 on redhat 7.3, installed using the rpm from redhat,.
When I createdb -E UNICODE, and import data using \copy command, after
converted all the imported text files to UTF-8 encoding. It looks well, I
can get
the data from several platforms in different locale. But, a strange problem,
when i using '=' in where clause, to match the varchar value, the result is
not correct,
for example, the table structure is
Table "tbl_test"
Column | Type | Modifiers
-------------+-----------------------+-----------
id | integer |
name | character varying(40) |
the sql is
select * from tbl_test where name = 'ç³ç°';
but the result contains other data, such as ç³çº, æ³çº, æ³ç°
and I changed the sql to
select * from tbl_test where name like 'ç³ç°';
select * from tbl_test where name ilike 'ç³ç°';
the results both correct.
I don't know the reason of this problem, and in my application it not
allowed
to use 'like' replaced '=', the data amount is too large.
Is this a bug of PostgreSQL? or only a problem in redhat environment? and
how to fix it?
Thx,
Jiang Sheng