X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4CE08D1B522 for ; Thu, 25 Sep 2003 05:19:18 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 62568-05 for ; Thu, 25 Sep 2003 02:19:08 -0300 (ADT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by svr1.postgresql.org (Postfix) with ESMTP id 9A6C2D1B50E for ; Thu, 25 Sep 2003 02:19:07 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 2B2ED35014; Wed, 24 Sep 2003 22:19:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 2A14834DEF; Wed, 24 Sep 2003 22:19:08 -0700 (PDT) Date: Wed, 24 Sep 2003 22:19:08 -0700 (PDT) From: Stephan Szabo To: "George A.J" Cc: pgsql-sql@postgresql.org Subject: Re: Case Insensitive comparison In-Reply-To: <20030925033550.35699.qmail@web14915.mail.yahoo.com> Message-ID: <20030924221627.E70696@megazone.bigpanda.com> References: <20030925033550.35699.qmail@web14915.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/294 X-Sequence-Number: 15272 On Wed, 24 Sep 2003, George A.J wrote: > The main problems i am facing is that in sql server the text comparisons > are case insensitive. how can i compare text case insensitive in > postgresql without using an upper() or lower() function in both sides > (=). Is there any option to set in postgresql? > > Is there any problem in overriding the = operator that compare text. ie > droping the current operator = and creating a new = operator(text,text). > Does the existing = operator is using internally by postgres for some > porpose. please help Well, you'd really want to change all the comparison operators because otherwise I think indexes would be screwy and I don't know off hand if this will cause problems, but I can imagine that it might, if only on queries from clients and such on the system catalogs. One other option is to find or make a case insensitive collating locale for your operating system and use that when initializing the database. I've never tried so I can't say whether that'll have its own problems.