From 9e4ac31dc38683bc24da91b2ec9348d337e6bac1 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 31 Oct 2013 19:53:42 -0400 Subject: [PATCH] Correctly identifier quote column names before adding them to queries. Closes #2248 --- lib/Cake/Model/Datasource/Database/Postgres.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 7af30ae95..6249302e1 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -325,6 +325,7 @@ class Postgres extends DboSource { $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; }