Received: from mailout09.sul.t-online.com (mailout09.sul.t-online.com [194.25.134.84]) by postgresql.org (Postfix) with ESMTP id 891C7475AAA for ; Fri, 15 Mar 2002 13:21:06 -0500 (EST) Received: from fwd10.sul.t-online.de by mailout09.sul.t-online.com with smtp id 16lvbT-00084T-07; Fri, 15 Mar 2002 18:34:55 +0100 Received: from cascal.vtb (520013531845-0001@[217.85.14.101]) by fmrl10.sul.t-online.com with esmtp id 16lvbF-0LBJa4C; Fri, 15 Mar 2002 18:34:41 +0100 Received: from ksueber by cascal.vtb with local (Exim 3.34 #1 (Debian)) id 16lvaI-0002SJ-00 for ; Fri, 15 Mar 2002 18:33:42 +0100 Date: Fri, 15 Mar 2002 18:33:41 +0100 To: PGSQL Subject: Re: case insensitive search Message-ID: <20020315173341.GC6266@web.de> References: <89063021.20020315115444@indvalley.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <89063021.20020315115444@indvalley.com> User-Agent: Mutt/1.3.27i X-No-Archive: yes From: knut.suebert@web.de X-Sender: 520013531845-0001@t-dialin.net X-Archive-Number: 200203/33 X-Sequence-Number: 1002 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