Details
Description
As per http://www.postgresql.org/docs/8.2/interactive/functions-sequence.html quoting a mixed-case sequence name requires putting it also in " ", otherwise the name will be converted to lower-case. Zend_Db_Adapter_Pdo_Pgsql never adds the additional doublequotes mentioned, only the typical singlequtoes used for string constants. Column name quoting in SELECT statements made by the PostgreSQL adapter, however, seems to know about this requirement. As far as I can tell, the problem lies in the following functions:
public function lastSequenceId($sequenceName) { $this->_connect(); $value = $this->fetchOne("SELECT CURRVAL(".$this->quote($sequenceName).")"); return $value; } public function nextSequenceId($sequenceName) { $this->_connect(); $value = $this->fetchOne("SELECT NEXTVAL(".$this->quote($sequenceName).")"); return $value; }
I would have prepared a patch if I knew how (in terms of design and abstracting this additional quoting process) this should be done.
Assigning to
Bill Karwin to initiate issue review.