Issues

ZF-10160: Zend_Db_Adapter_Pdo_Pgsql (lastInsertId)

Description

line [325] file Zend/Db/Adapter/Pdo/Pgsql.php now return $this->lastSequenceId($sequenceName); need return $this->lastSequenceId('"' . $sequenceName . '"');

example: $table = 'User'; $row = "ID";

PostgreSQL considers 'User_ID_seq' == 'user_id_seq', but '"User_ID_seq"' != '"user_id_seq"'

Comments

The problem not is in the called and yes within Zend_Db_Adapter_Pdo_Pgsql:>lastSequenceId().

See line 284: Current code:


$value = $this->fetchOne("SELECT CURRVAL(".$this->quote($sequenceName).")");

Could be;


$value = $this->fetchOne("SELECT CURRVAL('".$this->quoteIdentifier($sequenceName, true)."')");

Problem applicant too in Zend_Db_Adapter_Pdo_Pgsql:>nextSequenceId()

Thanks by the report, fixed in r22566,