"Heikki Linnakangas" <heikki@enterprisedb.com> writes:
> Jonas Forsman wrote:
>
>> Try:
>> select * from table where lower(address) like '%=C3=A5%'
>>
>> This select fails to find addresses including capital =C3=85 and similar=
s in
>> LATIN1 (like =C3=85, =C3=84, =C3=96).=20
Isn't =C3 an upper-case letter? In which case lower(address) will never mat=
ch it
since by definition lower(address) will only contain characters which are
lower case. That is if address contains a "=C3" then lower(address) will co=
ntain
an "=E3" instead which won't match the "=C3" in the pattern.
I think you either need to put a lower() on both sides of the LIKE or use
ILIKE.
--=20
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL tra=
ining!