Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database?

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database?
Date: 2001-02-15 14:58:00
Message-ID: 20010215235800Y.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> writes:
> > If we sort these strings using strcmp(), we would get:
> > ...
> > This result might not be perfect, but resonable for most cases since
> > the code value of each character in EUC_JP is defined in the hope that
> > it can be sorted by its phisical value.
>
> > If we are not satisfied with this result for some reasons, we could
> > add an auxiliary "yomigana" field to get the correct order (Yomigana
> > is a pronounciation of KANJI).
>
> Okay, so if a database has been built by a backend that knows MULTIBYTE
> and has some "yomigana" info available, then indexes in text columns
> will not be in the same order that strcmp() would put them in, right?

No. The "yomigana" exists in the application world, not in the
database engine itself. What I was talking about was an idea to add
an extra column to a table.

create table t1 (
kanji text, -- KANJI field
yomigana text -- YOMIGANA field
);

The query would be something like:

select kanji from t1 order by yomigana;
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-02-15 15:04:44 Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database?
Previous Message Tom Lane 2001-02-15 14:36:27 Re: Shouldn't non-MULTIBYTE backend refuse to start in MB database?