Re: Sorting Chinese data in Postgresql 7.3.1
Re: Sorting Chinese data in Postgresql 7.3.1
От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
> Tatsuo, > > I have been trying to get the sorting of Chinese data in Postgresql > 7.3.1 to work without much success. Here is what I did. > > I rebuilt the executables with ./configure -enable-multibyte=ENC_CN on > a RedHat Linux 8.0 Pentium 2 system. The build was successful. I created > a test database cluster and a database instance using the -E EUC_CN > option. The database ran OK: I could successfully save and retrieve > Chinese(GB2312) from some test database tables. However, when I tried to > select data from a table with Chinese (GB2312) data with an "order by" > clause, the outcome indicate that the "order by" instruction had no > effect. > Do you know if sorting Chinese data works in Postgresql 7.3.1? If yes, > how would I get it to work? If no, what can be done? I am willing to > help to get this work if there is not someone already working on it. That might be a Chinese locale problem. Try re-initdb with --no-locale option to disable the locale support. Unfortunately there's no way to build PostgreSQL 7.3 or later without locale support except specify the option at initdb time. -- Tatsuo Ishii
Re: Sorting Chinese data in Postgresql 7.3.1
От:
Tatsuo Ishii <t-ishii@sra.co.jp>
Дата:
> I tried initdb -E EUC_CN --no-locale and tested "order by" with the same > Chinese data, I got the same result: the "order by" clause does not have > any effect. The locale on my Redhat Linux 8.0 is en_US.UTF-8. > > By the way, the manual page for initdb does not show an option > --no-locale. That's a bug with the man page. Try initdb --help to find the option. > Could you point me to the source codes where I can pin down > this? No idea at this point. What about the results of following SQL? SELECT 'chinese char1'::text > 'chinese char2'::text; Do you get same result for any Chinese (EUC_CN) characters? -- Tatsuo Ishii