X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E63DCD1E31F for ; Wed, 31 Mar 2004 05:33:59 +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 46408-03 for ; Wed, 31 Mar 2004 01:33:57 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 17157D1E2CD for ; Wed, 31 Mar 2004 01:33:55 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i2V5Xpdp029186; Wed, 31 Mar 2004 00:33:51 -0500 (EST) To: josh@agliodbs.com Cc: Palle Girgensohn , pgsql-performance@postgresql.org Subject: Re: LIKE should use index when condition doesn't include In-reply-to: <200403301656.09664.josh@agliodbs.com> References: <145170000.1080688008@palle.girgensohn.se> <26840.1080692204@sss.pgh.pa.us> <162280000.1080692911@palle.girgensohn.se> <200403301656.09664.josh@agliodbs.com> Comments: In-reply-to Josh Berkus message dated "Tue, 30 Mar 2004 16:56:09 -0800" Date: Wed, 31 Mar 2004 00:33:51 -0500 Message-ID: <29185.1080711231@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/436 X-Sequence-Number: 6292 Josh Berkus writes: > ILIKE is not somehow aware that it is equivalent to lower(). Is it? Given the wild and wonderful behaviors of locales here and there, I wouldn't want to assume that such an equivalence holds. In particular I note that iclike() seems to be multibyte-aware while lower() definitely is not. Even if that's just a bug, it's a big leap to assume that ILIKE is equivalent to LIKE on lower(). Think about Turkish i/I, German esstet (did I spell that right?), ch in various languages, etc etc. regards, tom lane