Thread: A Chinese handling bug

A Chinese handling bug

From
young
Date:
Dear developers,
    We are developing softwares with the PostgresSQL
database. We met a big problem in Chinese handling.
Please see the attached states.gif. You can see very
clear from it. We think this is a bug of the database.
    Could you please check this bug as soon as possible
and do the fixing job.

    Sincerely!

Young.

Attachment

Re: A Chinese handling bug

From
Bruce Momjian
Date:
>     We are developing softwares with the PostgresSQL
> database. We met a big problem in Chinese handling.
> Please see the attached states.gif. You can see very
> clear from it. We think this is a bug of the database.
>     Could you please check this bug as soon as possible
> and do the fixing job.

I see the problem, that = 'Chinese' does not return the same rows as
LIKE 'Chinese'.  Certainly seems like a bug, and one that would appear
for other character sets as well.

What version of PostgreSQL are you running?

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: A Chinese handling bug

From
Tom Lane
Date:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> What version of PostgreSQL are you running?

And on what platform?  Did you compile with MULTIBYTE enabled?

Also, is there an index on the name column?  If so, does either
query use the index (use EXPLAIN to find out)?  Does setting
enable_indexscan to OFF change the results?

            regards, tom lane

Re: A Chinese handling bug

From
Tatsuo Ishii
Date:
> Dear developers,
>     We are developing softwares with the PostgresSQL
> database. We met a big problem in Chinese handling.
> Please see the attached states.gif. You can see very
> clear from it. We think this is a bug of the database.
>     Could you please check this bug as soon as possible
> and do the fixing job.

You need to tell us more detailed information:

Platform and its version
PostgreSQL version and build options
database encoding (psql -l will show it)
frontend encoding
environment variables (if any)

My wild guess is you are running into a locale problem...
--
Tatsuo Ishii