Re: UTF-8 and LIKE vs = - Mailing list pgsql-general

From Ian Barwick
Subject Re: UTF-8 and LIKE vs =
Date
Msg-id 1d581afe0408231358127c3e6f@mail.gmail.com
Whole thread Raw
In response to UTF-8 and LIKE vs =  (David Wheeler <david@kineticode.com>)
Responses Re: UTF-8 and LIKE vs =
List pgsql-general
On Mon, 23 Aug 2004 12:41:30 -0700, David Wheeler <david@kineticode.com> wrote:
(...)
> bric=# select version();
>                                                   version
> ------------------------------------------------------------------------
> ---------------------------------
>   PostgreSQL 7.4.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2
> 20030222 (Red Hat Linux 3.2.2-5)
> (1 row)
>
> bric=# select * from keyword where name = '북한의';
>    id  |  name  | screen_name | sort_name | active
> ------+--------+-------------+-----------+--------
>   1218 | 국방비 | 국방비      | 국방비    |      1
> (1 row)

er, the characters in "name" don't seem to match the characters in the
query - '국방비' vs. '북한의' - does that have any bearing?

FWIW (on 7.4.3):

test=#  select * from t1 ;
 id | value
----+--------
  1 | 日本
  2 | 日本語
  3 | 北海道
(3 rows)

test=#  select * from t1 where value ~ '日';
 id | value
----+--------
  1 | 日本
  2 | 日本語
(2 rows)

test=# select * from t1 where value like '日%';
 id | value
----+--------
  1 | 日本
  2 | 日本語

test=# select * from t1 where value like '北海%';
 id | value
----+--------
  3 | 北海道
(1 row)

Ian Barwick
barwick@gmail.net

pgsql-general by date:

Previous
From: David Wheeler
Date:
Subject: Re: UTF-8 and LIKE vs =
Next
From: David Wheeler
Date:
Subject: Re: UTF-8 and LIKE vs =