From: knut.suebert@web.de
To: PGSQL <pgsql-php@postgresql.org>
Subject: Re: case insensitive search
Date: Fri, 15 Mar 2002 18:33:41 +0100
Message-ID: <20020315173341.GC6266@web.de> (raw)
In-Reply-To: <89063021.20020315115444@indvalley.com>
References: <Pine.BSO.4.21.0203151157060.4985-100000@library.iisc.ernet.in>
<89063021.20020315115444@indvalley.com>
Gurudutt schrieb:
> Hello arun,
>
> ak> how to do a case insensitive search on postgresql database. i will
> ak> enter a keyword in text field and it has to search for that keyword in
> ak> keywords field of table and should be case insensitive.
>
> why don't you use "ilike" to search for the pattern in the database.
or POSIX:
4.6.2. POSIX Regular Expressions
Table 4-10. Regular Expression Match Operators
Operator Description Example
~ regex, case sensitive 'thomas' ~ '.*thomas.*'
~* regex, case insensitive 'thomas' ~* '.*Thomas.*'
!~ not regex, case sensitive 'thomas' !~ '.*Thomas.*'
!~* not regex, case insensitive 'thomas' !~* '.*vadim.*'
G,
K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: knut.suebert@web.de
Subject: Re: case insensitive search
In-Reply-To: <20020315173341.GC6266@web.de>
References: <Pine.BSO.4.21.0203151157060.4985-100000@library.iisc.ernet.in> <89063021.20020315115444@indvalley.com> <20020315173341.GC6266@web.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox