Issues

ZF-10160: Zend_Db_Adapter_Pdo_Pgsql (lastInsertId)

Issue Type: Bug Created: 2010-07-15T03:33:21.000+0000 Last Updated: 2010-07-15T19:10:29.000+0000 Status: Resolved Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: Lexa Dobrynin (dobrynin) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Db

Related issues: Attachments:

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

Posted by Ramon Henrique Ornelas (ramon) on 2010-07-15T15:56:40.000+0000

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

See line 284: Current code:

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

Could be;

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

Problem applicant too in Zend_Db_Adapter_Pdo_Pgsql:>nextSequenceId()

Posted by Ramon Henrique Ornelas (ramon) on 2010-07-15T19:10:26.000+0000

Thanks by the report, fixed in r22566,

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts