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

From Tom Lane
Subject Re: UTF-8 and LIKE vs =
Date
Msg-id 25465.1093304129@sss.pgh.pa.us
Whole thread Raw
In response to Re: UTF-8 and LIKE vs =  (David Wheeler <david@kineticode.com>)
Responses Re: UTF-8 and LIKE vs =  (David Wheeler <david@kineticode.com>)
Re: UTF-8 and LIKE vs =  (Tim Allen <tim@proximity.com.au>)
List pgsql-general
David Wheeler <david@kineticode.com> writes:
>> Is the problem query using an index?  If so, does REINDEX help?

> Doesn't look like it:

> bric=3D# reindex index udx_keyword__name;
> REINDEX
> bric=3D# select * from keyword where name =3D'=BA=CF=C7=D1=C0=C7';
>    id  |  name  | screen_name | sort_name | active
> ------+--------+-------------+-----------+--------
>   1218 | =B1=B9=B9=E6=BA=F1 | =B1=B9=B9=E6=BA=F1      | =B1=B9=B9=E6=BA=F1=
>     |      1
> (1 row)

Hmm.  I tried putting your string into a UNICODE database and I got
ERROR:  invalid byte sequence for encoding "UNICODE": 0xc7

So there's something funny happening here.  What is your client_encoding
setting?

            regards, tom lane

pgsql-general by date:

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