Re: SELECT * FROM xy WHERE name LIKE '%german special char'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Albrecht Berger" <berger1517(at)gmx(dot)ch>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: SELECT * FROM xy WHERE name LIKE '%german special char'
Date: 2002-01-08 00:26:31
Message-ID: 15334.1010449591@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Albrecht Berger" <berger1517(at)gmx(dot)ch> writes:
> The Statement
> SELECT * FROM XYZ WHERE name LIKE '%Mller%'
> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-01-08 01:54:29 Re: simple? join
Previous Message Luis Miguel Castañeda 2002-01-08 00:21:58 Re: problems with single quotes..