Re: lower/upper functions and strings in searches

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: lower/upper functions and strings in searches
Дата
Msg-id 200308141717.31645.josh@agliodbs.com
обсуждение исходный текст
Ответ на lower/upper functions and strings in searches  ("Gregory S. Williamson" <gsw@globexplorer.com>)
Список 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 по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: lower/upper functions and strings in searches
Следующее
От: Jomon Skariah
Дата:
Сообщение: Porting from PL/SQL to PLPGSQL