ZF-10478: Oracle adapter does not apply foldCase() on insert/update statements.

Description

If I use the Zend_Log_Writer_Db I will get "invalid identifier" (ORA-00904) errors from Oracle because the field casing is incorrect. The fields should be upper-case. It would be great if the caseFolding would also apply to insert (and update) statements. For the inserts a simple replacement of the code:

"Oracle.php" line 621 $cols[] = $this->quoteIdentifier($col, true); into $cols[] = $this->quoteIdentifier($this->foldCase($col), true);

would suffice.

As a work-around I now made a custom Zend_Log_Writer_Db which provides the upper-casing, it feels a bit redundant but I need to obey our coding standard to NOT hack external libraries :)

Comments

Is this an issue specific to Zend_Log? Or Zend_Db_Adapter_Oracle?

It is an issue of Zend_Db_Adapter_Oracle in my opinion (which will make Zend_Log fail). Oracle is annoyingly sensitive to the proper casing of fields and tables.

A similar thing happens with Zend_Queue, which is expecting all lowercase table, sequence, and column names.