Re: Case insensitive select

Поиск
Список
Период
Сортировка
Искать
От
Josh Berkus
Тема
Re: Case insensitive select
Дата
Msg-id
web-1525843@davinci.ethosmedia.com
Ответ на
Список
Дерево обсуждения
Case insensitive select "isaac flemmin" <isaac@knox.net>
Re: Case insensitive select Josh Berkus <josh@agliodbs.com>
Re: Case insensitive select "isaac flemmin" <isaac@knox.net>
Re: Case insensitive select Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Case insensitive select "isaac flemmin" <isaac@knox.net>
Re: Case insensitive select "Josh Berkus" <josh@agliodbs.com>
Isaac,

> Yes that worked. Thanks! I will have to look more at the lower
> function
> now so I know why that worked!

It has nothing to do with the LOWER function, which is straigthforward.

You made the beginner's mistake of defining your column as CHAR and not
VARCHAR.  As a result, what is actually being stored in your database
is not:
"Value"
"Value1"
but:
"Value     "
"Value1   "

This is what is causing your search problems.  Dump the table, and
re-build it with the correct data types (VARCHAR!).   I would also
strongly reccomend that you pick up a beginner's book on SQL database
building.  See:
http://techdocs.postgresql.org/techdocs/bookreviews.php

Also, unlike most other RDBMS, CHAR is *not* more efficient than
VARCHAR in Postgres.

-Josh Berkus

В списке pgsql-sql по дате отправления
От: isaac flemmin
Дата:
Сообщение: Re: Case insensitive select
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: How to remove contraint
FAQ