Re: lower/upper functions and strings in searches - Mailing list pgsql-sql

From Josh Berkus
Subject Re: lower/upper functions and strings in searches
Date
Msg-id 200308141717.31645.josh@agliodbs.com
Whole thread Raw
In response to lower/upper functions and strings in searches  ("Gregory S. Williamson" <gsw@globexplorer.com>)
List 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 BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: lower/upper functions and strings in searches
Next
From: Jomon Skariah
Date:
Subject: Porting from PL/SQL to PLPGSQL