Merge branch 'postgres-sequence'

Merge changes for pull request #2248
This commit is contained in:
mark_story 2013-10-31 19:53:49 -04:00
commit d8acf531cb

View file

@ -325,7 +325,8 @@ class Postgres extends DboSource {
$fullTable = $this->fullTableName($table); $fullTable = $this->fullTableName($table);
$sequence = $this->value($this->getSequence($tableName, $column)); $sequence = $this->value($this->getSequence($tableName, $column));
$this->execute("SELECT setval($sequence, (SELECT MAX(id) FROM $fullTable))"); $column = $this->name($column);
$this->execute("SELECT setval($sequence, (SELECT MAX($column) FROM $fullTable))");
return true; return true;
} }