X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 41762D1B53C for ; Tue, 10 Feb 2004 16:05:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 48974-07 for ; Tue, 10 Feb 2004 12:04:58 -0400 (AST) Received: from fep03-mail.bloor.is.net.cable.rogers.com (fep03-mail.bloor.is.net.cable.rogers.com [66.185.86.73]) by svr1.postgresql.org (Postfix) with ESMTP id 02EFFD1C9BD for ; Tue, 10 Feb 2004 12:04:57 -0400 (AST) Received: from phlogiston.dydns.org ([65.49.121.67]) by fep03-mail.bloor.is.net.cable.rogers.com (InterMail vM.5.01.05.12 201-253-122-126-112-20020820) with ESMTP id <20040210160455.YJZI189272.fep03-mail.bloor.is.net.cable.rogers.com@phlogiston.dydns.org> for ; Tue, 10 Feb 2004 11:04:55 -0500 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 384043F3A; Tue, 10 Feb 2004 11:04:55 -0500 (EST) Date: Tue, 10 Feb 2004 11:04:55 -0500 From: Andrew Sullivan To: pgsql-general@postgresql.org Subject: Re: Case sensitivity Message-ID: <20040210160455.GB28540@phlogiston.dyndns.org> Mail-Followup-To: pgsql-general@postgresql.org References: <04875CB4331F0240A0AD66F970978651011377D5@paul> <4028740F.7000104@zara.6.isreserved.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4028740F.7000104@zara.6.isreserved.com> User-Agent: Mutt/1.5.4i X-Authentication-Info: Submitted using SMTP AUTH LOGIN at fep03-mail.bloor.is.net.cable.rogers.com from [65.49.121.67] using ID at Tue, 10 Feb 2004 11:04:55 -0500 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/418 X-Sequence-Number: 57129 On Tue, Feb 10, 2004 at 01:02:55PM +0700, David Garamond wrote: > > I believe no. You can index on LOWER(f) or UPPER(f) but that still > requires a query rewriting to WHERE LOWER(f) = .... You can also write > INSERT triggers to convert values to upper case, but that still requires > query rewriting if you're comparing with mixed-case values. But you could do some tricks with rules (plus the indexes and triggers you mentioned) in order to lower() or upper() the input, if you happen to know where you're likely to have the problems. It's certainly true, however, that from the point of view of keeping your data clean, you want these steps handled before the data actually gets into the database. A -- Andrew Sullivan | ajs@crankycanuck.ca The plural of anecdote is not data. --Roger Brinner