Browse Source

Adding quoting around SET NAMES.
Fixes #2028

mark_story 14 years ago
parent
commit
6008e0e8a0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/Cake/Model/Datasource/Database/Postgres.php

+ 1 - 1
lib/Cake/Model/Datasource/Database/Postgres.php

@@ -769,7 +769,7 @@ class Postgres extends DboSource {
  * @return boolean True on success, false on failure
  */
 	public function setEncoding($enc) {
-		if ($this->_execute('SET NAMES ?', array($enc))) {
+		if ($this->_execute("SET NAMES '?'", array($enc))) {
 			return true;
 		}
 		return false;