[pgsql-jp: 39501] Re: insensitiveな日本語検索

山下 雄大 yamashita @ media-labo.co.jp
2008年 7月 15日 (火) 09:08:11 JST


山下です。

田中さん、北村さん 情報有難う御座います。

教えていただいた情報をもとに検証いたします。

検証結果は、後ほどご連絡いたします。

ありがとうございました。




FKitamura さんは書きました:
> 北村です。
>
>>> translateを使う方法でやってみます。
>>
>> この方法は非常に実装しやすいと思いますが検索速度大丈夫ですか?
>
> 関数インデックスを使ったらどうでしょう?
>
>
> create table test(
> id char(4),
> name varchar(30)
> );
>
> create index test_idx on test
> (translate(name, 'あいうえお', 'アイウエオ'));
>
> \d test
> Table "public.test"
> Column | Type | Modifiers
> --------+-----------------------+-----------
> id | character(4) |
> name | character varying(30) |
> Indexes:
> "test_idx" btree (translate(name::text,
> 'あいうえお'::text, 'アイウエオ'::text))
>
>
>
> ================<F.Kitamura>================
> He can who thinks he can, and he can't who thinks he can't.
> This is an inexorable, indisputable law.
>
>
>


-- 
――――――――――――――――――――
山下 雄大
E-mail:yamashita @ media-labo.co.jp
――――――――――――――――――――




pgsql-jp メーリングリストの案内