Permalink
Browse files

Correctly identifier quote column names before adding them to queries.

Closes #2248
  • Loading branch information...
markstory committed Oct 31, 2013
1 parent 927a493 commit 9e4ac31dc38683bc24da91b2ec9348d337e6bac1
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/Cake/Model/Datasource/Database/Postgres.php
@@ -325,6 +325,7 @@ public function resetSequence($table, $column) {
$fullTable = $this->fullTableName($table);
$sequence = $this->value($this->getSequence($tableName, $column));
$column = $this->name($column);
$this->execute("SELECT setval($sequence, (SELECT MAX($column) FROM $fullTable))");
return true;
}

0 comments on commit 9e4ac31

Please sign in to comment.