From: | "Josh Berkus" <josh(at)agliodbs(dot)com> |
---|---|
To: | "isaac flemmin" <isaac(at)knox(dot)net>, "'Stephan Szabo'" <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Case insensitive select |
Date: | 2002-06-13 04:35:15 |
Message-ID: | web-1525843@davinci.ethosmedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Vernon Wu | 2002-06-13 05:16:29 | Please help me out on this insert error |
Previous Message | isaac flemmin | 2002-06-13 02:06:02 | Re: Case insensitive select |