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 20D79D1C936 for ; Fri, 15 Aug 2003 00:19:04 +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 32976-03 for ; Thu, 14 Aug 2003 21:18:56 -0300 (ADT) Received: from davinci.ethosmedia.com (unknown [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 16E83D1C516 for ; Thu, 14 Aug 2003 21:18:50 -0300 (ADT) Received: from [66.219.92.2] (HELO temoku) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3513689; Thu, 14 Aug 2003 17:19:18 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Gregory S. Williamson" , Subject: Re: lower/upper functions and strings in searches Date: Thu, 14 Aug 2003 17:17:31 -0700 User-Agent: KMail/1.4.3 References: <71E37EF6B7DCC1499CEA0316A256832801057071@loki.globexplorer.com> In-Reply-To: <71E37EF6B7DCC1499CEA0316A256832801057071@loki.globexplorer.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200308141717.31645.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/182 X-Sequence-Number: 14798 Gregory, > I just know I'm overlooking some real obvious thing but for some reason t= his=20 eludes me. I could see if the search was very slow (the function returns ty= pe=20 "text" and the indexed columns are of type CHAR(). Char(what?) ? if it's, say CHAR(4) that could be your problem; 'NM'::undefined =3D=3D 'NM '::CHAR but 'NM'::TEXT !=3D 'NM '::CHAR so casting everything to the desired type should fix the problem. and why are you using CHAR, anyway? --=20 -Josh Berkus Aglio Database Solutions San Francisco