Skip to content

Commit

Permalink
Correctly identifier quote column names before adding them to queries.
Browse files Browse the repository at this point in the history
Closes #2248
  • Loading branch information
markstory committed Oct 31, 2013
1 parent 927a493 commit 9e4ac31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Model/Datasource/Database/Postgres.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9e4ac31

Please sign in to comment.