X-Original-To: pgsql-novice@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 953D29256D6 for ; Sun, 25 May 2003 09:54:26 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 01449-09 for ; Sun, 25 May 2003 09:54:26 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id 9A91A9256C6 for ; Sun, 25 May 2003 09:54:25 -0400 (EDT) Received: (qmail 1193 invoked by uid 500); 25 May 2003 13:56:30 -0000 Date: Sun, 25 May 2003 08:56:30 -0500 From: Bruno Wolff III To: Ben Schneider Cc: pgsql-novice@postgresql.org, pgsql-php@postgresql.org Subject: Re: [PHP] Case Insensitive Searching? Message-ID: <20030525135630.GB1057@wolff.to> Mail-Followup-To: Ben Schneider , pgsql-novice@postgresql.org, pgsql-php@postgresql.org References: <001301c32169$54d90fa0$5011a8c0@micronpc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001301c32169$54d90fa0$5011a8c0@micronpc> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/217 X-Sequence-Number: 7068 On Fri, May 23, 2003 at 13:24:36 -0700, Ben Schneider wrote: > > So the question is, how do I perform a case insensitive search? Is there a > DB setting I can set to ignore the case? If you were using "like", you can use "ilike" instead. There is also a case insensitive version of the regular expression pattern matching operator. In some cases you may want to use the "lower" function to get the data in just one case before doing a comparison. Without seeing how you are doing your searches now it is hard to provide specifics on what to do to make them case insensitive.