Re: Simple Question: Case sensitivity
| От | Tomas Berndtsson |
|---|---|
| Тема | Re: Simple Question: Case sensitivity |
| Дата | |
| Msg-id | 80wvd71beg.fsf@junk.nocrew.org обсуждение исходный текст |
| Ответ на | RE: Simple Question: Case sensitivity ("Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com>) |
| Ответы |
Re: Simple Question: Case sensitivity
Re: Simple Question: Case sensitivity |
| Список | pgsql-general |
"Hancock, David (DHANCOCK)" <DHANCOCK@arinc.com> writes:
> Abe: It's an SQL thing or a scripting thing. It's probably easiest and
> safest in the SQL:
>
> select firstname, surname from employees
> where upper(firstname) like upper('%$criteria%') or
> upper(surname) like upper('%$criteria%')
>
> That is, force the column and the search string to uppercase befor
> comparing, and it won't matter how it's stored in the database.
Related to this, is there any way to make an index for a table
case-insensitive? If you have an index, but use upper() in the select,
the index is not used.
Tomas
В списке pgsql-general по дате отправления: