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 DF771D1B524 for ; Thu, 14 Aug 2003 23:46:08 +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 32811-02 for ; Thu, 14 Aug 2003 20:46:01 -0300 (ADT) Received: from loki.globexplorer.com (unknown [208.35.14.10]) by svr1.postgresql.org (Postfix) with ESMTP id 8F492D1C50E for ; Thu, 14 Aug 2003 20:45:57 -0300 (ADT) X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: lower/upper functions and strings in searches Date: Thu, 14 Aug 2003 16:46:08 -0700 Message-ID: <71E37EF6B7DCC1499CEA0316A256832801057071@loki.globexplorer.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: lower/upper functions and strings in searches Thread-Index: AcNiv+FAkdtSqc6iEdejQQDAT6BMEQ== From: "Gregory S. Williamson" To: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/180 X-Sequence-Number: 14796 I am obviuously doing some newbie trick, and I ordinarily would spend time = browing the archives, but the archives.postgresql.org site seems to be absu= rdly slow. This is 7.3.3 on a linux box. I have a bunch of data with state, city, county and country names. When our= application does a search for an exact match: select * from gx_geotowns where l_state =3D 'NM'; I get back a lot of rows of cities in New Mexico, as expected. If I try: select * from gx_geotowns where upper(l_state) =3D upper('nm'); I get back: ---------+-----------+----------+------------+------+------ (0 rows) I've used other databases in which a similar statement worked as exepected: select * from clients where upper(client_name) =3D upper("Some client or otheR"); And it finds the row(s) in question ... I just know I'm overlooking some real obvious thing but for some reason thi= s eludes me. I could see if the search was very slow (the function returns = type "text" and the indexed columns are of type CHAR(). If someone could offer help I would appreciate it, Thanks, Greg Williamson DBA GlobeXplorer LLC