Re: Case (in)sensitive - Mailing list pgsql-novice

From
Subject Re: Case (in)sensitive
Date
Msg-id OF2A375843.BC53C739-ON80256965.0045773D@internal.scee.net
Whole thread Raw
In response to Case (in)sensitive  (Boszormenyi Laszlo <gcs@jupiter.hlab.uni-miskolc.hu>)
List pgsql-novice
You can use the regular expression (powerful pattern matching) syntax:

SELECT * FROM xyz WHERE field ~* '.*bud';

The ~* is a case insensitive pattern match operator, and (as an example of
a regular expression) '.*bud' matches zero or more characters followed by
'bud'

For more info, see:
http://www.postgresql.org/users-lounge/docs/7.0/user/operators2123.htm

Hope that helps,
Ol.



Hello!

 I have a database with city names, so the first letter is capitalised.
I want to let the user search for part of the city name. How can I do case
insensitive for this? You know "... like '%bud%';" won't find Budapest.

Thanks in advance,
     Laszlo Boszormenyi






**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

SCEE
**********************************************************************

pgsql-novice by date:

Previous
From: "Tamsin"
Date:
Subject: RE: distinct+trim=error?
Next
From: "Paulo Roberto Siqueira"
Date:
Subject: Row level lock