Re: lower/upper functions and strings in searches

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: lower/upper functions and strings in searches
Date: 2003-08-15 00:17:31
Message-ID: 200308141717.31645.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Gregory,

> I just know I'm overlooking some real obvious thing but for some reason this
eludes me. I could see if the search was very slow (the function returns type
"text" and the indexed columns are of type CHAR().

Char(what?) ?

if it's, say CHAR(4) that could be your problem;
'NM'::undefined == 'NM '::CHAR
but
'NM'::TEXT != 'NM '::CHAR
so casting everything to the desired type should fix the problem.

and why are you using CHAR, anyway?

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-08-15 04:40:56 Re: Optional join
Previous Message Stephan Szabo 2003-08-15 00:00:19 Re: lower/upper functions and strings in searches