Re: SELECT * FROM xy WHERE name LIKE '%german special char' - Mailing list pgsql-sql

From Tom Lane
Subject Re: SELECT * FROM xy WHERE name LIKE '%german special char'
Date
Msg-id 15334.1010449591@sss.pgh.pa.us
Whole thread Raw
In response to SELECT * FROM xy WHERE name LIKE '%german special char'  ("Albrecht Berger" <berger1517@gmx.ch>)
List pgsql-sql
"Albrecht Berger" <berger1517@gmx.ch> writes:
> The Statement
> SELECT * FROM XYZ WHERE name LIKE '%M�ller%'
> doesn't any of a matching row.

> Is there a solution for this problem ? LIKE '%M_ller%' doesn't work, too !

The only way I could see for the underscore not to match is if the
character is actually stored as two or more bytes, but Postgres doesn't
know it should treat that sequence as a single logical character.

Are you using a multibyte character set representation (eg, Unicode)?
If so, did you build Postgres with MULTIBYTE support enabled, and did
you specify the correct character set when you created the database?

If you're not sure about this theory, try looking to see whether
length() of one of the problem strings agrees with the number of
characters you think there are.
        regards, tom lane


pgsql-sql by date:

Previous
From: Manuel Sugawara
Date:
Subject: Re: SELECT * FROM xy WHERE name LIKE '%german special char'
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: simple? join