[turba] Case sensitive vs. case insensitive search

Liam Hoekenga liamr@umich.edu
Tue, 18 Sep 2001 12:11:56 -0400 (EDT)


> > this also explains why i had to cover the table and field names to uppercase
> > in horde_prefs (as mentioned in one my posts this weekend on the IMP list)
>
> This, I don't follow - can you explain why these are related?
>
> -chuck

I had to change to change all of the table and field references in
horde/lib/Prefs/sql.php to upper case to get HORDE/IMP working properly
with oci8.

It struck me that IMP was happy saving stuff, when it knew that it could
just refer to stuff as horde_prefs/pref_name (when it just expected that
the table was there and that field existed).

but... when it went to search for stuff...  it had problems finding it.  table
and field names aren't case sensitive, but when you query table and field
names in Oracle, it returns the result in uppercase, while mysql returns
its results in lowercase.

kinda illustrated by...

PL/SQL Release 8.1.5.0.0 - Production

SQL> select * from cat;

TABLE_NAME                     TABLE_TYPE
------------------------------ -----------
HORDE_PERMS                    TABLE
HORDE_PREFS                    TABLE
KRONOLITH_EVENTS               TABLE
TURBA_OBJECTS                  TABLE

mysql> show tables;
+------------------+
| Tables_in_horde  |
+------------------+
| horde_perms      |
| horde_prefs      |
| kronolith_events |
| turba_objects    |
+------------------+
8 rows in set (0.00 sec)

Although SQL is case insensitive, it looks like mysql prefers lowercase,
while Oracle and Postgres prefer uppercase. While the databases may be
case insensitive the sql code in horde, is not.

Liam