unexpected query behavior with UTF text - Mailing list pgsql-general

From Indra Heckenbach
Subject unexpected query behavior with UTF text
Date
Msg-id 3F965A58.3040602@macnica.com
Whole thread Raw
Responses Re: unexpected query behavior with UTF text
List pgsql-general
I have recently come across an unusual behavior with Postgres 7.3.4 on a
Linux RH 9 system.  My database has encoding set to "UNICODE", and the
table includes Japanese text.  I'm trying to issue a query like this:

SELECT * FROM sales WHERE name='ja-text';

This query ignores all japanese characters in the comparison text.  It
matches properly on ascii chars, but skips right over ja chars.

I tried using "LIKE" instead of "=", and this works fine!  I would
expect "=" to do a character by character comparison, but it must not be.

I found a related issue on the mailing list, where locale setting was
causing something similar.  However, my locale is set to "en_US.UTF-8",
which is the solution proposed to the other problem.

Is this a bug, or expected behavior?  How can I correct this without
resorting to LIKE and escaping wildcard characters?

thanks!


pgsql-general by date:

Previous
From: 博\xD7X 翟
Date:
Subject: where is pg_views
Next
From: Pedro Alves
Date:
Subject: Same conditions, different planning?